[ 
https://issues.apache.org/jira/browse/SOLR-2015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12891972#action_12891972
 ] 

Robert Muir commented on SOLR-2015:
-----------------------------------

bq. How can I implement "on a per-field basis"?

For per-field control, you must do it in your subclass instead of the flag.
The easiest way is this:

{code}
@Override
protected Query getFieldQuery(String field, String queryText, boolean quoted) {
// if we should generate for this field, then hardcode 'true' as quoted.
// so this means all whitespace-separated parts of the query are treated as 
quoted.
if (shouldAutoGeneratePhrasesFor(field))
  Query = super.getFieldQuery(field, queryText, true);
else
  Query = super.getFieldQuery(field, queryText, quoted);
}
{code}


> add a config hook for autoGeneratePhraseQueries
> -----------------------------------------------
>
>                 Key: SOLR-2015
>                 URL: https://issues.apache.org/jira/browse/SOLR-2015
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 3.1, 4.0
>            Reporter: Koji Sekiguchi
>            Priority: Minor
>             Fix For: 3.1, 4.0
>
>         Attachments: SOLR-2015.patch
>
>
> After committed LUCENE-2458, a hook for autoGeneratePhraseQueries will be 
> convenient for some situation.

-- 
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