FAQ
What do I want to do is just like Google search results. The results in the
first page is the most relevant and also recent documents, but not
absolutely sorted by time desc.

--
cheers,
Johnbin Wang

Search Discussions

  • Ian Lea at May 9, 2011 at 10:32 am
    Well, you can use one of the sorting search methods and pass multiple
    sort keys including relevance and a timestamp. But I suspect the
    Google algorithm may be a bit more complex than that.

    One technique is boosting: set an index time document boost on recent
    documents. Of course what is recent today may not be next week.
    There are other, more complex ways of customizing lucene scoring. A
    Google search for something like "customized lucene scoring" will find
    lots of info, some recent, some older, but probably all relevant one
    way or another.


    --
    Ian.

    On Mon, May 9, 2011 at 4:59 AM, Johnbin Wang wrote:
    What do I want to do is just like Google search results.  The results in the
    first page is the most relevant and also recent documents, but not
    absolutely sorted by  time desc.

    --
    cheers,
    Johnbin Wang
    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Johnbin Wang at May 11, 2011 at 1:13 am
    Thanks for your suggestion!

    I try to set document boost factor when indexing document. In order to
    bubble up recent documents' scores, I set last three month's documents'
    boost to 2 , and set other documents' boost factor to 0.5. The I search
    index sorting by two fields, lucene default score and time desc. The sorting
    results seem good. It meet my requirement.
    On Mon, May 9, 2011 at 6:31 PM, Ian Lea wrote:

    Well, you can use one of the sorting search methods and pass multiple
    sort keys including relevance and a timestamp. But I suspect the
    Google algorithm may be a bit more complex than that.

    One technique is boosting: set an index time document boost on recent
    documents. Of course what is recent today may not be next week.
    There are other, more complex ways of customizing lucene scoring. A
    Google search for something like "customized lucene scoring" will find
    lots of info, some recent, some older, but probably all relevant one
    way or another.


    --
    Ian.

    On Mon, May 9, 2011 at 4:59 AM, Johnbin Wang wrote:
    What do I want to do is just like Google search results. The results in the
    first page is the most relevant and also recent documents, but not
    absolutely sorted by time desc.

    --
    cheers,
    Johnbin Wang
    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org

    --
    cheers,
    Johnbin Wang
  • Otis Gospodnetic at May 12, 2011 at 5:25 am
    If only you were using Solr....
    http://wiki.apache.org/solr/DisMaxQParserPlugin#bf_.28Boost_Functions.29


    Otis
    ----
    Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch
    Lucene ecosystem search :: http://search-lucene.com/


    ----- Original Message ----
    From: Johnbin Wang <johnbin.wang@gmail.com>
    To: java-user@lucene.apache.org
    Sent: Sun, May 8, 2011 11:59:11 PM
    Subject: How do I sort lucene search results by relevance and time?

    What do I want to do is just like Google search results. The results in the
    first page is the most relevant and also recent documents, but not
    absolutely sorted by time desc.

    --
    cheers,
    Johnbin Wang
    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupjava-user @
categorieslucene
postedMay 9, '11 at 3:59a
activeMay 12, '11 at 5:25a
posts4
users3
websitelucene.apache.org

People

Translate

site design / logo © 2022 Grokbase