Hi Anil,
Decision also depends on your usecase - if you are sure that there will
be no cases where documents matches are of different score or you don't
care about how well document match query (e.g. all queries will be
single term query) then sorting by time is way to go. But, if there is
chance that some doc will end up being first because it was the latest
even it poorly matches query, then sort by time is not an option.
In cases like this I usually go with extreme - imagine you forgot to
remove frequent "X" from stopwords and you search for "A X B". If you
are OR-ing in queries, top document will be the one added the last one
with X regardless if it has A or B. If there is chance of such scenario,
you should use boost - it may be slightly more expensive, but much safer.
Regards,
Emir
On 22.02.2016 11:39, Anil wrote:
Hi,
we would like to display recent records on top.
two ways
1. boost by create time desc
2. sort create time by desc
i tried both, seems both looks good.
which one is better in terms of performance ?
i noticed, sort is good than boost in terms of performance.
Please correct me if I am wrong.
Regards,
Anil
--
Monitoring * Alerting * Anomaly Detection * Centralized Log Management
Solr & Elasticsearch Support * http://sematext.com/