[ 
https://issues.apache.org/jira/browse/LUCENE-1424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12642628#action_12642628
 ] 

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: https://issues.apache.org/jira/browse/LUCENE-1424
>             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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to