FAQ
Hi,

Currently when I type in Arcos Bioscience in my lucene search, it returns all those documents with
either Arcos or Bioscience at the top of the search results and the actual document containing

"Arcos Bioscience" somewhere in the middle/bottom.

The desired behavior is to rank those documents that contain the terms Arcos and Bioscience next
to each other higher than those that contain either of the terms or contain both the terms but which far
away from each other.

When I search the same term with quotes "Arcos Bioscience" in the term, it gives the exact document that
contains the term and nothing else.

In general, how would I modify the system in such a way that the documents containing "exact term" are shown
first and also the documents with either "exact" or "term" are shown later (without just showing one result).

Thanks
Deepak Konidena.

Search Discussions

  • Sujit Pal at Apr 26, 2011 at 7:00 pm
    Hi Deepak,

    Would something like this work in your case?

    "Arcos Bioscience"^2.0 "Arcos" "Bioscience"

    ie, a BooleanQuery with the full phrase boosted OR'd with a query on
    each word?

    -sujit
    On Tue, 2011-04-26 at 14:46 -0400, Deepak Konidena wrote:
    Hi,

    Currently when I type in Arcos Bioscience in my lucene search, it returns all those documents with
    either Arcos or Bioscience at the top of the search results and the actual document containing

    "Arcos Bioscience" somewhere in the middle/bottom.

    The desired behavior is to rank those documents that contain the terms Arcos and Bioscience next
    to each other higher than those that contain either of the terms or contain both the terms but which far
    away from each other.

    When I search the same term with quotes "Arcos Bioscience" in the term, it gives the exact document that
    contains the term and nothing else.

    In general, how would I modify the system in such a way that the documents containing "exact term" are shown
    first and also the documents with either "exact" or "term" are shown later (without just showing one result).

    Thanks
    Deepak Konidena.

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Erick Erickson at Apr 26, 2011 at 10:22 pm
    You can also specify a large slop in your phrase (e.g.
    "arcos biosciences"~500 which will take distance into
    account when scoring, although it may not be enough
    to rank the document where you want. Sujit's comment
    is probably a better place to start.

    Best
    Erick
    On Tue, Apr 26, 2011 at 2:59 PM, Sujit Pal wrote:
    Hi Deepak,

    Would something like this work in your case?

    "Arcos Bioscience"^2.0 "Arcos" "Bioscience"

    ie, a BooleanQuery with the full phrase boosted OR'd with a query on
    each word?

    -sujit
    On Tue, 2011-04-26 at 14:46 -0400, Deepak Konidena wrote:
    Hi,

    Currently when I type in Arcos Bioscience in my lucene search, it returns all those documents with
    either Arcos or Bioscience at the top of the search results and the actual document containing

    "Arcos Bioscience" somewhere in the middle/bottom.

    The desired behavior is to rank those documents that contain the terms Arcos and Bioscience next
    to each other higher than those that contain either of the terms or contain both the terms but which far
    away from each other.

    When I search the same term with quotes "Arcos Bioscience" in the term, it gives the exact document that
    contains the term and nothing else.

    In general, how would I modify the system in such a way that the documents containing "exact term" are shown
    first and also the documents with either "exact" or "term" are shown later (without just showing one result).

    Thanks
    Deepak Konidena.

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
    ---------------------------------------------------------------------
    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
postedApr 26, '11 at 6:47p
activeApr 26, '11 at 10:22p
posts3
users3
websitelucene.apache.org

People

Translate

site design / logo © 2022 Grokbase