Hyphens tokens duplicate terms!

Hi,
I have two docs:

  1. Word:"apple-apple "
  2. Word:"apple-carrot"

And i want this way:
1When i type: "apple-apple" see only apple-apple
When i typing "apple" see both
And when typing "apple carrot" see only apple-carrot
Is it possible?
I try wordelimitre indextime and get only
'Apple-apple',apple,apple ,appleapple
Apple-carrot,apple,carrot,applecarrot
How i can here change hyphen to space?
Just get apple-apple,apple apple,apple,apple)

Easy solution to have two analyzers for two fields, but i am not sure it will work like i want

Did you look at the prefix query, if possible ?

https://www.elastic.co/guide/en/elasticsearch/reference/5.4/query-dsl-prefix-query.html

1 Like

If i will use this query, then i must to know all of possible prefix , it is not possible(((
any way thanks

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.