Hi Bagesh, I think Hossman and Erick have given you the path that can you choos and found the desired result. Try mm value set to 0 to dismax work for your operators "AND" OR and NOT.
Thanx: Grijesh Lucid Imagination Inc. On Sat, Feb 5, 2011 at 8:17 PM, Bagesh Sharma [via Lucene] <ml-node+2431391-1089615873-85...@n3.nabble.com> wrote: > Hi friends, Please suggest me that how can i set query operator to AND for > dismax request handler case. > > My problem is that i am searching a string "water treatment plant" using > dismax request handler . The query formed is of such type .... > > http://localhost:8884/solr/select/?q=water+treatment+plant&q.alt=*:*&start=0&rows=5&sort=score%20desc&qt=dismax&omitHeader=true > > My handling for dismax request handler in solrConfig.xml is - > > <requestHandler name="dismax" class="solr.DisMaxRequestHandler" > default="true"> > <lst name="defaults"> > <str name="facet">true</str> > <str name="echoParams">explicit</str> > <float name="tie">0.2</float> > > <str name="qf"> > TDR_SUBIND_SUBTDR_SHORT^3 > TDR_SUBIND_SUBTDR_DETAILS^2 > TDR_SUBIND_COMP_NAME^1.5 > TDR_SUBIND_LOC_STATE^3 > TDR_SUBIND_PROD_NAMES^2.5 > TDR_SUBIND_LOC_CITY^3 > TDR_SUBIND_LOC_ZIP^2.5 > TDR_SUBIND_NAME^1.5 > TDR_SUBIND_TENDER_NO^1 > </str> > > <str name="pf"> > TDR_SUBIND_SUBTDR_SHORT^15 > TDR_SUBIND_SUBTDR_DETAILS^10 > TDR_SUBIND_COMP_NAME^20 > </str> > > <str name="qs">1</str> > <int name="ps">0</int> > <str name="mm">20%</str> > </lst> > </requestHandler> > > > In the final parsed query it is like > > +((TDR_SUBIND_PROD_NAMES:water^2.5 | TDR_SUBIND_LOC_ZIP:water^2.5 | > TDR_SUBIND_COMP_NAME:water^1.5 | TDR_SUBIND_TENDER_NO:water | > TDR_SUBIND_SUBTDR_SHORT:water^3.0 | TDR_SUBIND_SUBTDR_DETAILS:water^2.0 | > TDR_SUBIND_LOC_CITY:water^3.0 | TDR_SUBIND_LOC_STATE:water^3.0 | > TDR_SUBIND_NAME:water^1.5)~0.2 (TDR_SUBIND_PROD_NAMES:treatment^2.5 | > TDR_SUBIND_LOC_ZIP:treatment^2.5 | TDR_SUBIND_COMP_NAME:treatment^1.5 | > TDR_SUBIND_TENDER_NO:treatment | TDR_SUBIND_SUBTDR_SHORT:treatment^3.0 | > TDR_SUBIND_SUBTDR_DETAILS:treatment^2.0 | TDR_SUBIND_LOC_CITY:treatment^3.0 > | TDR_SUBIND_LOC_STATE:treatment^3.0 | TDR_SUBIND_NAME:treatment^1.5)~0.2 > (TDR_SUBIND_PROD_NAMES:plant^2.5 | TDR_SUBIND_LOC_ZIP:plant^2.5 | > TDR_SUBIND_COMP_NAME:plant^1.5 | TDR_SUBIND_TENDER_NO:plant | > TDR_SUBIND_SUBTDR_SHORT:plant^3.0 | TDR_SUBIND_SUBTDR_DETAILS:plant^2.0 | > TDR_SUBIND_LOC_CITY:plant^3.0 | TDR_SUBIND_LOC_STATE:plant^3.0 | > TDR_SUBIND_NAME:plant^1.5)~0.2) (TDR_SUBIND_SUBTDR_DETAILS:"water treatment > plant"^10.0 | TDR_SUBIND_COMP_NAME:"water treatment plant"^20.0 | > TDR_SUBIND_SUBTDR_SHORT:"water treatment plant"^15.0)~0.2 > > > > Now it gives me results if any of the word is found from text "water > treatment plant". I think here OR operator is working which finally combines > the results. > > Now i want only those results for which only complete text should be > matching "water treatment plant". > > 1. I do not want to make any change in solrConfig.xml dismax handler. If > possible then suggest any other handler to deal with it. > > 2. Does there is really or operator is working in query. basically when i > query like this > > q=%2Bwater%2Btreatment%2Bplant&q.alt=*:*&q.op=AND&start=0&rows=5&sort=score > desc,TDR_SUBIND_SUBTDR_OPEN_DATE > asc&omitHeader=true&debugQuery=true&qt=dismax > > OR > > q=water+AND+treatment+AND+plant&q.alt=*:*&q.op=AND&start=0&rows=5&sort=score > desc,TDR_SUBIND_SUBTDR_OPEN_DATE > asc&omitHeader=true&debugQuery=true&qt=dismax > > > Then it is giving different results. Can you suggest what is the difference > between above two queries. > > Please suggest me for full text search "water treatment plant". > > Thanks for your response. > > > ________________________________ > This email was sent by Bagesh Sharma (via Nabble) > Your replies will appear at > http://lucene.472066.n3.nabble.com/AND-operator-and-dismax-request-handler-tp2431391p2431391.html > To receive all replies by email, subscribe to this discussion > > ----- Thanx: Grijesh http://lucidimagination.com -- View this message in context: http://lucene.472066.n3.nabble.com/AND-operator-and-dismax-request-handler-tp2431391p2441363.html Sent from the Solr - User mailing list archive at Nabble.com.