I think we should move Mutable* over? Grouping module will need all of these, I think? (Ie if we want to allow users to group by arbitrary typed field).
Hmm good question. This looks to be related to sorting by FQ (
SOLR-1297) because some FQs need to be weighted. Not sure what to do here yet... which FQs in particular require this?
Both all of them and not many of them (complicated). The sorting of FQ
functionality is necessary for all FQs in Solr since the user can sort
by any FQ. However the extension made by the SolrSortField is the ability
to create a 'weighted' SortField by passing in a IndexSearcher and having
it stored in a Map. The Map is then made available to any DocValues when
they create their values.
This is when the 'not many' comes into effect. Only a few DocValues implementations
use the contents of the Map. DocFreqValueSource for example uses the IndexSearcher
in the Map. But I suppose there could be many user implementations that do.
SolrSortField is currently used in SolrIndexSearcher to 'weight' the Sorts. I wonder
whether we can simplify this? When ValueSource#getSort is called (which is only in 1
place really), we can pass in the IndexSearcher, meaning the SortField can be 'weighted'
then and there.
Since SolrSortField is only used in this 1 place currently, we can then revisit dropping it?
Do you think its worth opening an issue to address this first?
I think apply 90/10 rule here? Start with the easy-to-move queries? We don't need initial go to be perfect... progress not perfection.
Could we sort the initial commit out and then I can move them over in batches?
Already have a 108k patch, I'd say moving what we can will push it towards 300k
Do you have a sense of whether Solr's FQs are a superset of Lucene's? Ie, is there anything Lucene's FQs can do that Solr's can't?
Solr FQs are hugely more advanced than the ValueSourceQuery based stuff in Lucene.
Its not a full 1 to 1 change since the APIs are slightly different, but I'd say
that we'd want users to use the FQ line of classes. I cant see anything in Lucene's
VSQs that you couldn't do using FQs.