Have boost effect on lucene/compass field search.
Posted
by PeterP
on Stack Overflow
See other posts from Stack Overflow
or by PeterP
Published on 2010-04-13T09:46:12Z
Indexed on
2010/04/13
13:52 UTC
Read the original article
Hit count: 375
Hi there,
In our compass mapping, we're boosting "better" documents to push them up in the list of search results. Something like this:
<boost name="boostFactor" default="1.0"/>
<property name="name"><meta-data>name</meta-data></property>
While this works fine for fulltext search, it does not when doing a field search, e.g. the boost is ignored when searching something like
name:Peter
Is there any way to enable boosting for field searches? Thanks for your help and sorry if this is a dumb question - I am new to Lucene/Compass.
Best regards, Peter
© Stack Overflow or respective owner