Hello, special field name _query_ is your friend.
+_query_:"{!surround maxBasicQueries=100000}company:5N(comput*, appli*)" +_query_:"{!lucene}year:[2005 TO *]" http://searchhub.org/2009/03/31/nested-queries-in-solr/ Ahmet On Friday, June 20, 2014 9:39 AM, Shyamsunder R Mutcha <sjh...@yahoo.com.INVALID> wrote: 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