Thanks Jack Krupansky Your solution having key as* **+Java +mysql +php TCL Perl Selenium* worked nicely.
If I have to extend it something like, I need to search all documents, those have 1. Mandatory Keywords present are *Java, MySql* 2. Atleast one keyword out of* TCL Perl Selenium* should be present 3. The keywords *ethernet, switching, routing* should not be present in document. In that case, how the search key should look like. Best Regards Kamal On Mon, May 13, 2013 at 8:10 PM, Jack Krupansky <j...@basetechnology.com>wrote: > That's simply a standard, old-fashioned Lucene query: > > +Java +mysql +php TCL Perl Selenium > > And you can decide if "min should match" (mm) is 0, 1, 2, 3, etc. for the > optional terms (TCL, Perl, Selenium) > > -- Jack Krupansky > > -----Original Message----- From: Kamal Palei > Sent: Monday, May 13, 2013 9:56 AM > To: solr-user@lucene.apache.org > Subject: Can we search some mandatory words and some optional words in SOLR > > > Dear SOLR Experts > Llets say I want to search some mandatory words and some optional words. > Say I want to search all documents those contains all *Java, mysql, > php*keywords along with atleast one keyword out of > * TCL, Perl, Selenium*. > > *Basically I am looking at few mandatory keywords and few optional > keywords. > > * > > Is it possible to search this way. If so, kindly guide me how the query > should look like. > > Best Regards > Kamal >