On 4/12/2012 1:37 PM, geeky2 wrote:
can you elaborate on this and how EDisMax would preclude the need for
copyfield?

i am using extended dismax now in my response handlers.

here is an example of one of my requestHandlers

   <requestHandler name="partItemNoSearch" class="solr.SearchHandler"
default="false">
     <lst name="defaults">
       <str name="defType">edismax</str>
       <str name="echoParams">all</str>
       <int name="rows">5</int>
       <str name="qf">itemNo^1.0</str>
       <str name="q.alt">*:*</str>
     </lst>
     <lst name="appends">
       <str name="fq">itemType:1</str>
       <str name="sort">rankNo asc, score desc</str>
     </lst>
     <lst name="invariants">
       <str name="facet">false</str>
     </lst>
   </requestHandler>

I'm not sure whether or not you can use a multiValued field as the source for copyField. This is the sort of thing that the devs tend to think of, so my initial thought would be that it should work, though I would definitely test it to be absolutely sure.

Your request handler above has qf set to include the field called itemNo. If you made another that had the following in it, you could do without a copyField, by using that request handler. You would want to customize the field boosts:

<str name="qf">brand^2.0 category^3.0 partno</str>

To really leverage edismax, assuming that you are using a tokenizer that splits any of these fields into multiple tokens, and that you want to use relevancy ranking, you might want to consider defining pf as well.

Some observations about your handler above... you are free to ignore this: I believe that you don't really need the ^1.0 that's in qf, because there's only one field, and 1.0 is the default boost. Also, from what I can tell, because you are only using one qf field and are not using any of the dismax-specific goodies like pf or mm, you don't really need edismax at all here. If I'm right, to remove edismax, just specify itemNo as the value for the df parameter (default field) and remove the defType. The q.alt parameter might also need to come out.

Solr 3.6 (should be released soon) has deprecated the defaultSearchField and defaultOperator parameters in schema.xml, the df and q.op handler parameters are the replacement. This will be enforced in Solr 4.0.

http://wiki.apache.org/solr/SearchHandler#Query_Params

Thanks,
Shawn

Reply via email to