Comments (7)
I don't see anything obviously wrong with the query.
The error indicates that JSON parsing fails at some point.
Can you post more of the stacktrace so I know at what stage in the query lifecycle this error is happening?
from elastiknn.
The full error message is
{ "error": { "root_cause": [ { "type": "", "reason": "Unexpected field: [field]; valid fields: : DownField(vec)" } ], "type": "", "reason": "Unexpected field: [field]; valid fields: : DownField(vec)" }, "status": 500 }
and the log just says
[2020-10-30T16:49:05,035][WARN ][r.suppressed ] [Matthiass-MacBook-Pro.local] path: /my-index/_search, params: {index=my-index} io.circe.DecodingFailure$$anon$2: Unexpected field: [field]; valid fields: : DownField(vec)
I am using elastiknn 0.1.0-PRE43_es7.6.2
. I hope this helps. Is there a way to get a full stacktrace?
from elastiknn.
Usually there are more messages surrounding the log warning. But it might depend on how you have Elasticsearch configured. I think the full error message and log error above are different errors. One says Unexpected field: [id]
and the other says Unexpected field: [field]
.
In any case, I'm curious about a couple things:
- How are you submitting the queries? Python client? Bash/curl?
- Does the indexed-vector query work if you reference vectors from another index?
from elastiknn.
Upps, sorry. I was trying to remove fields from the query to see what happens and forgot to revert to my original query. I amended the error message in the comment above to match the query and log message.
I am using curl like this
curl -XPOST 'localhost:9200/my-index/_search' -H 'Content-Type: application/json' -d @querybyid.json
querybyid.json contains the query from above.
I created another index and referenced the query vector from there
{ "query": { "elastiknn_nearest_neighbors": { "field": "my_vec", "vec": { "index": "my-index-2", "field": "my_vec", "id": 1 }, "model": "exact", "similarity": "l1" } } }
This gives me the same error.
Thank you for your time.
from elastiknn.
I think this might be more of a CURL and/or http issue.
This might work:
First, use "id": "1"
, since the id is a string.
Then, use --data-binary
instead of -d
.
curl -XPOST 'localhost:9200/my-index/_search' -H 'Content-Type: application/json' --data-binary @querybyid.json
See here for --data-binary
reasoning.
from elastiknn.
It works! Specifying the id as a string did the trick.
Thank you!
from elastiknn.
Great. I'll try to make that more clear in the docs or at least improve the error message.
from elastiknn.
Related Issues (20)
- Try vectors from Project Panama for LSH operations HOT 3
- can't create a mapping HOT 1
- Try quick select algorithm for KthGreatest implementation HOT 4
- Try resampling vectors to speed up L2LshModel
- Try getting rid of HashAndFreq to minimize allocations HOT 1
- Try re-using threadlocal arrays in ArrayHitCounter HOT 2
- Try caching the query vector's FloatVector segments when computing distance HOT 2
- Get Fashion Mnist 96% recall up to 200 queries/second HOT 2
- Try using a byte array in ArrayHitCounter instead of a short array
- Try Lucene VectorUtil instead/alongside PanamaFloatVectorOps HOT 1
- Try index sorting to reduce number of shards/segments accessed HOT 2
- Kibana does not show the data of elastiknn_sparse_bool_vector HOT 1
- Q&A: Scale effects HOT 2
- Support range queries (neighbors within some distance) HOT 1
- Try using Lucene IntIntHashMap to speedup and reduce memory usage of top-K counting HOT 1
- Hope to support version 7.17.20, later 7.17.x can be downloaded HOT 1
- a problem about hybrid search HOT 3
- cannot create runtime field during seach HOT 1
- Using bitnami/elasticsearch: 8.14.1 add elastiknn I start an error HOT 1
- Support for index patterns
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elastiknn.