Exact match against long queries

I'm trying to use Elasticsearch in a situation similar to a reverse search, but I'm having trouble finding the right approach.

My objective is to find exact requirements inside a long query string.

Example:

My Indexed documents:

  • must be faster than 50mph
  • must jump higher than a tree
  • be able to stand on two feet

My query:

"We are looking for an animal that must be able to stand on two feet, also must jump higher than a tree, and should be faster than 40mph, and has white and red stripes with wings"

What results I expect (exact matches, case insentitive):

  • be able to stand on two feet
  • must jump higher than a tree

What results I am getting (partial matches):

  • be able to stand on two feet
  • must jump higher than a tree
  • must be faster than 50mph

I've tried shingles and percolate, but no success.
Anyone have any pointers?

For anyone that comes across this issue on the future:
The documentation is not very clear, but the type of query that you store on the percolator index has a direct impact on the result. So, if you want full match, you can store a "match_phrase" query.

ES 6.5

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