lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Balaji S <mcabal...@gmail.com>
Subject Re: Boost Exact matches on Specific Fields
Date Thu, 29 Sep 2011 00:41:36 GMT
Yeah I will change the weight for str_category and make it higher . I
converted it to lowercase  because we cannot expect users to type them in
the correct case

Thanks
Balaji

On Thu, Sep 29, 2011 at 3:52 AM, Way Cool <way1.waycool@gmail.com> wrote:

> I will give str_category more weight than ts_category because we want
> str_category to win if they have "exact" matches ( you converted to
> lowercase).
>
> On Mon, Sep 26, 2011 at 10:23 PM, Balaji S <mcabalaji@gmail.com> wrote:
>
> > Hi
> >
> >   You mean to say copy the String field to a Text field or the reverse .
> > This is the approach I am currently following
> >
> > Step 1: Created a FieldType
> >
> >
> >     <fieldType name="string_lower" class="solr.TextField"
> > sortMissingLast="true" omitNorms="true">
> >        <analyzer>
> >            <tokenizer class="solr.KeywordTokenizerFactory"/>
> >    <filter class="solr.LowerCaseFilterFactory" />
> >    <filter class="solr.TrimFilterFactory" />
> >        </analyzer>
> >     </fieldType>
> >
> > Step 2 : <field name="str_category" type="string_lower" indexed="true"
> > stored="true"/>
> >
> > Step 3 : <copyField source="ts_category" dest="str_category"/>
> >
> > And in the SOLR Query planning to q=hospitals&qf=body^4.0 title^5.0
> > ts_category^10.0 str_category^8.0
> >
> >
> > The One Question I have here is All the above mentioned fields will have
> > "Hospital" present in them , will the above approach work to get the
> exact
> > match on the top and bring "Hospitalization" below in the results
> >
> >
> > Thanks
> > Balaji
> >
> >
> > On Tue, Sep 27, 2011 at 9:38 AM, Way Cool <way1.waycool@gmail.com>
> wrote:
> >
> > > If I were you, probably I will try defining two fields:
> > > 1. ts_category as a string type
> > > 2. ts_category1 as a text_en type
> > > Make sure copy ts_category to ts_category1.
> > >
> > > You can use the following as qf in your dismax:
> > > qf=body^4.0 title^5.0 ts_category^10.0 ts_category1^5.0
> > > or something like that.
> > >
> > > YH
> > > http://thetechietutorials.blogspot.com/
> > >
> > >
> > > On Mon, Sep 26, 2011 at 2:06 PM, balaji <mcabalaji@gmail.com> wrote:
> > >
> > > > Hi all
> > > >
> > > >    I am new to SOLR and have a doubt on Boosting the Exact Terms to
> the
> > > top
> > > > on a Particular field
> > > >
> > > > For ex :
> > > >
> > > >     I have a text field names ts_category and I want to give more
> boost
> > > to
> > > > this field rather than other fields, SO in my Query I pass the
> > following
> > > in
> > > > the QF params "qf=body^4.0 title^5.0 ts_category^21.0" and also sort
> on
> > > > SCORE desc
> > > >
> > > >     When I do a search against "Hospitals" . I get "Hospitalization
> > > > Management , Hospital Equipment & Supplies " on Top rather than the
> > exact
> > > > matches of "Hospitals"
> > > >
> > > >      So It would be great , If I could be helped over here
> > > >
> > > >
> > > > Thanks
> > > > Balaji
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Thanks in Advance
> > > > Balaji
> > > >
> > > > --
> > > > View this message in context:
> > > >
> > >
> >
> http://lucene.472066.n3.nabble.com/Boost-Exact-matches-on-Specific-Fields-tp3370513p3370513.html
> > > > Sent from the Solr - User mailing list archive at Nabble.com.
> > > >
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message