lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack Krupansky" <j...@basetechnology.com>
Subject Re: howto: get the value from a multivalued field?
Date Fri, 24 May 2013 00:06:34 GMT
Yeah, you can't do that. You'll need to keep a copy of whichever value from 
the multi-valued field you wish to be considered "the" value in a separate, 
non-multi-valued field. Possibly using an update processor, such as one of:

FirstFieldValueUpdateProcessorFactory, LastFieldValueUpdateProcessorFactory, 
MaxFieldValueUpdateProcessorFactory, MinFieldValueUpdateProcessorFactory

-- Jack Krupansky

-----Original Message----- 
From: world hello
Sent: Thursday, May 23, 2013 7:50 PM
To: solr-user@lucene.apache.org
Subject: FW: howto: get the value from a multivalued field?





hi, all -
how can I retrieve the value out of a multivalued field in a customized 
function query?I want to implement a function query whose first parameter is 
a multi-value fileld, from which values are retrieved and manipulated.
however, I used the code but get exceptions - "can not use FieldCache on 
multivalued field"
/////////////////////////////public ValueSource parse(FunctionQParser fp) 
throws ParseException {
        try {             ValueSource vs = fp.parseValueSource();       } 
catch (...)       {       }////////////////////////////
Thanks.
- Frank

 


Mime
View raw message