BOSTing FIELDS in SCHEMA.XML

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

BOSTing FIELDS in SCHEMA.XML

Kraus, Ralf | pixelhouse GmbH
Hi,

is there a chance to set boosting directly in my schema.xml ?

    <field name="Name1" type="text" indexed="true"  stored="true"
multivalued="true" omitNorms="false" boost="2" />
    <field name="Name2" type="text" indexed="true"  stored="true"
multivalued="true" omitNorms="false" boost="1.5f" />
    <field name="Name3" type="text" indexed="true"  stored="true"
multivalued="true" omitNorms="false" boost="0.5f" />
    <field name="Name4" type="text" indexed="true"  stored="true" />

I want do it directly in the index and not in my query !

Greets -Ralf-
Reply | Threaded
Open this post in threaded view
|

Re: BOSTing FIELDS in SCHEMA.XML

Erik Hatcher
Right now you'll have to set the boosts from your indexing client, or  
dismax dynamically from the querying side of things, or Lucene query  
parser^boosting.

        Erik

On Mar 23, 2009, at 5:22 PM, Kraus, Ralf | pixelhouse GmbH wrote:

> Hi,
>
> is there a chance to set boosting directly in my schema.xml ?
>
>   <field name="Name1" type="text" indexed="true"  stored="true"  
> multivalued="true" omitNorms="false" boost="2" />
>   <field name="Name2" type="text" indexed="true"  stored="true"  
> multivalued="true" omitNorms="false" boost="1.5f" />
>   <field name="Name3" type="text" indexed="true"  stored="true"  
> multivalued="true" omitNorms="false" boost="0.5f" />
>   <field name="Name4" type="text" indexed="true"  stored="true" />
>
> I want do it directly in the index and not in my query !
>
> Greets -Ralf-

Reply | Threaded
Open this post in threaded view
|

Re: BOSTing FIELDS in SCHEMA.XML

Otis Gospodnetic-2
In reply to this post by Kraus, Ralf | pixelhouse GmbH

Ralf,
You can set the boost at index time, yes.  If you are feeing XML (as in exampledocs/), you should be able to pass the boost as the field element's attribute.  Google solr add field boost xml shows this as #1 hit:

http://wiki.apache.org/solr/UpdateXmlMessages#head-8315b8028923d028950ff750a57ee22cbf7977c6

 Otis
--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch



----- Original Message ----

> From: "Kraus, Ralf | pixelhouse GmbH" <[hidden email]>
> To: [hidden email]
> Sent: Monday, March 23, 2009 12:22:29 PM
> Subject: BOSTing FIELDS in SCHEMA.XML
>
> Hi,
>
> is there a chance to set boosting directly in my schema.xml ?
>
>  
> multivalued="true" omitNorms="false" boost="2" />
>  
> multivalued="true" omitNorms="false" boost="1.5f" />
>  
> multivalued="true" omitNorms="false" boost="0.5f" />
>  
>
> I want do it directly in the index and not in my query !
>
> Greets -Ralf-

Reply | Threaded
Open this post in threaded view
|

Re: BOSTing FIELDS in SCHEMA.XML

Yonik Seeley-2-2
In reply to this post by Kraus, Ralf | pixelhouse GmbH
On Mon, Mar 23, 2009 at 12:22 PM, Kraus, Ralf | pixelhouse GmbH
<[hidden email]> wrote:
> Hi,
>
> is there a chance to set boosting directly in my schema.xml ?

Query time boosts are much more flexible.  Actual index-time boosts
should normally only be used to boost certain documents over other
documents.

If you don't want to have to send them in your query request, the
dismax query type allows fields and boosts to be specified separately
from the actual user query.  This would then allow you to specify (via
defaults in solrconfig.xml, per-handler) what fields should be
searched and the boost for each field.


-Yonik
http://www.lucidimagination.com