lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Hallman <matt.hall...@jorsek.com>
Subject Re: multi valued facets
Date Thu, 04 Jun 2015 21:41:16 GMT
Hello,
You must set the field name as multi-valued with the FacetsConfig
<http://lucene.apache.org/core/4_9_0/facet/org/apache/lucene/facet/FacetsConfig.html>
.
FacetsConfig facetsConfig = new FacetsConfig();
facetsConfig.setMultiValued("fieldName", true);
Then you can call:
facetsConfig.build(luceneDoc);
This returns a Document that you can store with your IndexWriter.



On Thu, Jun 4, 2015 at 5:27 PM, Fielder, Todd Patrick <tpfield@sandia.gov>
wrote:

> I am trying to add a facet for which each document can have multiple
> values, but am receiving the following exception:
> dimension "Role Name" is not multiValued, but it appears more than once in
> this document
>
> How do I create a MultiValued Facet?
>
> Thanks in advance
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message