lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sheng <sheng...@gmail.com>
Subject Re: Exception while updating a lucene document
Date Sun, 26 Apr 2015 00:42:00 GMT
seems like you forgot to do facetsConfig.setMultiValued(`field`, true) too .

On Sat, Apr 25, 2015 at 7:37 AM, Gimantha Bandara <gimantha@wso2.com> wrote:

> Hi,
>
> I was able to fix the problem.. the issue was with my wrong usage of
> FacetConfig class. I was creating Document using facetConfig.build per each
> facet field with new FacetConfig object per each facetfield.
>
> Solution was to use one global FacetConfig per document add the facetfields
> to the document, Call the facetConfig.build at last. Then call the
> updateDocument on the created document.
>
>
> On Fri, Apr 24, 2015 at 10:13 PM, Gimantha Bandara <gimantha@wso2.com>
> wrote:
>
> > Hi all,
> >
> > I have documents which have some facetfields. If I tried to update a
> > document where the facet values are same in both facet fields i am
> getting
> > the following error. Note I am using "updateDocument" in indexWriter to
> > create the document.
> >
> > Exception in thread "pool-23-thread-2"
> java.lang.IllegalArgumentException:
> > DocValuesField "$facets" appears more than once in this document (only
> one
> > value is allowed per field)
> >     at
> >
> org.apache.lucene.index.BinaryDocValuesWriter.addValue(BinaryDocValuesWriter.java:70)
> >     at
> >
> org.apache.lucene.index.DefaultIndexingChain.indexDocValue(DefaultIndexingChain.java:445)
> >     at
> >
> org.apache.lucene.index.DefaultIndexingChain.processField(DefaultIndexingChain.java:392)
> >     at
> >
> org.apache.lucene.index.DefaultIndexingChain.processDocument(DefaultIndexingChain.java:318)
> >     at
> >
> org.apache.lucene.index.DocumentsWriterPerThread.updateDocument(DocumentsWriterPerThread.java:239)
> >     at
> >
> org.apache.lucene.index.DocumentsWriter.updateDocument(DocumentsWriter.java:457)
> >     at
> > org.apache.lucene.index.IndexWriter.updateDocument(IndexWriter.java:1511)
> >     at
> > org.apache.lucene.index.IndexWriter.updateDocument(IndexWriter.java:1488)
> >     at
> >
> org.wso2.carbon.analytics.dataservice.indexing.AnalyticsDataIndexer.updateIndex(AnalyticsDataIndexer.java:1055)
> >     at
> >
> org.wso2.carbon.analytics.dataservice.indexing.AnalyticsDataIndexer.processIndexUpdateOpBatches(AnalyticsDataIndexer.java:370)
> >     at
> >
> org.wso2.carbon.analytics.dataservice.indexing.AnalyticsDataIndexer.processIndexUpdateOperations(AnalyticsDataIndexer.java:408)
> >     at
> >
> org.wso2.carbon.analytics.dataservice.indexing.AnalyticsDataIndexer.processIndexOperations(AnalyticsDataIndexer.java:421)
> >     at
> >
> org.wso2.carbon.analytics.dataservice.indexing.AnalyticsDataIndexer.access$200(AnalyticsDataIndexer.java:115)
> >     at
> >
> org.wso2.carbon.analytics.dataservice.indexing.AnalyticsDataIndexer$IndexWorker.run(AnalyticsDataIndexer.java:1731)
> >     at
> >
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> >     at
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> >     at java.lang.Thread.run(Thread.java:722)
> >
> >
> > Any clue?
> >
> > --
> > Thanks,
> > Gimantha
> >
>
>
>
> --
> Gimantha Bandara
> Software Engineer
> WSO2. Inc : http://wso2.com
> Mobile : +94714961919
>

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