hey thanks for this info.  So I've got it almost to where I want my search
to be :)  I've changed my schema and solrconfig in the following ways:

in my schema I have 5 fields 2 of which are first-name and last-name.  I
have the text field and I copy last-name and first-name into it so that by
default I only search across those 2 fields.  What I did also is changed my
dismax request handler to the following:

<requestHandler name="dismax" class="solr.DisMaxRequestHandler" >
   <lst name="defaults">
    <str name="echoParams">explicit</str>
    <float name="tie">0.01</float>
    <str name="qf">
       last-name^2.0 first-name^1.0
    </str>
    <str name="pf">
       last-name^2.0 first-name^1.0
    </str>
    <str name="fl">
       *,score
    </str>
   </lst>
 </requestHandler>

So that I boost last-name.

and to my query I add 3 sort params "score desc,last-name asc,first-name
asc".  This gives me nice results.  The only thing that is missing right now
is that wildcards do not work.  So if my q is john barber I get back the
correct doc.  When I change q to john bar* I don't get anything.  My text
field is defined as the default schema has it:

<fieldtype name="text" class="solr.TextField" positionIncrementGap="100">
     <analyzer type="index">
       <tokenizer class="solr.WhitespaceTokenizerFactory"/>
       <filter class="solr.StopFilterFactory" ignoreCase="true" words="
stopwords.txt"/>
       <filter class="solr.WordDelimiterFilterFactory"
generateWordParts="1" generateNumberParts="1" catenateWords="1"
catenateNumbers="1" catenateAll="0"/>
       <filter class="solr.LowerCaseFilterFactory"/>
       <filter class="solr.EnglishPorterFilterFactory" protected="
protwords.txt"/>
       <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
     </analyzer>
     <analyzer type="query">
       <tokenizer class="solr.WhitespaceTokenizerFactory"/>
       <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
ignoreCase="true" expand="true"/>
       <filter class="solr.StopFilterFactory" ignoreCase="true" words="
stopwords.txt"/>
       <filter class="solr.WordDelimiterFilterFactory"
generateWordParts="1" generateNumberParts="1" catenateWords="0"
catenateNumbers="0" catenateAll="0"/>
       <filter class="solr.LowerCaseFilterFactory"/>
       <filter class="solr.EnglishPorterFilterFactory" protected="
protwords.txt"/>
       <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
     </analyzer>
   </fieldtype>

I would like to be able to support such wildcards


thanks a lot

--
alessandro ferrucci =]



On 7/21/07, Chris Hostetter <[EMAIL PROTECTED]> wrote:

: case then I'd make my qf to be "last-name^2.0 first-name".  I'm not
realy
: sure what "fq" param is for, could anyone explain?

note the Parameters section of the DisMaxRequestHandler wiki page ...
particulararly where it links over to "In addition to the
CommonQueryParameters..."

http://wiki.apache.org/solr/DisMaxRequestHandler
http://wiki.apache.org/solr/CommonQueryParameters



-Hoss


Reply via email to