Adding date boosting to complex SOLR queries -


I currently have a SOLR query that queries (q), query field (qf) and phrase field (pf) Uses I want to retrieve results is an example:

  / solr / select? Q = superbowl and qf = title ^ 3 + title = 2 + intro + integer & amp; Pf = title ^ 3 + title = 2 + intro + integer & amp; FLI = ID, title, TS_modified, score and debug learned = true  

The idea is that the title and title of "main object", its best indicates that the result "about "But introduction and full text also provides some input. That is, imagine a collection of links, where there is a metadata in the archive (what is its collection), but each link has its data (link title, summary, etc.). If we search for "superbowl", then the most relevant results in the archive metadata are "superbowl", the least relevant results are "superbowl" in the summary of those links ... but they are all valid results.

What I'm trying to do promotes the score of relevance so that the most recent results float on top, but the headline, title, intro, formula as part of the full text A recent result with the search string in the archive metadata would be more relevant than the one in the link metadata as well ... but this "only links" could be more relevant than the old results with the search string in recent results archiving Metadata (I hope that is somewhat obvious).

The problem is that I can not understand how to add the documented Boost function to the SOLR site using the QF / PF areas. Specifically ...

  / solr / select? Q = {! Boost% 20b}  

= $ Dateboost = 20v = $ qq} and dateboost = ord () to promote result from date, from SOLR site: Ts_modified) & amp; Qq = superbowl & amp; Fl = ts_modified, score & debugQuery = true

However, how do I combine that query with the use of QF and PF

Thanks for Danben's response , I came up with the following:

  / solr / select? Q = {! Boost% 20b = $ dateboost% 20v = $ qq% 20defType = dismax} and dateboost = ts_modified & amp; Qq = superbowl and qf = title ^ 3 + title = 2 + intro = 2 + integer and pf = title ^ 3 + headline ^ 2 + intu ^ 2 + fulltext and float = ts_modiered, score and debug learned = true  

It seems that I had real problems:

  • I copy / paste
  • I include defType = dismax in my q param When I did not avoid them (% 20) instead of avoiding the space of q param, so that it would focus on the Qf / pf parameter

checkout

is based on this function, which The difference between milliseconds between two timestamps / dates, and which increases as the value passes.

Since you are using DisMaxRequestHandler, you may need to specify this by querying the bq / bf parameter:

bq - (bot query) A raw lucene query that will be included in the user query to affect the score. If this is a boolean scan, with the default boost (1.0 F), the individual clauses will be directly added to the main query. Otherwise, this query will also be included. This ultimate can be specified many times, and the boots are coupled. Note: The above behavior is only effective if a single biq parameter is specified. Therefore you can disable it by specifying an additional, blank, beacu parameter.

BF - (with optional boost) Functions (boost function) which will be included in the query to affect the score to the user. The format is: "Funka (arg1, arg2) ^ 1.2 function (arg3, arg4) ^ 2.2" Note: White space is not allowed in function arguments. This ultimate can be specified multiple times, and adds the function.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -