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

Michael McCandless commented on LUCENE-1424:
--------------------------------------------

Patch looks good!  Thanks Mark.

I think we should indeed "factor up" into MultiTermQuery the ability to create 
a ConstantScoreQuery out of the filter generated by enumerating the terms and 
walking the docs for those terms?  Then we don't need to special case in each 
of the subclasses.

Maybe we can then fix Wildcard/Prefix/RangeFilter to create the corresponding 
query and then ask it for its filter (assuming we make a method eg 
"getDocIdSet" in MultiTermQuery)?  Or I guess we could just make a 
QueryWrapperFilter around the corresponding query, though that seems rather 
roundabout.  I don't think we need to have duplicated code in PrefixFilter, 
RangeFilter, WildcardFilter.

{quote}
When I was talking about deprecating constantscorequery being awkward, its 
wasnt really in the implementation sense (i think we can leave it as is), but 
more the deprecating one of the newest queries already  Still don't consider 
that a huge deal though.
{quote}

Well ... this is just how software evolves :)  You can't control which code 
will be the "victim" of a nice refactoring.  It's a healthy sign of progress, 
and progress is good!

bq. rangequery is not as expressive as constantscorequery, which can have 
separate inclusive/exclusive ends.

If we do deprecate ConstantScoreRangeQuery (I think we should) then we could 
add a ctor to RangeQuery matching ConstantScoreRangeQuery's more expressive one?

> 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, LUCENE-1424.patch, 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