lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fielder, Todd Patrick" <>
Subject RE: [EXTERNAL] Re: Multivalued DocValuesField
Date Mon, 31 Oct 2016 16:19:51 GMT
I'll give it a try, thanks...I appreciate your help


-----Original Message-----
From: Alan Woodward [] 
Sent: Monday, October 31, 2016 10:02 AM
Subject: [EXTERNAL] Re: Multivalued DocValuesField

You need to use a SortedNumericDocValuesField, which allows for multiple numeric values to
be stored per-document.  I’m not sure if that’s in Lucene 5.0, though, you may need to
upgrade to something more recent.

Alan Woodward

> On 31 Oct 2016, at 15:34, Fielder, Todd Patrick <> wrote:
> Hello,
> I have a question about Multivalued DocValuesFields...I am using 
> Lucene 5.0
> I am indexing an object that contains an Array of Sub-objects. Those sub-objects have
a Long value that I need to index with fieldStore=true.  That works just fine.
> I also want to sort that field and so I am attempting to also index it 
> as a NumericDocValues field.  I am using the statement below to 
> accomplish that doc.add(new NumericDocValuesField(field.toString(), 
> time));
> However, since the field occurs multiple times, I am receiving the below error:
> DocValuesField "plannedCompletionDate" appears more than once in this 
> document (only one value is allowed per field)
> I have tried to set the value to multivalued on the FacetsConfig, but 
> that doesn't work (it works for multi-valued statements in facets, but 
> not NumericDocValueFields) 
> getConfig().setMultiValued("plannedCompletionDate", true); 
> //getConfig() returns type FacetsConfig()
> Any ideas how to accomplish this?
> Thanks in advance
> -Todd

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

View raw message