[ https://issues.apache.org/jira/browse/SOLR-17449?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pierre Salagnac updated SOLR-17449: ----------------------------------- Attachment: image.png > bboxField subfield Error in atomic updating > ------------------------------------------- > > Key: SOLR-17449 > URL: https://issues.apache.org/jira/browse/SOLR-17449 > Project: Solr > Issue Type: Bug > Components: Schema and Analysis > Affects Versions: main (10.0) > Reporter: Seunghan Jung > Priority: Minor > Attachments: image-2024-09-13-17-45-17-161.png, image.png > > > For fields of type `bboxField`, derived fields such as `minX`, `maxX`, > `minY`, `maxY`, etc., are added to the schema and indexed. > However, this causes issues during atomic updates. During an atomic update, > when a new document is moved and indexed, the fields of type `bboxField` are > re-indexed with `minX`, `maxX`, `minY`, `maxY` just as they were initially. > Since the original document already contains these fields, they are indexed > again in the new document. However, because they are already indexed by the > `bbox` field, this results in duplicate indexing. If the `numberType` > attribute of the bbox field type has `docValues=true`, an error occurs due to > the docValues being written twice. > Here is the error message for this case: > {code:java} > Caused by: java.lang.IllegalArgumentException: DocValuesField "bbox__maxX" > appears more than once in this document (only one value is allowed per field) > at > org.apache.lucene.index.NumericDocValuesWriter.addValue(NumericDocValuesWriter.java:53) > ~[?:?] > at > org.apache.lucene.index.IndexingChain.indexDocValue(IndexingChain.java:937) > ~[?:?] > at > org.apache.lucene.index.IndexingChain.processField(IndexingChain.java:723) > ~[?:?] > at > org.apache.lucene.index.IndexingChain.processDocument(IndexingChain.java:576) > ~[?:?] > at > org.apache.lucene.index.DocumentsWriterPerThread.updateDocuments(DocumentsWriterPerThread.java:242) > ~[?:?] > at > org.apache.lucene.index.DocumentsWriter.updateDocuments(DocumentsWriter.java:432) > ~[?:?] > at > org.apache.lucene.index.IndexWriter.updateDocuments(IndexWriter.java:1545) > ~[?:?] > at > org.apache.lucene.index.IndexWriter.updateDocuments(IndexWriter.java:1521) > ~[?:?] > at > org.apache.solr.update.DirectUpdateHandler2.updateDocOrDocValues(DirectUpdateHandler2.java:1062) > ~[?:?] > at > org.apache.solr.update.DirectUpdateHandler2.doNormalUpdate(DirectUpdateHandler2.java:421) > ~[?:?] > at > org.apache.solr.update.DirectUpdateHandler2.addDoc0(DirectUpdateHandler2.java:374) > ~[?:?] > at > org.apache.solr.update.DirectUpdateHandler2.addDoc(DirectUpdateHandler2.java:311) > ~[?:?]{code} > > Of course, setting the docValues="false" for the field type used in > numberType resolves the issue. > However, this is not explained in the[ Solr Reference > Guide|https://solr.apache.org/guide/solr/latest/query-guide/spatial-search.html#bboxfield]. > Instead, the example schema shows docValues="true", which makes it seem like > this is how it should be configured. > !image-2024-09-13-17-45-17-161.png|width=1037,height=233! -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org