Help with ShardParams
Hello, Can someone point me a good example or two of usage of the ShardParams shards.start and shards.rows? I have a Solr instance of 250M documents spread across 4 shards. And I need to be able to reliably and quickly access the records by "page" at the request of the user. I understand the searching limitation of the Distributed search when the start parameter gets high and have recently found the ShardParams and was hoping that this might be of some use. Thanks, John
Searching For Term 'OR'
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 "" at line 1, column 7. Was expecting one of: "(" ... "*" ... ... ... ... ... "[" ... "{" ... ... 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. Thanks in advance, John Brewer
Re: Searching For Term 'OR'
Thanks for the feedback. I'll give these a try. Tomás Fernández Löbbe wrote: >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 >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 "" at line 1, column 7. >> Was expecting one of: >>"(" ... >>"*" ... >> ... >> ... >> ... >> ... >>"[" ... >> "{" ... >> ... >> >> 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. >> >> >> >> Thanks in advance, >> John Brewer >> >>
RE: Searching For Term 'OR'
Thanks for the advice everyone. I am rebuilding the index with a lowercase field instead of string. -Original Message- From: Chris Hostetter [mailto:hossman_luc...@fucit.org] Sent: Thursday, August 11, 2011 1:10 PM To: solr-user@lucene.apache.org Subject: Re: Searching For Term 'OR' : 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. fq={!term f=state}OR ...this kind of filter you don't want a query parser that has any metacharacters. -Hoss