lucenenet-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Newton <>
Subject Weighting results by 'freshness'
Date Wed, 05 Apr 2017 17:39:38 GMT
I've managed to build a nice little back end with 4.0.8 and the
free text side of things is working really well. However, I'd like to add a
weighting to the queries supplied that means that newer documents are
considered more highly (but not to outright sort by date).

I have a "created" field on all of my documents, which has been populated
using "DateTools.DateToString" with a resolution of day, but I'm uncertain
how to add a query which add weight to results based on "the higher the
value of field 'x', the better".

What would be the best way to go about this?

My current query code (in F#) looks like this:

    let parser =
            (Util.LuceneVersion.LUCENE_48, [| "title"; "content" |],
    let query = parser.Parse phrase

Many thanks,


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message