lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoss Man (JIRA)" <>
Subject [jira] Commented: (LUCENE-1424) Add ConstantScorePrefixQuery and ConstantScoreWildcardQuery
Date Sat, 25 Oct 2008 15:48:45 GMT


Hoss Man commented on LUCENE-1424:

bq. Is there any reason to keep the rewrite-to-BooleanQuery

In addition to the coord example Mark mentioned, there are also cases where the tf and idf
values for terms matching a wildcard/prefix are meaningful ... but the other advantage to
keeping the existing implementations is use cases where the number of unique terms a query
expands to is  is very small, but the number of documents matched is very large ... in theory
(but i haven't tested this) the expanding queries should be more efficient in space and equally
efficient in time as the ConstantScore equivalents.

bq. It would then be possible to just switch the QueryParser or other code by e.g. setting
a global (static) flag.

I'm loath to see more static "setter" methods added to query clauses, but there's no reason
this couldn't be a member property on instances of the classes with corresponding properties
on QueryParser.

In theory it could even be a tertiary state property: REWRITE_TO_BOOLEAN, REWRITE_TO_CONSTANT_SCORE.
REWRITE_GUESS ... where the third option caused the REWRITE method to make it's best guess
using a first pass at the TermEnum iteration and aborting if the number of terms get's above
some threshold.

(but that kind of "optimization" would be premature without testing .. the point is it would
be possible)

> Add ConstantScorePrefixQuery and ConstantScoreWildcardQuery
> -----------------------------------------------------------
>                 Key: LUCENE-1424
>                 URL:
>             Project: Lucene - Java
>          Issue Type: New Feature
>            Reporter: Mark Miller
>            Assignee: Michael McCandless
>            Priority: Minor
>         Attachments: LUCENE-1424.patch
> If we want to be able to highlight these queries, they need to be added to Lucene core
or contrib (solr's WildCardFilter can be used to create the ConstantScoreWildcardQuery). They
are very useful anyway.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message