You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by "Fielder, Todd Patrick" <tp...@sandia.gov> on 2015/06/04 23:27:42 UTC
multi valued facets
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
Re: multi valued facets
Posted by Chris Hostetter <ho...@fucit.org>.
: Set the field to multiValued="true" in your schema. How'd you manage to
: get multiple values in there without an indexing error? An existing
: index built with Lucene directly?
Erik: this isn't a Solr question -- the error message mentioned comes from
the lucene/facets FacetsConfig class.
: > 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?
-Hoss
http://www.lucidworks.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: multi valued facets
Posted by Erik Hatcher <er...@gmail.com>.
Set the field to multiValued="true" in your schema. How'd you manage to get multiple values in there without an indexing error? An existing index built with Lucene directly?
Erik
> On Jun 4, 2015, at 17:27, Fielder, Todd Patrick <tp...@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
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: multi valued facets
Posted by Matt Hallman <ma...@jorsek.com>.
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 <tp...@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
>