Re: Solr query with mandatory values

2012-05-09 Thread Li Li
some sample codes: QueryParser parser=new QueryParser(Version.LUCENE_36, "title", new KeywordAnalyzer()); String q="+title:hello\\ world"; Query query=parser.parse(q); System.out.pri

Re: Solr query with mandatory values

2012-05-09 Thread Li Li
+ before term is correct. in lucene term includes field and value. Query ::= ( Clause )* Clause ::= ["+", "-"] [ ":"] ( | "(" Query ")" ) <#_TERM_CHAR: ( <_TERM_START_CHAR> | <_ESCAPED_CHAR> | "-" | "+" ) > <#_ESCAPED_CHAR: "\\" ~[] > in lucene query syntax, you can't express a term value i

RE: Solr query with mandatory values

2012-05-09 Thread Matt Kuiper
Yes. See http://wiki.apache.org/solr/SolrQuerySyntax - The standard Solr Query Parser syntax is a superset of the Lucene Query Parser syntax. Which links to http://lucene.apache.org/core/3_6_0/queryparsersyntax.html Note - Based on the info on these pages I believe the "+" symbol is to be p