-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Indexing documents for suggestion #28265
Labels
feedback_needed
:Search Relevance/Suggesters
"Did you mean" and suggestions as you type
Team:Search Relevance
Meta label for the Search Relevance team in Elasticsearch
Comments
Hi @CrazyPersonThirtyNine, could you make your "steps to reproduce" more precise, ideally something that we can run on a clean installation and see the problem you're trying to describe? |
DaveCTurner
added
feedback_needed
:Search Relevance/Suggesters
"Did you mean" and suggestions as you type
labels
Jan 17, 2018
Ty for checking quickly, I've added more info as it wasn't so clear at first. |
Is this fixed in version 5.3.2? I have the same exception:
|
Nope only in 6.4: |
javanna
added
the
Team:Search Relevance
Meta label for the Search Relevance team in Elasticsearch
label
Jul 12, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
feedback_needed
:Search Relevance/Suggesters
"Did you mean" and suggestions as you type
Team:Search Relevance
Meta label for the Search Relevance team in Elasticsearch
Bug: Indexing documents for suggestions results in exceptions.
Elasticsearch version : 5.3
Plugins installed: None.
JVM version (
java -version
): 1.8.XOS version Windows.
Description of the problem including expected versus actual behavior:
Expected normal indexing - It does index the documents in the end.
However it throws exceptions in Lucene and I'm not sure how it affects the JVM and elastic.
The exception:
IlegalArgumentException value must have a length > 0.
(SuggestField- Ctor)
Steps to reproduce:
Create an index with a Completion type. (Simple analyzer).
Mapping looks like this:
Index a document:
Post request:
Using a bulk request:
I use the C# nest api with a SuggestRequest. (as stated in the docs:
https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/suggest-usage.html )
Related stackoverflow topic:
https://stackoverflow.com/questions/48193721/empty-value-generates-mapper-parsing-exception-for-elasticsearch-completion-sugg
So I've followed the stack trace to reach into 2 pages:
The SuggestField in Lucene which throws:
https://github.com/apache/lucene-solr/blob/master/lucene/suggest/src/java/org/apache/lucene/search/suggest/document/SuggestField.java
Line: 89
And the code in elastic:
https://github.com/elastic/elasticsearch/blob/master/server/src/main/java/org/elasticsearch/index/mapper/CompletionFieldMapper.java
Line 465
The indexing method was by your docs:
https://www.elastic.co/guide/en/elasticsearch/reference/5.3/search-suggesters-completion.html
I tried different ways of tackling it with no luck.
I enursed the data I send is not empty (Has values and the array is not empty).
Thanks!
The text was updated successfully, but these errors were encountered: