FAQ
I was wondering if anyone could explain the following weird behavior that I'm
experiencing when boosting BooleanQuery's:

When I create a TermQuery, add it as a SHOULD clause to a BooleanQuery, and
boost that BooleanQuery, the boost shows up when I run
IndexSearcher.explain(). However, when I add a second TermQuery as a SHOULD
clause to that same BooleanQuery, and still boost the BooleanQuery, the
boost is nowhere to be found in the output of IndexSearcher.explain(). Note
that the two TermQuery's added as SHOULD's to the BooleanQuery are
identical.

Any help would be much appreciated!

Thanks,

Tavi
--
View this message in context: http://www.nabble.com/Trouble-Boosting-BooleanQuery%27s-with-Multiple-Clauses-tp19099258p19099258.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


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

Search Discussions

  • Chris Hostetter at Aug 31, 2008 at 4:03 am
    : When I create a TermQuery, add it as a SHOULD clause to a BooleanQuery, and
    : boost that BooleanQuery, the boost shows up when I run
    : IndexSearcher.explain(). However, when I add a second TermQuery as a SHOULD
    : clause to that same BooleanQuery, and still boost the BooleanQuery, the
    : boost is nowhere to be found in the output of IndexSearcher.explain(). Note

    Does the numeric value for the explanation match the (raw) score you get
    from actaully searching for that doc?

    We have some pretty exhaustive tests to verify that the "match" and
    "value" info for all of the Explanation objects of basic query types
    (including BooleanQuery) are correct -- but i don't think there are any
    tests that inspect the structure of the Explanation to ensure that it
    breaks the information down in any particular way. The Boost info might
    be encapsulated into something else and not entirely obvious (It's been a
    while since i looked at BooleanWeight internals, the boost might be pushed
    down to the other clauses)

    It would also help if you could send a short code sample showing exactly
    what you are trying and what output you are getting so there's no
    confusion about what it is you are testing.

    the optimal situation would be if you could send a JUnit test
    demonstrating your problem.



    -Hoss


    ---------------------------------------------------------------------
    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 22, '08 at 12:07a
activeAug 31, '08 at 4:03a
posts2
users2
websitelucene.apache.org

2 users in discussion

Tavi Nathanson: 1 post Chris Hostetter: 1 post

People

Translate

site design / logo © 2022 Grokbase