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

Cannot find empty fields ("") processed by stempel (polish analyser) using exists/missing query #22645

Closed
rkoc opened this issue Jan 16, 2017 · 5 comments
Labels
feedback_needed :Search/Analysis How text is split into tokens

Comments

@rkoc
Copy link

rkoc commented Jan 16, 2017

Elasticsearch version: 2.3.4

Cannot find empty fields ("") processed by stempel (polish analyser) using exists/missing query. I have no problems with other 'standard' or 'not_anlyzed' types.

@clintongormley
Copy link

Please provide a short but complete curl reproduction of the issue, including creating the index, specifying the mappings, indexing the docs, searching, and explain what you expected to see and what you actually see. It will greatly help us to understand what the problem is.

@jsgandalf
Copy link

jsgandalf commented Mar 28, 2017

I'm on Elastic 5.2
I'm also having the same issues... I'm trying to find empty values, and have set my index mapping to keyword (which technically does not analyze so it should pick up on the "" values)

"query": {
      "term": { "MY_FIELD_TO_SEARCH": "" }
}

@colings86
Copy link
Contributor

@jsgandalf could you provide the information @clintongormley asked for above as it will greatly help in recreating (and therefore understanding and solving) this issue you are seeing

@jsgandalf
Copy link

Actually, when I reindex my database and rerun the query. It worked =)

The problem was that my field was type: text and NOT a keyword. Changed the index to keyword and reindexed:

curl -X PUT https://username:password@host.io:9200/mycoolindex

curl -X PUT https://user:pass@host.io:9200/mycoolindex/_mapping/mycooltype -d '{
  "properties": {
			    "MY_FIELD_TO_SEARCH": {
						"type": "keyword"
					},
}'

curl -X PUT https://username:password@host.io:9200/_reindex -d '{
  "source": {
    "index": "oldindex"
  },
  "dest": {
    "index": "mycoolindex"
  }
}'

I hope this helps someone who was as stuck as I was getting rid of those empty values.

@javanna
Copy link
Member

javanna commented Apr 18, 2017

thanks for getting back to us. Closing.

@javanna javanna closed this as completed Apr 18, 2017
@lcawl lcawl added :Search/Analysis How text is split into tokens and removed :Plugin Analysis Stempel labels Feb 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feedback_needed :Search/Analysis How text is split into tokens
Projects
None yet
Development

No branches or pull requests

6 participants