I don't think there's a way to do this out of the box, but if there
were a SpanFirstQuery parser plugin, it could be used as a dismax
boosting query (bq) or as an optional _query_ expression.
Erik
On Mar 5, 2010, at 11:56 AM, Сергей Кашин wrote:
I have some documents in Solr index like this
<doc>
<arr name="brand">
<str>toyota</str>
</arr>
<arr name="name">
<str>shock front</str>
</arr>
</doc>
<doc>
<arr name="brand">
<str>toyota</str>
</arr>
<arr name="name">
<str>front shock</str>
</arr>
</doc>
If I query with 'shock' phrase the result is not sorted and may be
--------------
shock front
front shock
--------------
or
--------------
front shock
shock front
--------------
Can i boost document with name "shock front" by query phrase 'shock'
and boost document with name "front shock" by query phrase 'front' ?