Re: Help with Dismax query Handler
But you can't really have a good multi-lingual search with a single index and without having content in different languages in different fields and analyzed differently. So filtering by language field will work, but won't work very well as far as the search experience is concerned. Otis -- Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch - Original Message From: Shalin Shekhar Mangar [EMAIL PROTECTED] To: solr-user@lucene.apache.org Sent: Sunday, September 14, 2008 1:38:56 AM Subject: Re: Help with Dismax query Handler On Sun, Sep 14, 2008 at 10:08 AM, Vaijanath N. Rao wrote: We have one field called language, i.e.. language of the documents, we want people to search for there required query terms but limit it to the language selected instead the q can be of type q=field1:en +xyzqt=dismax It seems to me that the language field is only being used for filtering. So what you actually need is the fq parameter. Your query should look like: q=xyzfq=field1:enqt=dismax -- Regards, Shalin Shekhar Mangar.
Re: Help with Dismax query Handler
Hi Shalin, This works for me. --Thanks and Regards Vaijanath Shalin Shekhar Mangar wrote: On Sun, Sep 14, 2008 at 10:08 AM, Vaijanath N. Rao [EMAIL PROTECTED]wrote: We have one field called language, i.e.. language of the documents, we want people to search for there required query terms but limit it to the language selected instead the q can be of type q=field1:en +xyzqt=dismax It seems to me that the language field is only being used for filtering. So what you actually need is the fq parameter. Your query should look like: q=xyzfq=field1:enqt=dismax
Re: Help with Dismax query Handler
Hi Chris and David, We have one field called language, i.e.. language of the documents, we want people to search for there required query terms but limit it to the language selected I think the confusion caused was with the query string q=field1:xyz+xyzqt=dismax. instead the q can be of type q=field1:en +xyzqt=dismax Hope this explains the problem in a better fashion. I still need dismax feature for the xyz term and not for the language term. I think I will look at SOLR-405 and SOLR-756 and see if they work for me. --Thanks and Regards Vaijanath Smiley, David W. (DSMILEY) wrote: I think the point is that Viaj would like to permit users to specify the field if they so choose. On 9/11/08 12:48 PM, Chris Hostetter [EMAIL PROTECTED] wrote: : b) q=field1:xyz+xyzqt=dismax it returns me zero result. : : Is there anyway I get results for the query type b but still use the : DisMaxHandler. that would kind of defeat the point of dismax, which is to move the selection of which fields are searched out of the query string (which came from users) and into other params (which can be controlled independently) the bq and fq params are both available as ways to specify arbitrary Lucene formated query strings which influence the query ... fq filters the query (no score impact) bq adds a boost query (does impact the scores) q=xyzbq=field1:xyzqt=dismax -Hoss
Re: Help with Dismax query Handler
On Sun, Sep 14, 2008 at 10:08 AM, Vaijanath N. Rao [EMAIL PROTECTED]wrote: We have one field called language, i.e.. language of the documents, we want people to search for there required query terms but limit it to the language selected instead the q can be of type q=field1:en +xyzqt=dismax It seems to me that the language field is only being used for filtering. So what you actually need is the fq parameter. Your query should look like: q=xyzfq=field1:enqt=dismax -- Regards, Shalin Shekhar Mangar.
Re: Help with Dismax query Handler
I have also wanted to use the very cool DisMax query handler but was dismayed that it prevented me from using Solr/Lucene's full syntax capability. So I took matters into my own hands and modified the source. I have patches available: https://issues.apache.org/jira/browse/SOLR-756 757 and 758 ~ David On 9/11/08 10:28 AM, Vaijanath N. Rao [EMAIL PROTECTED] wrote: Hi Solr-Users, I am using DisMaxHandler in my application and I am facing one issue. The DisMaxHandler works fine for general queries but returns no result if I do fielded search. For example for query a) q=xyzqt=dismax returns me the required results but if I do b) q=field1:xyz+xyzqt=dismax it returns me zero result. Is there anyway I get results for the query type b but still use the DisMaxHandler. --Thanks and Regards Vaijanath
Re: Help with Dismax query Handler
Vaijanath N. Rao wrote: Hi Solr-Users, I am using DisMaxHandler in my application and I am facing one issue. The DisMaxHandler works fine for general queries but returns no result if I do fielded search. For example for query a) q=xyzqt=dismax returns me the required results but if I do b) q=field1:xyz+xyzqt=dismax it returns me zero result. Is there anyway I get results for the query type b but still use the DisMaxHandler. --Thanks and Regards Vaijanath DisMaxHandler does not allow the field syntax in queries. The valid syntax is: '', '-', and '+' There is always the qf parameter though, or you could modify Dismax to not escape ':'. - Mark
Re: Help with Dismax query Handler
Perhaps we need a syntax option on DisMax. At Netflix, we've modified it to be pure text, with no operators. My current favorite unsearchable name is this band: (+/-) wunder On 9/11/08 7:32 AM, Smiley, David W. (DSMILEY) [EMAIL PROTECTED] wrote: I have also wanted to use the very cool DisMax query handler but was dismayed that it prevented me from using Solr/Lucene's full syntax capability. So I took matters into my own hands and modified the source. I have patches available: https://issues.apache.org/jira/browse/SOLR-756 757 and 758 ~ David On 9/11/08 10:28 AM, Vaijanath N. Rao [EMAIL PROTECTED] wrote: Hi Solr-Users, I am using DisMaxHandler in my application and I am facing one issue. The DisMaxHandler works fine for general queries but returns no result if I do fielded search. For example for query a) q=xyzqt=dismax returns me the required results but if I do b) q=field1:xyz+xyzqt=dismax it returns me zero result. Is there anyway I get results for the query type b but still use the DisMaxHandler. --Thanks and Regards Vaijanath
Re: Help with Dismax query Handler
: b) q=field1:xyz+xyzqt=dismax it returns me zero result. : : Is there anyway I get results for the query type b but still use the : DisMaxHandler. that would kind of defeat the point of dismax, which is to move the selection of which fields are searched out of the query string (which came from users) and into other params (which can be controlled independently) the bq and fq params are both available as ways to specify arbitrary Lucene formated query strings which influence the query ... fq filters the query (no score impact) bq adds a boost query (does impact the scores) q=xyzbq=field1:xyzqt=dismax -Hoss
Re: Help with Dismax query Handler
I think the point is that Viaj would like to permit users to specify the field if they so choose. On 9/11/08 12:48 PM, Chris Hostetter [EMAIL PROTECTED] wrote: : b) q=field1:xyz+xyzqt=dismax it returns me zero result. : : Is there anyway I get results for the query type b but still use the : DisMaxHandler. that would kind of defeat the point of dismax, which is to move the selection of which fields are searched out of the query string (which came from users) and into other params (which can be controlled independently) the bq and fq params are both available as ways to specify arbitrary Lucene formated query strings which influence the query ... fq filters the query (no score impact) bq adds a boost query (does impact the scores) q=xyzbq=field1:xyzqt=dismax -Hoss
Re: Help with Dismax query Handler
There is a defType parameter and dismax is one such type. But unfortunately, dismax does a lot of things and it's not structured to be extended so that this can be modified. Presently you have to write your own QueryParser Plugin which is not something easily done. SOLR-758 is my attempt to fix that. ~ David On 9/11/08 10:41 AM, Walter Underwood [EMAIL PROTECTED] wrote: Perhaps we need a syntax option on DisMax. At Netflix, we've modified it to be pure text, with no operators. My current favorite unsearchable name is this band: (+/-) wunder On 9/11/08 7:32 AM, Smiley, David W. (DSMILEY) [EMAIL PROTECTED] wrote: I have also wanted to use the very cool DisMax query handler but was dismayed that it prevented me from using Solr/Lucene's full syntax capability. So I took matters into my own hands and modified the source. I have patches available: https://issues.apache.org/jira/browse/SOLR-756 757 and 758 ~ David On 9/11/08 10:28 AM, Vaijanath N. Rao [EMAIL PROTECTED] wrote: Hi Solr-Users, I am using DisMaxHandler in my application and I am facing one issue. The DisMaxHandler works fine for general queries but returns no result if I do fielded search. For example for query a) q=xyzqt=dismax returns me the required results but if I do b) q=field1:xyz+xyzqt=dismax it returns me zero result. Is there anyway I get results for the query type b but still use the DisMaxHandler. --Thanks and Regards Vaijanath
Re: Help with Dismax query Handler
: I think the point is that Viaj would like to permit users to specify the : field if they so choose. Ah... gotcha. that would fall somewhere along the lines of SOLR-405. Although as i said in my comment there: at a minimum we need ot make it smart enough to do the right thing both when the field exists and when it doesn't; but ideally we should support field aliasing so query strings can contain field names you want the user to see, regardless of which field(s) each of those names really corrisponds to. -Hoss
Re: Help with Dismax query Handler
A free text option would be really nice. When our users type mission:impossible, they are not searching a field named mission. wunder On 9/11/08 4:39 PM, Chris Hostetter [EMAIL PROTECTED] wrote: : I think the point is that Viaj would like to permit users to specify the : field if they so choose. Ah... gotcha. that would fall somewhere along the lines of SOLR-405. Although as i said in my comment there: at a minimum we need ot make it smart enough to do the right thing both when the field exists and when it doesn't; but ideally we should support field aliasing so query strings can contain field names you want the user to see, regardless of which field(s) each of those names really corrisponds to. -Hoss
Re: Help with Dismax query Handler
: A free text option would be really nice. When our users type : mission:impossible, they are not searching a field named mission. right ... SOLR-405 was a start, but as i recall it didn't deal with the case where the stuff before the colon wasn't a field name, and it exposed raw field names to the user. ideally what we should have is something where this... q=mission:impossible episode:5qf=title^3 description^2f.episode.qf=ep_num is the same as a booleanquery query combining what you'd get from both of these... q=mission:impossibleqf=title^3 description^2 q=5qf=ep_num 1) episode is registered as an alias for ep_num so naming conventions we wnat to show users aren't directly tied to internal schema.xml names. 2) mission isn't treated as a fieldname becuase it's not a registered alias -Hoss
Re: Help with Dismax query Handler
We need no field queries, never, no way. We don't want accidental collisions between a new movie title and an existing fieldname that requires an emergency software push to production. Same thing for plus, minus, AND, OR, and NOT. Our customers really, really don't do that. They are not native speakers of Boolean. When they type ROMEO AND JULIET, it is not a tiny program in query language. wunder On 9/11/08 5:17 PM, Chris Hostetter [EMAIL PROTECTED] wrote: : A free text option would be really nice. When our users type : mission:impossible, they are not searching a field named mission. right ... SOLR-405 was a start, but as i recall it didn't deal with the case where the stuff before the colon wasn't a field name, and it exposed raw field names to the user. ideally what we should have is something where this... q=mission:impossible episode:5qf=title^3 description^2f.episode.qf=ep_num is the same as a booleanquery query combining what you'd get from both of these... q=mission:impossibleqf=title^3 description^2 q=5qf=ep_num 1) episode is registered as an alias for ep_num so naming conventions we wnat to show users aren't directly tied to internal schema.xml names. 2) mission isn't treated as a fieldname becuase it's not a registered alias -Hoss
Re: help with dismax query handler syntax
Nevermind, I got it ... Somehow I missed the javadoc. -- Luis Neves Luis Neves wrote: Hello all, Using the standard query handler I can search for a term excluding a category and sort descending by price, e.g.: http://localhost/solr/select/?q=book+-Category:Adults;Price+descstart=0rows=10fl=*,score I'm scratching my head on how to do the same with the Dismax query handler, can anyone point me in the right direction. Thanks! -- Luis Neves
Re: help with dismax query handler syntax
Sorry for the late reply, the fq param is the recommended way to filter results without affecting scoring for both the dismax handler and the standard handler. if you want to affect scoring without affecting matching, the bq param of dismax is usefull instead. : Nevermind, I got it ... Somehow I missed the javadoc. I've been meaning to expand the wiki page so reading the javadocs isn't neccessary ... but anyone else whose interested should feel free to improve the wiki page ontheir own if so inclined. -Hoss