FAQ
Hi,
I implemented a synonym search by using the chapter 4.6's example from
the Lucene in Action book.
Now I want to extend the example in that way, that synonyms are boosted
less that the original word the user searched for. Is there a way to do
it? If it is, I would like to get any help on how to implement that feature.

can anyone help please?


Thanks
Sven

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

Search Discussions

  • Simon Willnauer at Aug 26, 2009 at 10:10 am
    Hi Sven,
    While I have no idea bout the example in LiA I can give you some
    quick pointers.
    if you add the synonyms at query time you can assign a boost factor to
    the added synonyms that would boost the matches to a particular term
    down. -> something in the interval [0,1]
    if you add the synonyms at index time you could add a payload to the
    added synonyms and use some payload aware query for searches. See
    http://lucene.apache.org/java/2_4_0/api/core/org/apache/lucene/search/payloads/package-summary.html

    You could also index the content into two different fields on with and
    one without synonyms and set boost factors on the field. This case
    would be a little more complex and rather "dirty" but maybe its an
    option for you.

    simon


    On Wed, Aug 26, 2009 at 11:57 AM, Sven Fischerwrote:
    Hi,
    I implemented a synonym search by using the chapter 4.6's example from the
    Lucene in Action book.
    Now I want to extend the example in that way, that synonyms are boosted less
    that the original word the user searched for. Is there a way to do it? If it
    is, I would like to get any help on how to implement that feature.

    can anyone help please?


    Thanks
    Sven

    ---------------------------------------------------------------------
    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
  • Abhay kumar at Aug 26, 2009 at 10:55 am
    Hi,
    The first answer by Sven is more efficient and generaly used.

    Abhay
    @Sven
    f you add the synonyms at query time you can assign a boost factor to
    the added synonyms that would boost the matches to a particular term
    down. -> something in the interval [0,1]
    On Wed, Aug 26, 2009 at 3:40 PM, Simon Willnauer wrote:

    Hi Sven,
    While I have no idea bout the example in LiA I can give you some
    quick pointers.
    if you add the synonyms at query time you can assign a boost factor to
    the added synonyms that would boost the matches to a particular term
    down. -> something in the interval [0,1]
    if you add the synonyms at index time you could add a payload to the
    added synonyms and use some payload aware query for searches. See

    http://lucene.apache.org/java/2_4_0/api/core/org/apache/lucene/search/payloads/package-summary.html

    You could also index the content into two different fields on with and
    one without synonyms and set boost factors on the field. This case
    would be a little more complex and rather "dirty" but maybe its an
    option for you.

    simon


    On Wed, Aug 26, 2009 at 11:57 AM, Sven Fischerwrote:
    Hi,
    I implemented a synonym search by using the chapter 4.6's example from the
    Lucene in Action book.
    Now I want to extend the example in that way, that synonyms are boosted less
    that the original word the user searched for. Is there a way to do it? If it
    is, I would like to get any help on how to implement that feature.

    can anyone help please?


    Thanks
    Sven

    ---------------------------------------------------------------------
    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
postedAug 26, '09 at 9:58a
activeAug 26, '09 at 10:55a
posts3
users3
websitelucene.apache.org

People

Translate

site design / logo © 2022 Grokbase