Consider recent documents when querying?

Hi,
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?
thanks

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.

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