: We need to enhance our existing solr search to support query with 'AND' : /'OR'. That is, when user enters "(breast OR liver) AND cancer" in the query : field, the documents with 'liver' & 'cancer' and the documents with 'breast' : & 'cancer' should be returned.
dismax already supports AND and OR in the same way as standard ... but it does not support grouping parens like in your example. : Our existing solr schema includes multiple search fields, like TITLE, : ABSTRACT,..., and we are using DisMaxRequestHandler. : : To support the query with the user entered AND / OR, do we have to use : StandardRequestHandler and write our own query parser? Is there any sample Writing a QParserPlugin to do this is certainly possible ... Lucene as a MultiFieldQueryParser that could probably work along these lines -- but it has some caveats about precedence (beyond the usual caveats about precedence in the main Lucene QueryParser) The simple appraoch: use copyField to copy your muiltiple existing search fields into a single "catchall" field, then make that your default search field and use the StandardRequestHandler as is with the normal QueryParser. -Hoss