FAQ
CustomScoreQuery only allows the secondary queries to be of type
ValueSourceQuery instead of allowing them to be any type of Query. Why
is that? Is there something that makes it hard to implement for
arbitrary queries?

Steve

P.S. I played around with this briefly, and simply replacing all
ValueSourceQuery references with Query references yields only one simple
compile error, where ValueSourceQuery.createWeight() is being used
instead of Query.weight() for some reason.

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

Search Discussions

  • Doron Cohen at Apr 21, 2009 at 7:47 am
    CustomScoreQuery expects the VSQs to have a score for document matching the
    (main) subQuery - this does not hold for arbitrary queries.
    On Sat, Apr 18, 2009 at 2:35 AM, Steven Bethard wrote:

    CustomScoreQuery only allows the secondary queries to be of type
    ValueSourceQuery instead of allowing them to be any type of Query. Why
    is that? Is there something that makes it hard to implement for
    arbitrary queries?

    Steve

    P.S. I played around with this briefly, and simply replacing all
    ValueSourceQuery references with Query references yields only one simple
    compile error, where ValueSourceQuery.createWeight() is being used
    instead of Query.weight() for some reason.

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Steven Bethard at Apr 21, 2009 at 4:59 pm

    On 4/21/2009 12:47 AM, Doron Cohen wrote:
    CustomScoreQuery expects the VSQs to have a score for document matching the
    (main) subQuery - this does not hold for arbitrary queries.
    Sure, but it could easily assign 0.0 scores for sub-queries that didn't
    match, no?

    Steve
    On Sat, Apr 18, 2009 at 2:35 AM, Steven Bethard wrote:

    CustomScoreQuery only allows the secondary queries to be of type
    ValueSourceQuery instead of allowing them to be any type of Query. Why
    is that? Is there something that makes it hard to implement for
    arbitrary queries?

    Steve

    P.S. I played around with this briefly, and simply replacing all
    ValueSourceQuery references with Query references yields only one simple
    compile error, where ValueSourceQuery.createWeight() is being used
    instead of Query.weight() for some reason.

    ---------------------------------------------------------------------
    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
  • Doron Cohen at Apr 21, 2009 at 5:09 pm
    It could, but (historically and) currently it doesn't... :)
    I actually have code for this.
    Would you like open a JIRA issue for this - I'll attach my wrapper there?

    Doron
    On Tue, Apr 21, 2009 at 7:58 PM, Steven Bethard wrote:
    On 4/21/2009 12:47 AM, Doron Cohen wrote:
    CustomScoreQuery expects the VSQs to have a score for document matching the
    (main) subQuery - this does not hold for arbitrary queries.
    Sure, but it could easily assign 0.0 scores for sub-queries that didn't
    match, no?

    Steve
    On Sat, Apr 18, 2009 at 2:35 AM, Steven Bethard <bethard@stanford.edu
    wrote:
    CustomScoreQuery only allows the secondary queries to be of type
    ValueSourceQuery instead of allowing them to be any type of Query. Why
    is that? Is there something that makes it hard to implement for
    arbitrary queries?

    Steve

    P.S. I played around with this briefly, and simply replacing all
    ValueSourceQuery references with Query references yields only one simple
    compile error, where ValueSourceQuery.createWeight() is being used
    instead of Query.weight() for some reason.

    ---------------------------------------------------------------------
    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
  • Steven Bethard at Apr 21, 2009 at 11:07 pm

    On 4/21/2009 10:09 AM, Doron Cohen wrote:
    It could, but (historically and) currently it doesn't... :)
    I actually have code for this.
    Would you like open a JIRA issue for this - I'll attach my wrapper there?
    Done.

    https://issues.apache.org/jira/browse/LUCENE-1608

    Steve
    On Tue, Apr 21, 2009 at 7:58 PM, Steven Bethard wrote:
    On 4/21/2009 12:47 AM, Doron Cohen wrote:
    CustomScoreQuery expects the VSQs to have a score for document matching the
    (main) subQuery - this does not hold for arbitrary queries.
    Sure, but it could easily assign 0.0 scores for sub-queries that didn't
    match, no?

    Steve
    On Sat, Apr 18, 2009 at 2:35 AM, Steven Bethard <bethard@stanford.edu
    wrote:
    CustomScoreQuery only allows the secondary queries to be of type
    ValueSourceQuery instead of allowing them to be any type of Query. Why
    is that? Is there something that makes it hard to implement for
    arbitrary queries?

    Steve

    P.S. I played around with this briefly, and simply replacing all
    ValueSourceQuery references with Query references yields only one simple
    compile error, where ValueSourceQuery.createWeight() is being used
    instead of Query.weight() for some reason.

    ---------------------------------------------------------------------
    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


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Doron Cohen at Apr 22, 2009 at 9:26 pm
    Steve, I added a patch in https://issues.apache.org/jira/browse/LUCENE-1608,

    which allows to wrap any query in a value source, and then create a value
    source query out of it.
    Let us know how this works for you...
    Doron
    On Wed, Apr 22, 2009 at 2:07 AM, Steven Bethard wrote:
    On 4/21/2009 10:09 AM, Doron Cohen wrote:
    It could, but (historically and) currently it doesn't... :)
    I actually have code for this.
    Would you like open a JIRA issue for this - I'll attach my wrapper there?
    Done.

    https://issues.apache.org/jira/browse/LUCENE-1608

    Steve
    On Tue, Apr 21, 2009 at 7:58 PM, Steven Bethard <bethard@stanford.edu
    wrote:
    On 4/21/2009 12:47 AM, Doron Cohen wrote:
    CustomScoreQuery expects the VSQs to have a score for document matching the
    (main) subQuery - this does not hold for arbitrary queries.
    Sure, but it could easily assign 0.0 scores for sub-queries that didn't
    match, no?

    Steve
    On Sat, Apr 18, 2009 at 2:35 AM, Steven Bethard <bethard@stanford.edu
    wrote:
    CustomScoreQuery only allows the secondary queries to be of type
    ValueSourceQuery instead of allowing them to be any type of Query. Why
    is that? Is there something that makes it hard to implement for
    arbitrary queries?

    Steve

    P.S. I played around with this briefly, and simply replacing all
    ValueSourceQuery references with Query references yields only one
    simple
    compile error, where ValueSourceQuery.createWeight() is being used
    instead of Query.weight() for some reason.
  • Steven Bethard at Apr 23, 2009 at 6:13 pm

    On 4/22/2009 2:26 PM, Doron Cohen wrote:
    Steve, I added a patch in https://issues.apache.org/jira/browse/LUCENE-1608,

    which allows to wrap any query in a value source, and then create a value
    source query out of it.
    Let us know how this works for you...
    Thanks! I'll try this out in the next few days and let you know how it goes.

    Steve
    On Wed, Apr 22, 2009 at 2:07 AM, Steven Bethard wrote:
    On 4/21/2009 10:09 AM, Doron Cohen wrote:
    It could, but (historically and) currently it doesn't... :)
    I actually have code for this.
    Would you like open a JIRA issue for this - I'll attach my wrapper there?
    Done.

    https://issues.apache.org/jira/browse/LUCENE-1608

    Steve
    On Tue, Apr 21, 2009 at 7:58 PM, Steven Bethard <bethard@stanford.edu
    wrote:
    On 4/21/2009 12:47 AM, Doron Cohen wrote:
    CustomScoreQuery expects the VSQs to have a score for document matching the
    (main) subQuery - this does not hold for arbitrary queries.
    Sure, but it could easily assign 0.0 scores for sub-queries that didn't
    match, no?

    Steve
    On Sat, Apr 18, 2009 at 2:35 AM, Steven Bethard <bethard@stanford.edu
    wrote:
    CustomScoreQuery only allows the secondary queries to be of type
    ValueSourceQuery instead of allowing them to be any type of Query. Why
    is that? Is there something that makes it hard to implement for
    arbitrary queries?

    Steve

    P.S. I played around with this briefly, and simply replacing all
    ValueSourceQuery references with Query references yields only one
    simple
    compile error, where ValueSourceQuery.createWeight() is being used
    instead of Query.weight() for some reason.

    ---------------------------------------------------------------------
    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 17, '09 at 11:36p
activeApr 23, '09 at 6:13p
posts7
users2
websitelucene.apache.org

2 users in discussion

Steven Bethard: 4 posts Doron Cohen: 3 posts

People

Translate

site design / logo © 2022 Grokbase