You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by "Kraus, Ralf | pixelhouse GmbH" <rk...@pixelhouse.de> on 2009/03/23 17:22:29 UTC

BOSTing FIELDS in SCHEMA.XML

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-

Re: BOSTing FIELDS in SCHEMA.XML

Posted by Yonik Seeley <yo...@lucidimagination.com>.
On Mon, Mar 23, 2009 at 12:22 PM, Kraus, Ralf | pixelhouse GmbH
<rk...@pixelhouse.de> 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

Re: BOSTing FIELDS in SCHEMA.XML

Posted by Otis Gospodnetic <ot...@yahoo.com>.
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" <rk...@pixelhouse.de>
> To: solr-user@lucene.apache.org
> 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-


Re: BOSTing FIELDS in SCHEMA.XML

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
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-