jina-ai / annlite

⚡ A fast embedded library for approximate nearest neighbor search
Apache License 2.0
216 stars 22 forks source link

annlite wrong filter name bug #207

Closed tommykoctur closed 1 year ago

tommykoctur commented 1 year ago

Hi, i am implementing annlite filter to our system and I noticed strange behaviour. I have set columns {"language": "str"}, and this works well.

If i use in query wrong column name it gives me: Error: no such column: foo Then if I use correct column "language" ten it gives me: Error: 'int' object is not subscriptable

And it cannot recover from this behaviour. It is annlite 0.5.4

╭────────────── 🔗 Endpoint ───────────────╮
│  ⛓     Protocol                    HTTP  │
│  🏠       Local           0.0.0.0:45678  │
│  🔒     Private       172.27.0.30:45678  │
│  🌍      Public   217.145.192.210:45678  │
╰──────────────────────────────────────────╯
╭─────────── 💎 HTTP extension ────────────╮
│  💬          Swagger UI        .../docs  │
│  📚               Redoc       .../redoc  │
╰──────────────────────────────────────────╯
INFO   Sentencizer@574105 QUERY TEXT: car usage                                                                                                                                                                            [12/05/22 15:44:28]
INFO:     172.27.0.114:39710 - "POST /post HTTP/1.1" 200 OK
INFO   Sentencizer@574105 QUERY TEXT: car usage                                                                                                                                                                            [12/05/22 15:44:43]
WARNI… AnnLiteIndexer@574109 Error: no such column: foo                                                                                                                                                                    [12/05/22 15:44:43]
WARNI… AnnLiteIndexer@574110 Error: no such column: foo                                                                                                                                                                    [12/05/22 15:44:43]
INFO:     172.27.0.114:39712 - "POST /post HTTP/1.1" 200 OK
INFO   Sentencizer@574105 QUERY TEXT: car usage                                                                                                                                                                            [12/05/22 15:44:49]
WARNI… AnnLiteIndexer@574109 Error: 'int' object is not subscriptable                                                                                                                                                      [12/05/22 15:44:49]
WARNI… AnnLiteIndexer@574110 Error: 'int' object is not subscriptable                                                                                                                                                      [12/05/22 15:44:49]
INFO:     172.27.0.114:39714 - "POST /post HTTP/1.1" 200 OK
JoanFM commented 1 year ago

Hello @tommykoctur , can u share the Flow that u are using (or something that can be reproduced) to see how u are setting the Executor?