Re: searching across multiple fields using edismax - am i setting this up right?

2012-04-13 Thread geeky2
thank you for the response.

it seems to be working well ;)

1) i tried your suggestion about removing the qt parameter - 

*somecore/partItemNoSearch*q=dishwasherdebugQuery=onrows=10

but this results in a 404 error message - is there some configuration i am
missing to support this short-hand syntax for specifying the requestHandler
in the url ?



2) ok - good suggestion.



3) yes it looks like it IS searching across all three (3) fields.

i noticed that for the itemNo field, it reduced the search string from
dishwasher to dishwash - it this because of stemming on the field type, used
for the itemNo field?

lst name=debugstr name=rawquerystringdishwasher/strstr
name=querystringdishwasher/strstr
name=parsedquery+DisjunctionMaxQuery((brand:dishwasher^0.5 |
*itemNo:dishwash* | productType:dishwasher^0.8))/strstr
name=parsedquery_toString+(brand:dishwasher^0.5 | itemNo:dishwash |
productType:dishwasher^0.8)/str





--
View this message in context: 
http://lucene.472066.n3.nabble.com/searching-across-multiple-fields-using-edismax-am-i-setting-this-up-right-tp3906334p3907875.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: searching across multiple fields using edismax - am i setting this up right?

2012-04-13 Thread Erick Erickson
as to 1) you have to define your request handler with
a leading /, as in name= /partItemNoSearch. Don't
forget to restart your server.

3) Of course. The input terms MUST be run through
the associated analysis chain to have any hope of
matching correctly.

Best
Erick

On Fri, Apr 13, 2012 at 8:36 AM, geeky2 gee...@hotmail.com wrote:
 thank you for the response.

 it seems to be working well ;)

 1) i tried your suggestion about removing the qt parameter -

 *somecore/partItemNoSearch*q=dishwasherdebugQuery=onrows=10

 but this results in a 404 error message - is there some configuration i am
 missing to support this short-hand syntax for specifying the requestHandler
 in the url ?



 2) ok - good suggestion.



 3) yes it looks like it IS searching across all three (3) fields.

 i noticed that for the itemNo field, it reduced the search string from
 dishwasher to dishwash - it this because of stemming on the field type, used
 for the itemNo field?

 lst name=debugstr name=rawquerystringdishwasher/strstr
 name=querystringdishwasher/strstr
 name=parsedquery+DisjunctionMaxQuery((brand:dishwasher^0.5 |
 *itemNo:dishwash* | productType:dishwasher^0.8))/strstr
 name=parsedquery_toString+(brand:dishwasher^0.5 | itemNo:dishwash |
 productType:dishwasher^0.8)/str





 --
 View this message in context: 
 http://lucene.472066.n3.nabble.com/searching-across-multiple-fields-using-edismax-am-i-setting-this-up-right-tp3906334p3907875.html
 Sent from the Solr - User mailing list archive at Nabble.com.


searching across multiple fields using edismax - am i setting this up right?

2012-04-12 Thread geeky2
hello all,

i just want to check to make sure i have this right.

i was reading on this page: http://wiki.apache.org/solr/ExtendedDisMax,
thanks to shawn for educating me.

*i want the user to be able to fire a requestHandler but search across
multiple fields (itemNo, productType and brand) WITHOUT them having to
specify in the query url what fields they want / need to search on*

this is what i have in my request handler


  requestHandler name=partItemNoSearch class=solr.SearchHandler
default=false
lst name=defaults
  str name=defTypeedismax/str
  str name=echoParamsall/str
  int name=rows5/int
  *str name=qfitemNo^1.0 productType^.8 brand^.5/str*
  str name=q.alt*:*/str
/lst
lst name=appends
  str name=sortrankNo asc, score desc/str
/lst
lst name=invariants
  str name=facetfalse/str
/lst
  /requestHandler

this would be an example of a single term search going against all three of
the fields

http://bogus:bogus/somecore/select?qt=partItemNoSearchq=*dishwasher*debugQuery=onrows=100

this would be an example of a multiple term search across all three of the
fields

http://bogus:bogus/somecore/select?qt=partItemNoSearchq=*dishwasher
123-xyz*debugQuery=onrows=100


do i understand this correctly?

thank you,
mark




--
View this message in context: 
http://lucene.472066.n3.nabble.com/searching-across-multiple-fields-using-edismax-am-i-setting-this-up-right-tp3906334p3906334.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: searching across multiple fields using edismax - am i setting this up right?

2012-04-12 Thread Erick Erickson
Looks good on a quick glance. There are a couple of things...

1 there's no need for the qt param _if_ you specify the name
as /partItemNoSearch, just use
blahblah/solr/partItemNoSearch
There's a JIRA about when/if you need at. Either will do, it's
up to you which you prefer.

2 I'd consider moving the sort from the appends section to the
defaults section on the theory that you may want to override sorting
sometime.

3 Simple way to see the effects of this is to simply append
debugQuery=on to your URL. You'll see the results of
the query, including the parsed results. It's a little hard to read,
but you should be seeing your search terms spread across
all three fields.

Best
Erick

On Thu, Apr 12, 2012 at 2:06 PM, geeky2 gee...@hotmail.com wrote:
 hello all,

 i just want to check to make sure i have this right.

 i was reading on this page: http://wiki.apache.org/solr/ExtendedDisMax,
 thanks to shawn for educating me.

 *i want the user to be able to fire a requestHandler but search across
 multiple fields (itemNo, productType and brand) WITHOUT them having to
 specify in the query url what fields they want / need to search on*

 this is what i have in my request handler


  requestHandler name=partItemNoSearch class=solr.SearchHandler
 default=false
    lst name=defaults
      str name=defTypeedismax/str
      str name=echoParamsall/str
      int name=rows5/int
      *str name=qfitemNo^1.0 productType^.8 brand^.5/str*
      str name=q.alt*:*/str
    /lst
    lst name=appends
      str name=sortrankNo asc, score desc/str
    /lst
    lst name=invariants
      str name=facetfalse/str
    /lst
  /requestHandler

 this would be an example of a single term search going against all three of
 the fields

 http://bogus:bogus/somecore/select?qt=partItemNoSearchq=*dishwasher*debugQuery=onrows=100

 this would be an example of a multiple term search across all three of the
 fields

 http://bogus:bogus/somecore/select?qt=partItemNoSearchq=*dishwasher
 123-xyz*debugQuery=onrows=100


 do i understand this correctly?

 thank you,
 mark




 --
 View this message in context: 
 http://lucene.472066.n3.nabble.com/searching-across-multiple-fields-using-edismax-am-i-setting-this-up-right-tp3906334p3906334.html
 Sent from the Solr - User mailing list archive at Nabble.com.