Searching on list in a document using highlight


(Abhishek Wahi) #1

Hi all,

I am applying the prefix query on list field and using highlight query to see the matched result but it is giving first five matches. But according to requirement i want last entries in best match as my use case is to suggest search from your recent searched strings. Please suggest.


(Mark Harwood) #2

Try change the number_of_fragments setting


(Abhishek Wahi) #3

But list count cannot be assumed, it is increasing day by day. Also, it is not good in performance also.


(Mark Harwood) #4

Unbounded growth of a document is not a good strategy.
Indices are designed to scale but not individual docs.
I suggest you either:

  1. Cap the number of recent searches you keep in a user profile doc or
  2. Have one doc per search saved then use sort in your query requests to get the last N

(system) #5

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