lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <>
Subject [jira] Commented: (LUCENE-1424) Add ConstantScorePrefixQuery and ConstantScoreWildcardQuery
Date Mon, 03 Nov 2008 20:48:44 GMT


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,

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.

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

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:
>             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:
For additional commands, e-mail:

View raw message