search - Elasticsearch term suggester return stemmed results -


Why are elasticsearch term advisory results stemmed? When I do this query:

  curl -XPOST 'localhost: 9200 / post / _suggest' -d '{"my-suggestion": {"text": "manager", "word" The expected result should be "manager", but I get "manag" back:  
 <"field": "body"}}} '  

Code: {"" "": "," successful ": 5," failed ": 0}," mine-suggestion -1 ": [{" text ":" mang "," offset ": 0," 0.75 , "Freq": 180}, {"text": "money", "score": 0.75, "freq": [6] "options": [{"text": "manag", "score": 6} ]}}}}

edit

I found a solution to my problem: I Added a standard analyzer to the query. "Maler", "word": {"analyzer":

  curl -XPOST 'localhost: 9200 / post / _ notice' -d '{"my -suggestion ": {" text "" standard "," area ":" body "}}} '  

Now the results are good:

  { "," "{{" Text ":" mang "," offset ": 0," length ": 6," _shards ":" total "," successful ": 5," failed ": 0}," mine-suggestion " "Option": [{"Text": "Manager", "Score": 0.75, "freq": 180}, {"Text": "Manual", "Score": 0.75, "freq": 6}]} ]}   

But I run any other similar problem with the agencies Is:

  {"aggs": {"city": {"conditions": {"field": "location"}}}}   

I get the result: ("total": 5, "successful": 5, "failed": 0}, "hit": {"total": 473, "max_score": 0.0, "hit": []} , "", "Aggregation": {"city": {"bucket": [{"key": "lander", "dock_mount": 244}, {"key": "shift", "doc_count": 244}, {" Key ":" Tang "," doc_count ": 12}, {" Key ":" Agad "," doc_count ": 8} Works on the word" word "made of the original word. Token and disable through tokenization and hard work, you need to mark the field as "not_analyzed" in your index mapping.

I have never used consultants, but it seems that you need to disable stemming for that area, but enable tokenization in the field of your indicator there can be two versions - Search For one (token and taut) and for a suggestion (token, but non-stemmed)

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -