Hi, I am in the middle of the similar use case as provided , we have three different fields on UI for searchany, searchall and searchexcept respectively for OR,AND and NOT query , I need to know how do I make them work along with Edismax. We can expect any/all of the fields to have free text. Any suggestions/guidance is truly appreciated.
Thanks, Atita On Wed, Aug 2, 2017 at 2:21 PM, Aman Tandon <amantandon...@gmail.com> wrote: > Hi, > > Ideally it should but from the debug query it seems like it is not > respecting Boolean clauses. > > Anyone else could help here? Is this the ideal behavior? > > On Jul 31, 2017 5:47 PM, "Niraj Aswani" <nirajasw...@gmail.com> wrote: > > > Hi Aman, > > > > Thank you very much your reply. > > > > Let me elaborate my question a bit more using your example in this case. > > > > AFAIK, what the pf2 parameter is doing to the query is adding the > following > > phrase queries: > > > > (_text_:"system memory") (_text_:"memory oem") (_text_:"oem retail") > > > > There are three phrases being checked here: > > - system memory > > - memory oem > > - oem retail > > > > However, what I actually expected it to look like is the following: > > - system memory > > - memory oem > > - memory retail > > > > My understanding of the edismax parser is that it interprets the AND / OR > > parameters correctly so it should generate the bi-gram phrases respecting > > the AND /OR parameters as well, right? > > > > Am I missing something here? > > > > Regards, > > Niraj > > > > On Mon, Jul 31, 2017 at 4:24 AM, Aman Tandon <amantandon...@gmail.com> > > wrote: > > > > > Hi Niraj, > > > > > > Should I expect it to check the following bigram phrases? > > > > > > Yes it will check. > > > > > > ex- documents & query is given below > > > > > > http://localhost:8983/solr/myfile/select?wt=xml&fl=name& > > > indent=on&q=*System > > > AND Memory AND (OEM OR Retail)*&rows=50&wt=json&*qf=_text_&pf2=_text_* > > > &debug=true&defType=edismax > > > > > > <result name="response" numFound="3" start="0"> > > > <doc> > > > <arr name="name"> > > > <str> > > > A-DATA V-Series 1GB 184-Pin DDR SDRAM Unbuffered DDR 400 (PC 3200) > System > > > Memory - OEM > > > </str> > > > </arr> > > > </doc> > > > <doc> > > > <arr name="name"> > > > <str> > > > CORSAIR ValueSelect 1GB 184-Pin DDR SDRAM Unbuffered DDR 400 (PC 3200) > > > System Memory - Retail > > > </str> > > > </arr> > > > </doc> > > > <doc> > > > <arr name="name"> > > > <str> > > > CORSAIR XMS 2GB (2 x 1GB) 184-Pin DDR SDRAM Unbuffered DDR 400 (PC > 3200) > > > Dual Channel Kit System Memory - Retail > > > </str> > > > </arr> > > > </doc> > > > </result> > > > > > > > > > *Below is the parsed query* > > > > > > <str name="parsedquery_toString"> > > > +(+(_text_:system) +(_text_:memory) +((_text_:oem) (_text_:retail))) > > > ((_text_:"system memory") (_text_:"memory oem") (_text_:"oem retail")) > > > </str> > > > > > > In case if you are in such scenarios where you need to knwo what query > > will > > > form, then you could us the debug=true to know more about the query & > > > timings of different component. > > > > > > *And when the ps2 is not specified default ps will be applied on pf2.* > > > > > > I hope this helps. > > > > > > With Regards > > > Aman Tandon > > > > > > On Mon, Jul 31, 2017 at 4:18 AM, Niraj Aswani <nirajasw...@gmail.com> > > > wrote: > > > > > > > Hi, > > > > > > > > I am using solr 4.4 and bit confused about how does the edismax > parser > > > > treat the pf2 parameter when both the AND and OR operators are used > in > > > the > > > > query with ps2=0 > > > > > > > > For example: > > > > > > > > pf2=title^100 > > > > q=HDMI AND Video AND (Wire OR Cable) > > > > > > > > Should I expect it to check the following bigram phrases? > > > > > > > > hdmi video > > > > video wire > > > > video cable > > > > > > > > Regards > > > > Niraj > > > > > > > > > >