Hi,

I have two fields in the index with company and year. Following surround query 
finds computer and applications within and 5 words of each is working fine with 
surround query parser.
{!surround maxBasicQueries=100000}company:5N(comput*, appli*)

Now If I have add another boolean query +year:[2005 TO *], then it throws query 
parser exception.
{!surround maxBasicQueries=100000}company:5N(comput*, appli*) +year:[2005 TO *]

        * msg: "org.apache.solr.search.SyntaxError: 
org.apache.lucene.queryparser.surround.parser.ParseException: Encountered " 
<TERM> "year "" at line 1, column 30. Was expecting one of: <EOF> <OR> ... 
<AND> ... <NOT> ... <W> ... <N> ... "^" ... ",
        * 

Couldn't figure out the syntax from SurroundQParserPlugin code. 
How to combine other term and/or boolean queries with surround queries. Also 
looking for syntax to add more than one surround query on different fields.

Thanks
Shyamsunder

Reply via email to