Hi ,

Im using "text_general" fieldType for searching in SOLR. while searching
keywords along with special characters not getting proper results and
getting errors. used special characters like below.
1) - 
2) &
3) +

QUERY :: 

*solr?q=Healing - Live*
*solr?q=Healing & Live*
*solr?q=Healing ? Live*

Error  message:

The request sent by the client was syntactically incorrect
(org.apache.lucene.queryParser.ParseException: Cannot parse '("Healing \':
Lexical error at line 1, column 8. Encountered: <EOF> after : "\"Healing
\\").


schema.xml
-----------

<fieldType name="text_generalold" class="solr.TextField"
positionIncrementGap="100">
      <analyzer type="index">
        <tokenizer class="solr.StandardTokenizerFactory"/>              
        <filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt" enablePositionIncrements="true" />
                <filter class="solr.ASCIIFoldingFilterFactory" />
        <filter class="solr.LowerCaseFilterFactory"/>
      </analyzer>
      <analyzer type="query">
        <tokenizer class="solr.StandardTokenizerFactory"/>
        <filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt" enablePositionIncrements="true" />
        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
ignoreCase="true" expand="true"/>
                <filter class="solr.ASCIIFoldingFilterFactory" />
        <filter class="solr.LowerCaseFilterFactory"/>
      </analyzer>
    </fieldType>


<field name="title"             type="text_general"     indexed="true"  
stored="true" />

<field name="text" type="text_general" indexed="true" stored="false"
multiValued="true"/>

<defaultSearchField>text</defaultSearchField>

<copyField source="title" dest="text"/>

Please suggest me in this, and thanks in advance.

AnilJayanti



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Problem-with-Special-Characters-in-SOLR-Query-tp4010712.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to