[
https://issues.apache.org/jira/browse/LUCENE-2883?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13036898#comment-13036898
]
Yonik Seeley commented on LUCENE-2883:
--------------------------------------
bq. > Sort instances are like Query instances, and for many reasons should not
be bound to any particular searcher.
bq. Yeah that is true. But ValueSource#getSort actually returns a SortField.
Does the same apply to SortField instances?
Yeah, that's part of a Sort.
bq. Also, ValueSource#weight(IndexSearcher) returns a new SortField as well,
with a context containing the IndexSearcher. Consequently the new SortField is
bound to that particular searcher.
ValueSourceSortField.weight(IndexSearcher) - right. That's sort of how queries
can be re-written too... and the returned temporary SortField is never
retained. I guess I should have said that it should always be possible for
Query and Sort instances to be independent of searchers and readers... but
temporary ones can be created for the purposes of actually executing the query.
Note that Solr's query cache uses Sort as part of the cache key too.
> Consolidate Solr & Lucene FunctionQuery into modules
> -----------------------------------------------------
>
> Key: LUCENE-2883
> URL: https://issues.apache.org/jira/browse/LUCENE-2883
> Project: Lucene - Java
> Issue Type: Task
> Components: core/search
> Affects Versions: 4.0
> Reporter: Simon Willnauer
> Labels: gsoc2011, lucene-gsoc-11, mentor
> Fix For: 4.0
>
> Attachments: LUCENE-2883.patch
>
>
> Spin-off from the [dev list |
> http://www.mail-archive.com/[email protected]/msg13261.html]
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]