I guess this is because Lucene QP is interpreting the 'OR' operator.
You can either:
     use lowercase
     use other query parser, like the term query parser. See
http://lucene.apache.org/solr/api/org/apache/solr/search/TermQParserPlugin.html

Also, if you just removed the "or" term from the stopwords, you'll probably
have to reindex if you want it in the index.

Regards,

Tomás

On Thu, Aug 11, 2011 at 2:38 PM, John Brewer
<john.bre...@atozdatabases.com>wrote:

> Hello,
>
>  I am looking for some advice on how to index and search a field that
> contains a two character state name without the query parser dying on the OR
> and also not treating it as an 'OR' Boolean operator.
>
>  For example:
>
>  The following query with a filter query key/value pair causes an
> exception:
>
>  q=*:*&fq=(state:OR)
>
> Caused by: org.apache.lucene.queryParser.ParseException: Encountered " <OR>
> "OR "" at line 1, column 7.
> Was expecting one of:
>    "(" ...
>    "*" ...
>    <QUOTED> ...
>    <TERM> ...
>    <PREFIXTERM> ...
>    <WILDTERM> ...
>    "[" ...
>    "{" ...
>    <NUMBER> ...
>
>  Note: we had the same issue with Indiana (IN), but removing that stop word
> fixed it. Removing the stopword 'or', has not helped.
>
>  The field itself is indexed and stored as string field during indexing.
>   <field name="state" type="string" indexed="true" stored="true"/>
>
>
> Thanks in advance,
> John Brewer
>
>

Reply via email to