Error: binaryEmbeddingReader can't be null
See original GitHub issueI’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:
{
"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_HERE"
}
}
}
}
}
The search runs ok for a while (first dozen of requests) and then it starts returning the following error:
Caused by: java.lang.IllegalStateException: binaryEmbeddingReader can't be null
elasticsearch | at com.liorkn.elasticsearch.script.VectorScoreScript.setBinaryEmbeddingReader(VectorScoreScript.java:67) ~[?:?]
elasticsearch | at com.liorkn.elasticsearch.service.VectorScoringScriptEngineService$1.getLeafSearchScript(VectorScoringScriptEngineService.java:65) ~[?:?]
elasticsearch | at org.elasticsearch.common.lucene.search.function.ScriptScoreFunction.getLeafScoreFunction(ScriptScoreFunction.java:79) ~[elasticsearch-5.6.0.jar:5.6.0]
elasticsearch | at org.elasticsearch.common.lucene.search.function.FunctionScoreQuery$CustomBoostFactorWeight.functionScorer(FunctionScoreQuery.java:140) ~[elasticsearch-5.6.0.jar:5.6.0]
...
Reindexing all documents is the only way to make the search work again, has anybody faced the same problem?
Issue Analytics
- State:
- Created 5 years ago
- Comments:13 (4 by maintainers)
Top Results From Across the Web
Why getting ____ cannot be null - Stack Overflow
While test on postman I keep getting an error: Column 'account_number' cannot be null Although I enter accountNumber.
Read more >Scoring plugin, unexpected behavior - Elasticsearch
Hey. I am writing a plugin for calculating the distance of the EMD vector for Elastic 7.10.0. I took the repository as an...
Read more >Value cannot be null - error message : r/prowlarr - Reddit
Today on http://localhost:9696/ I get the error message: Value cannot be null. (Parameter 'returnType') . I am running prowlarr as a service ...
Read more >Database Error: Column 'assignee' cannot be null
BatchUpdateException: Column 'assignee' cannot be null. If we assign the user task to an assignee, then the problem no longer happens.
Read more >Template must not be null - Common causes and quick fixes
Template must not be null – How to solve this Elasticsearch error ... in a private subnet without internet access, you cannot install...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
please do the following query in order to check that all the documents have values in this field. meaning this query should return 0 documents:
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: After about 15 minutes and a few reboots, the two buggy shards started working and I am getting 5/5 successful now. So if anyone else has the same problem - import, reindex and then wait a while while shards rebuild.