Consider recent documents when querying?


i was wondering if you guys can help me, we are using ES 6 version and NEST for queries.
Our document structure has a recently modified date.

In NEST, is there a way we can tell the query to consider more recent documents when searching?

I dont want to do post-filtering of results to sort them by their latest modified date.

Is there any provisions for that?

(Christoph) #2

I don't exactly know how to do this with the NEST client, but to include the recently modified date into your scoring function you would typically use the function score query. If it is enough to just sort the top K search hits by the modified date, you can also look into Rescoring by sorting on that field.

(system) #3

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