This document is getting returned as a match as both the requirements are fulfilled inside the Field.
However, the result is incorrect, as the course and duration belong to 2 fields, and are not linked. Is there any way use match queries within specific units inside a nested structure?
The duration of English is 7 years. However, I need docs which have mathematics for 7 years together.
Not mathematics in a separate field, and 7 in a separate field as the above query returns.
I need the document to be returned if both the field matches are in the same unit, as specified in the last example
I asked because in your example you put duration of english as 8, so It confused me!
Did you read the information provided in the link? Seems like it answers your problem exactly.
According to the documentation (provided you have the correct mapping), your request should look something like :
Hey, I ran the above query.
I'm getting the correct result with a high score, but I'm also getting some incorrect ones with really low scores. Is there any reasons as to why this may be happening?
My field mapping for everything is:
{"type":"text","index": "not_analyzed","term_vector": "yes","similarity":"boolean"}
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.