[
https://issues.apache.org/jira/browse/LUCENE-5417?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Peng Cheng updated LUCENE-5417:
-------------------------------
Attachment: MultiFieldCacheValueSources.patch
I'm uploading a patch of lucene-query including both ValueSource
implementations
(org.apache.lucene.queries.function.valuesource.Multi*FieldSource) and test
cases (org.apache.lucene.queries.function.TestMultiFieldCacheFunctions)
Able to retrieve multiple values from a field as a vector, the sequence of its
elements is the same as where they are inserted into the documents.
Only numerical Field types are tested, the String Field type is already
implemented (and being used internally in my project). But its test case has
several dependencies on some Solr-core component (namely the string distance
function), and I'm still figuring out how to run test cases in Solr package.
Due to the same reason all ValueSources are not registered with Solr's QParser
yet. I'll add this part later, in the mean time you are welcomed to test it as
a Lucene component. Any help and suggestion is appreciated.
> Solr function query supports reading multiple values from a field.
> ------------------------------------------------------------------
>
> Key: LUCENE-5417
> URL: https://issues.apache.org/jira/browse/LUCENE-5417
> Project: Lucene - Core
> Issue Type: New Feature
> Components: core/query/scoring
> Affects Versions: 4.6
> Environment: N/A
> Reporter: Peng Cheng
> Priority: Minor
> Fix For: 4.7
>
> Attachments: MultiFieldCacheValueSources.patch
>
> Original Estimate: 168h
> Remaining Estimate: 168h
>
> Solr function query is a powerful tool to customize search criterion and
> ranking function (http://wiki.apache.org/solr/FunctionQuery). However, it
> cannot effectively benefit from field values from multi-valued field, namely,
> the field(...) function can only read one value and discard the others.
> This limitation has been associated with FieldCacheSource, and the fact that
> FieldCache cannot fetch multiple values from a field, but such constraint has
> been largely lifted by LUCENE-3354, which allows multiple values to be
> extracted from one field. Those values in turn can be used as parameters of
> other functions to yield a single score.
> I personally find this limitation very unhandy when building a
> learning-to-rank system that uses many cues and string features. Therefore I
> would like to post this feature request and (hopefully) work on it myself.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]