You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Ying Andrews (JIRA)" <ji...@apache.org> on 2014/01/24 18:17:40 UTC

[jira] [Commented] (LUCENE-5367) NoSuchElementException occurs when org.apache.lucene.facet.index.FacetFields is used.

    [ https://issues.apache.org/jira/browse/LUCENE-5367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13881161#comment-13881161 ] 

Ying Andrews commented on LUCENE-5367:
--------------------------------------

Hi Shai,

I am experiencing the same issue with Lucene 4.4.  Will this issue go away if I upgrade to Lucene 4.6 (the latest release as of today.)  Or should I grab the code from 4.7 branch and try out myself?

Thank you very much for your time and effort.

Ying



> NoSuchElementException occurs when org.apache.lucene.facet.index.FacetFields is used.
> -------------------------------------------------------------------------------------
>
>                 Key: LUCENE-5367
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5367
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/facet
>    Affects Versions: 4.2.1, 4.6
>            Reporter: Lucien Pereira
>            Priority: Blocker
>
> Hi,
> When I use the API as below :
> {code}
> List<CategoryPath> categories = Collections.<CategoryPath>singletonList(new CategoryPath(path.toArray(new String[path.size()])));
> FacetFields facetFields = new FacetFields(taxonomyWriter);
> facetFields.addFields(document, categories);
> taxonomyWriter.commit();
> {code}
> An exception occurs :
> {quote}
> java.util.NoSuchElementException
> 	at java.util.Collections$1.next(Collections.java:3302)
> 	at org.apache.lucene.facet.index.DrillDownStream.reset(DrillDownStream.java:78)
> 	at org.apache.lucene.index.DocInverterPerField.processFields(DocInverterPerField.java:97)
> 	at org.apache.lucene.index.DocFieldProcessor.processDocument(DocFieldProcessor.java:248)
> 	at org.apache.lucene.index.DocumentsWriterPerThread.updateDocument(DocumentsWriterPerThread.java:253)
> 	at org.apache.lucene.index.DocumentsWriter.updateDocument(DocumentsWriter.java:453)
> 	at org.apache.lucene.index.IndexWriter.updateDocument(IndexWriter.java:1520)
> 	at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:1190)
> 	at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:1171)
> {quote}
> Seems likes this is due to multiple calls to org.apache.lucene.facet.index.DrillDownStream#reset which invoques #next() on an 'used' iterator.
> Regards,
> Lucien 



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org