-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: binaryEmbeddingReader can't be null #6
Comments
this error happens when the field ("image_embedding" in your case) does not exist in all the documents you are searching on. |
Same error. |
Hi @lior-k I have an indice with 10 shards and I realized that when search does return hits, there's a JSON in the response with the property {
"successful": 3,
"failed": 7,
"skipped": 0,
"total": 10,
"failures": [
{
"node": "ghr7DWYOSWa4tlvZ4kpsFQ",
"index": "deckito",
"reason": {
"reason": "binaryEmbeddingReader can't be null",
"type": "illegal_state_exception"
},
"shard": 0
}
]
} When setting |
I also have the same problem, the document has the field but the problem happens |
Please share:
1. Your index mapping
2. A query that checks that ALL the documents in the index have the field
…On Fri, Apr 27, 2018, 3:46 PM nabas ***@***.***> wrote:
I also have the same problem, the document has the field but the problem
happens
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AExkSDpJAlQSakYzjMkxtg_aOu-Bfhvyks5tsxM_gaJpZM4TlMCk>
.
|
Hi @lior-k This is my mapping: {
"settings": {
"number_of_shards": 10
},
"mappings": {
"slide": {
"properties": {
"deck_id": {
"type": "keyword",
"index": true
},
"number": {
"type": "integer",
"index": true
},
"image_embedding": {
"type": "binary",
"doc_values": true
},
"text": {
"type": "text",
"index": true
}
}
},
"searchResult": {
"properties": {
"deck_id": {
"type": "keyword",
"index": true
},
"search_timestamp": {
"type": "date",
"index": true
},
}
}
}
} My query: {
"query": {
"bool": {
"should": [
{
"function_score": {
"boost": 1,
"score_mode": "avg",
"boost_mode": "multiply",
"min_score": 0,
"script_score": {
"script": {
"source": "binary_vector_score",
"lang": "knn",
"params": {
"cosine": true,
"field": "image_embedding",
"vector": "MY_VECTOR"
}
}
}
}
}
]
}
}
} MY_VECTOR is something like [0.20438875, 0.087035105, 0.41949105, ...] I'm using the Python client to search only documents of type
|
please do the following query in order to check that all the documents have values in this field.
|
Hi @lior-k I am also getting the same error: "{ my data looks like: I have just added one record and used the same records vector field in query to get knn with k=1. Ideally the query should have returned the record present in the index but instead I got the above mentioned error. Could you help me out here? |
Hi @lior-k I ran the query you posted in 3 different ways and it returned the following results (note I have 2 document types:
|
I was able to get the issue resolved by following lior-k's suggestion and making sure that 0 docs are returned for the query mentioned. I am able to get the KNN docs now using the plugin. Thanks @lior-k :-) |
I fixed my templates, and reindexed them, finally it works. |
good to hear, closing the issue |
Also struggling with this problem. The plugin works in production, but when I use elasticdump to copy the data to a local server I start getting "binaryEmbeddingReader can't be null".
In this state my vector searches fail entirely. If I inspect the mapping my field is mapped correctly. If I use the painless query above I find 0 records. If I reindex my document then things start working on most of the shards.
Then I do a second _reindex to rename from tmp back to account. My queries start working now, however - I still see exceptions firing in the ES server and my query _shards has 3 successful and 2 failed shards:
Update: |
I'm using Elasticsearch as docker container with the binary-vector-scoring plugin installed, but I'm getting an intermittent error when doing search with the following query:
The search runs ok for a while (first dozen of requests) and then it starts returning the following error:
Reindexing all documents is the only way to make the search work again, has anybody faced the same problem?
The text was updated successfully, but these errors were encountered: