You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by Apache Wiki <wi...@apache.org> on 2007/04/11 06:32:22 UTC

[Solr Wiki] Trivial Update of "SolrRelevancyFAQ" by YonikSeeley

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.

The following page has been changed by YonikSeeley:
http://wiki.apache.org/solr/SolrRelevancyFAQ

The comment on the change is:
work in progress

New page:
= Solr Relevancy FAQ =
[[TableOfContents]]

== How can I make matches on one field score higher than matches on another ==

== How can I boost the score of exact case matches ==

== How can I index the same field more than once ==

== How can I match parts of words, or subwords ==

== How can I increase the score if terms appear closer together ==

== How can I increase the score for certain documents ==
To increase the scores for certain documents that match a query, regardless of what that query may be, one can use index-time boosts.

boosted (provided that the hit was on a field for which norms were not omitted).  Index-time boosts can be specified per-field also.  An Index-time boost on a value of a multiValued field applies to all values for that field.

== How are documents scored ==
Basic scoring factors:
  * tf stands for term frequency - the more times a search term appears in a document, the higher the score
  * idf stands for inverse document frequency - matches on rarer terms count more than matches on common terms 
  * coord is the coordination factor - if there are multiple terms in a query, the more terms that match, the higher the score
  * lengthNorm - matches on a smaller field score higher than matches on a larger field
  * index-time boost - if a boost was specified for a document at index time, scores for searches that match that document will be boosted.
  * query clause boost - a user may explicitly boost the contribution of one part of a query over another.


== How can I change the score of a document based on the *value* of a field ==
Use a [http://lucene.apache.org/solr/api/org/apache/solr/search/function/FunctionQuery.html FunctionQuery] as a component of your query.

Solr can parse function queries in the following [http://lucene.apache.org/solr/api/org/apache/solr/search/QueryParsing.html#parseFunction(java.lang.String,%20org.apache.solr.schema.IndexSchema) syntax].


== How can I boost the score of newer documents ==
  * Do an explicit sort by date (relevancy scores are ignored)
  * Use an index-time boost that is larger for newer documents
  * Use a FunctionQuery to influence the score based on a date field.
    Use something of the form recip(rord(myfield),1,1000,1000)
    http://lucene.apache.org/solr/api/org/apache/solr/search/function/ReciprocalFloatFunction.html

Re: [Solr Wiki] Trivial Update of "SolrRelevancyFAQ" by YonikSeeley

Posted by Yonik Seeley <yo...@apache.org>.
On 4/12/07, Chris Hostetter <ho...@fucit.org> wrote:
> : New page:
> : = Solr Relevancy FAQ =
>
> Should we merge this info with SolrRelevancyCookbook?
>
> (is the info on that page of any use to anyone?)
>
> http://wiki.apache.org/solr/SolrRelevancyCookbook

I need to work on it more, then I was going to replace that page.

-Yonik

Re: [Solr Wiki] Trivial Update of "SolrRelevancyFAQ" by YonikSeeley

Posted by Chris Hostetter <ho...@fucit.org>.
: New page:
: = Solr Relevancy FAQ =

Should we merge this info with SolrRelevancyCookbook?

(is the info on that page of any use to anyone?)

http://wiki.apache.org/solr/SolrRelevancyCookbook



-Hoss