If you haven't modified your schema.xml, you'll find that the <defaultSearchField> is set to the text field. So when you issue the q=term you're going against your default search field.
Assuming you've changed the default search field to "defaultSearch", then the problem is probably that your analysis chain for default search is different from that applied to your individual fields. Which I absolutely guarantee since you have two different fieldTypes in your 5 fields. I'm extremely suspicious of your fieldTypes that involve the word "keyword", because if this indicates the KeywordTokenizer is being used, then everything in the input is a single token, the input stream isn't being split up... But the best way to understand this is in the admin/analysis page. If you check the "verbose" box and put in some text you'll see the effects of each part of the chain. Try this for the field you expect Dismax to find your term in, and also for your defaultSearch field and I suspect you'll see what's going on.... Best Erick On Fri, Apr 15, 2011 at 10:35 AM, Daniel Persson <mailto.wo...@gmail.com>wrote: > Hi. > > I've got a strange result of a DisMax search function. I might have > understood the functionallity wrong. But after I read the manual I > understood it is used to do ranked results with simple search terms. > > Solr Version 1.4.0 > > I've got the setup > > Schema fields > ------------------------------------------------------ > <field name="name" type="wc_text" indexed="true" stored="true" > multiValued="false"/> > <field name="shortDescription" type="wc_text" indexed="true" stored="true" > multiValued="false"/> > <field name="longDescription" type="wc_keywordTextLowerCase" indexed="true" > stored="false" multiValued="false"/> > <field name="prodShortDescription" type="wc_keywordTextLowerCase" > indexed="true" stored="false" multiValued="false"/> > <field name="prodLongDescription" type="wc_keywordTextLowerCase" > indexed="true" stored="false" multiValued="false"/> > > <copyField source="name" dest="defaultSearch"/> > <copyField source="shortDescription" dest="defaultSearch"/> > <copyField source="longDescription" dest="defaultSearch"/> > <copyField source="prodShortDescription" dest="defaultSearch"/> > <copyField source="prodLongDescription" dest="defaultSearch"/> > > > DisMax config > ------------------------------------------------------ > <requestHandler name="dismax" class="solr.DisMaxRequestHandler"> > <lst name="defaults"> > <str name="echoParams">explicit</str> > <float name="tie">0.01</float> > <str name="qf"> > name^1.2 shortDescription^1.0 longDescription^1.0 > prodShortDescription^0.5 prodLongDescription^0.5 > </str> > <str name="pf"> > name^1.2 shortDescription^1.0 longDescription^1.0 > prodShortDescription^0.5 prodLongDescription ^0.5 > </str> > <str name="q.alt">*:*</str> > <int name="ps">100</int> > </lst> > <arr name="last-components"> > <str>spellcheck</str> > </arr> > </requestHandler> > > Standard config > --------------------------------------------------------- > <requestHandler name="standard" class="solr.StandardRequestHandler" > default="true"> > <lst name="defaults"> > <str name="echoParams">explicit</str> > </lst> > <arr name="last-components"> > <str>spellcheck</str> > </arr> > </requestHandler> > > > When I search for a term "q=term" I get 68 hits. But when I search for > "q=term&qt=dismax" I get 0 hits. > > Of course I got more fields and search parameters. But the only difference > I > could see is that in one case I use dismax and the other I don't. > > What have I missed? Any suggestions? > > Best regards > > Daniel >