Lucene term boosting with sunspot-rails -


i'm having issue lucene's term [boosting][1] query syntax, in ruby on rails via sunspot_rails gem. whereby can specify weight of specific term during query, , not related weighting of particular field.

the html query generated sunspot uses qf parameter specify fields searched configured, , q parameter query itself. when caret added search term specify boost (i.e. q=searchterm^5) returns no results, though results returned without boost term.

if, on other hand, create http query manually , manually specify field search (q=title_texts:searchterm^5), results returned , scores seem affected boost.

in short, appears though query term boosting doesn't work in conjunction fields specified qf.

my application calls search across several fields, using respective boosts associated fields, conditionally in turn boosting on individual terms of query.

any insight?

[1]: http://lucene.apache.org/java/2_9_1/queryparsersyntax.html#boosting term

sunspot uses dismax parser fulltext search, eschews usual lucene query syntax in favor of limited (but user-input-friendly) query syntax combined set of additional parameters (such qf) can constructed client application tune how search works. sunspot provides support per-field boost using boost_fields method in fulltext dsl:

http://outoftime.github.com/sunspot/docs/classes/sunspot/dsl/fulltext.html#m000129


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -