Reputation: 75
I have a list of keywords (+- six words) and I need a query that taking into account the proximity matching between keywords. The retrieval documents don't need to has all the keywords, but the documents that have these keywords more proximity will be more relevant.
I tried text:"word1 word2 word3 word4 word5 word6"~5
but no documents was retrieval. I think this is due to a large number of keywords and the need for them to be close.
I tried too text:word1 text:word2 text:word3 text:word4 text:word5 text:word6
but this query don't take into account proximity matching between words.
Upvotes: 0
Views: 331
Reputation: 824
Try to increase the proximity value e. g. "word1 word2 word3 word4 word5 word6"~15 and combine it with additional boolean queries. So you get:
text:("word1 word2 word3 word4 word5 word6"~15 word1 word2 word3 word4 word5 word6)
Documents containing the words within 15 words should now be ranked higher than documents with the words anywhere or only some of the words.
Adjust the proximity value to your needs.
Upvotes: 1