lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Male (JIRA)" <>
Subject [jira] [Updated] (SOLR-2533) Improve API of ValueSource & FunctionQuery SortField weighting
Date Sun, 22 May 2011 07:12:47 GMT


Chris Male updated SOLR-2533:

    Attachment: SOLR-2533.patch

Patch adds weight(IndexSearcher) to both Sort & SortField.  

Sort.weight emulates the same algorithm as used to exist in SolrIndexSearcher#getSort, only
returning a new Sort if a SortField changes.

SortField.WEIGHTABLE type is added to SortField to prevent SortFields that need to be weighted
being used before they have been.

Reduces SolrIndexSearch#getSort down.  It can probably be removed.  Cleans out ValueSource
of the SolrSortField idea and dummy comparator.

> Improve API of ValueSource & FunctionQuery SortField weighting
> --------------------------------------------------------------
>                 Key: SOLR-2533
>                 URL:
>             Project: Solr
>          Issue Type: Improvement
>          Components: search
>            Reporter: Chris Male
>         Attachments: SOLR-2533.patch
> Started from LUCENE-2883: Support for sorting by ValueSource and FunctionQueries is done
through ValueSource#getSort and the ValueSourceSortField.  In order to support VSs containing
other Queries, its necessary to allow the Querys to be weighted by an IndexSearcher.  Currently
this is handled by having ValueSourceSortField implement SolrSortField.  In Solr's SolrIndexSearcher,
SortFields implementing SolrSortField are then weighted before the Sort is used.
> Sorting by FunctionQuery and ValueSource are invaluable and will become available to
all Lucene users in LUCENE-2883.  But in order to do so, we need to remove the coupling of
this functionality to Solr, and make it more standard.
> Any and all thoughts about how to do this are appreciated.

This message is automatically generated by JIRA.
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message