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

Paul Elschot commented on SOLR-4834:
------------------------------------

>From the Lucene In Action book, 2nd edition:

{quote}
Unlike the standard QueryParser, the Surround parser doesn’t use an analyzer.
This means that the user will have to know precisely how terms are indexed. For
indexing texts to be queried by the Surround language, we recommend that you 
use a
lowercasing analyzer that removes only the most frequently occurring 
punctuations.
{quote}

Nevertheless, to use an analyzer for the queries, one can override some of the 
protected methods of the Surround QueryParser to use the analyzer.
                
> Surround QParser should enable query text analysis
> --------------------------------------------------
>
>                 Key: SOLR-4834
>                 URL: https://issues.apache.org/jira/browse/SOLR-4834
>             Project: Solr
>          Issue Type: Improvement
>          Components: query parsers
>    Affects Versions: 4.3
>            Reporter: Isaac Hebsh
>              Labels: analysis, qparserplugin, surround
>             Fix For: 5.0, 4.4
>
>
> When using surround query parser, the query terms are not being analyzed. The 
> basic example is lower case, of course. This is probably an intended 
> behaviour, not a bug.
> I suggest one more query parameter, which determines whether to do analysis 
> or not. something like this:
> {code}
> _query_:"{!surround df=myfield analyze=true}SpinPoint 7n GB18030"
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to