Next, if you search for the phrase «some help» – it would search by the
following logic: «(some AND help) OR hhhhhhhhh». As a result, records «some
support» also will be in search output. Finally, the score of records «some
help» for that request must be bigger than the score of records «some
support».
How can I implement this in ES?
P.S.: the fact is that I already have an active project and I would like to
migrate it to ES.
I think you can do it using different analyzers for the same field. One won't
touch the field, the other one will index the synonym.
Have a look at the multifield feature:
Next, if you search for the phrase «some help» – it would search by the
following logic: «(some AND help) OR hhhhhhhhh». As a result, records «some
support» also will be in search output. Finally, the score of records «some
help» for that request must be bigger than the score of records «some
support».
How can I implement this in ES?
P.S.: the fact is that I already have an active project and I would like to
migrate it to ES.
Multifield is a great idea. It helped me. Thank you.
Now I’m trying to adept it for other use (search feature) but I don’t
understand how to do that.
I call it "minus words".
Example: I have dictionary, like "some help=>small". And have 3 documents:
"some help", "small some help", "big some help".
And when I search "some help" I should find "some help" and "big some help"
but not "small some help" (or "some help small", or "some help very
small"). This result is equal query "NOT small AND some AND help".
But if I search "small some help" this doc should be found.
First of all, I made synonym filter: "some help=>small". Then I made
multifield with this filter.
I tryed to use various ways but still can’t find right one.
Big problem is that if you have phrase that is not from dictionary – it
stay as is.
Have I possibility to remove "ALPHANUM" tokens? Or may be I can filter by
token type? Or may be you have some other ideas?
четверг, 13 декабря 2012 г., 16:44:36 UTC+3 пользователь David Pilato
написал:
Next, if you search for the phrase «some help» – it would search by the
following logic: «(some AND help) OR hhhhhhhhh». As a result, records «some
support» also will be in search output. Finally, the score of records «some
help» for that request must be bigger than the score of records «some
support».
How can I implement this in ES?
P.S.: the fact is that I already have an active project and I would like
to migrate it to ES.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.