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

Robert Muir commented on LUCENE-3395:
-------------------------------------

{quote}
i mainly don't see any harm in adding these options to TermQuery, we can do it 
so that TermScorer is only wrapped if these options are used, so theres no 
performance downside for existing users who don't care.
{quote}

Well I think there is a downside? Because if we hook it straight into this 
query, then someone will want it in SpanTermQuery, and PayloadTermQuery, and 
PhraseQuery, and their own queries???...

{quote}
1) Is there a straight forward / easy template for non-expert java users to 
take an arbitrary Query and override it's Scorer with a wrapper like this?
{quote}

Yes! I think we should make a query that wraps another query to do this? 
Similar to ConstantScoreQuery?


> FreqFilteringScorerWrapper and min/max freq options on TermQuery
> ----------------------------------------------------------------
>
>                 Key: LUCENE-3395
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3395
>             Project: Lucene - Java
>          Issue Type: New Feature
>            Reporter: Hoss Man
>         Attachments: LUCENE-3395.patch
>
>
> A Solr User was asking about how specify a minimum tf when searching for a 
> term (ie: documents matching "dog" at least 3 times).
> Based on a conversation with rmuir on IRC, that led me to realize that we now 
> explicitly expose a general "freq()" method on Scorer, and that min/max freq 
> constraints could be implemented as a general Scorer Wrapper.
> I propose that we add such a wrapper, and add 
> setMinFreq(float)/setMaxFreq(float) methods to TermQuery (similar to the 
> minNumShouldMatches and disableCoord type setters in BooleanQuery) that cause 
> it to be used automatically.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to