Skip to content
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

Empty string with completion type results in IllegalArgumentException #23121

Closed
bjfish opened this issue Feb 10, 2017 · 3 comments
Closed

Empty string with completion type results in IllegalArgumentException #23121

bjfish opened this issue Feb 10, 2017 · 3 comments
Assignees
Labels
>bug :Search Relevance/Suggesters "Did you mean" and suggestions as you type Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch

Comments

@bjfish
Copy link

bjfish commented Feb 10, 2017

Elasticsearch version:
5.2.0

Description of the problem including expected versus actual behavior:

Result is IllegalArgumentException. Expected empty strings to be ignored.

Is this an issue? If not, is there a recommended resolution?

Steps to reproduce:
In Sense:

PUT twitter
{
  "mappings": {
    "tweet": {
      "properties": {
        "message": {
          "type": "completion"
        }
      }
    }
  }
}

PUT twitter/tweet/3
{
    "message" : ""
}

Edit: Updated description to simpler example.

@clintongormley
Copy link

I agree - empty string should be ignored.

Simpler recreation:

PUT twitter
{
  "mappings": {
    "tweet": {
      "properties": {
        "message": {
          "type": "completion"
        }
      }
    }
  }
}

PUT twitter/tweet/3
{
    "message" : ""
}

@clintongormley clintongormley added :Search Relevance/Suggesters "Did you mean" and suggestions as you type >bug labels Feb 12, 2017
@bjfish bjfish changed the title Empty string completion type IllegalArgumentException Empty string with completion type results in IllegalArgumentException Feb 12, 2017
@floflock
Copy link

floflock commented Jan 1, 2018

Have the same issue. Does anyone have a solution for that?

@jimczi jimczi self-assigned this Jan 1, 2018
jimczi added a commit to jimczi/elasticsearch that referenced this issue Jan 18, 2018
This change makes sure that an empty completion input does not throw an IAE when indexing.
Instead the input is simply ignored.

Closes elastic#23121
@andyb-elastic
Copy link
Contributor

@elastic/es-search-aggs

Jim has a PR open for this #28289

jimczi added a commit to jimczi/elasticsearch that referenced this issue May 18, 2018
This change makes sure that an empty completion input does not throw an IAE when indexing.
Instead the input is ignored and the completion field is added in the list of ignored fields
for the document.

Closes elastic#23121
jimczi added a commit that referenced this issue May 22, 2018
This change makes sure that an empty completion input does not throw an IAE when indexing.
Instead the input is ignored and the completion field is added in the list of ignored fields
for the document.

Closes #23121
jimczi added a commit that referenced this issue May 22, 2018
This change makes sure that an empty completion input does not throw an IAE when indexing.
Instead the input is ignored and the completion field is added in the list of ignored fields
for the document.

Closes #23121
@javanna 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
>bug :Search Relevance/Suggesters "Did you mean" and suggestions as you type Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch
Projects
None yet
Development

No branches or pull requests

7 participants