java.lang.IllegalArgumentException: cannot index term vector payloads without term vector positions (field="x_id_lowercase_copy")

Hibernate JIRA | Benoit Guillon | 1 year ago
  1. 0

    Hello, When serializing / deserializing an AddLuceneWork with the Avro serializer on a document containing a field type with term vector = YES, the resulting field type is not equal to the original one: the storeTermVectorPayloads attribute is set to true but was originally false. Attached is the org.hibernate.search.test.serialization.SerializationTest unit test taken from github where I added a new field {code:java} Field newField = new Field( "StringTermYes", "String field 3", Store.YES, Field.Index.ANALYZED, Field.TermVector.YES); {code} When used in a real-life scenario (like JMS replication), this leads to the following Lucene error: {code} java.lang.IllegalArgumentException: cannot index term vector payloads without term vector positions (field="x_id_lowercase_copy") at org.apache.lucene.index.TermVectorsConsumerPerField.start(TermVectorsConsumerPerField.java:147) at org.apache.lucene.index.TermsHashPerField.start(TermsHashPerField.java:297) at org.apache.lucene.index.FreqProxTermsWriterPerField.start(FreqProxTermsWriterPerField.java:72) at org.apache.lucene.index.DefaultIndexingChain$PerField.invert(DefaultIndexingChain.java:616) at org.apache.lucene.index.DefaultIndexingChain.processField(DefaultIndexingChain.java:359) 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.addDocument(IndexWriter.java:1246) at org.hibernate.search.backend.impl.lucene.works.AddWorkDelegate.performWork(AddWorkDelegate.java:54) at org.hibernate.search.backend.impl.lucene.LuceneBackendQueueTask.performWork(LuceneBackendQueueTask.java:111) at org.hibernate.search.backend.impl.lucene.LuceneBackendQueueTask.applyUpdates(LuceneBackendQueueTask.java:92) at org.hibernate.search.backend.impl.lucene.LuceneBackendQueueTask.run(LuceneBackendQueueTask.java:47) at org.hibernate.search.backend.impl.lucene.SyncWorkProcessor$Consumer.applyChangesets(SyncWorkProcessor.java:145) at org.hibernate.search.backend.impl.lucene.SyncWorkProcessor$Consumer.run(SyncWorkProcessor.java:135) at java.lang.Thread.run(Thread.java:745) {code} Thanks Benoit

    Hibernate JIRA | 1 year ago | Benoit Guillon
    java.lang.IllegalArgumentException: cannot index term vector payloads without term vector positions (field="x_id_lowercase_copy")
  2. 0

    Hello, When serializing / deserializing an AddLuceneWork with the Avro serializer on a document containing a field type with term vector = YES, the resulting field type is not equal to the original one: the storeTermVectorPayloads attribute is set to true but was originally false. Attached is the org.hibernate.search.test.serialization.SerializationTest unit test taken from github where I added a new field {code:java} Field newField = new Field( "StringTermYes", "String field 3", Store.YES, Field.Index.ANALYZED, Field.TermVector.YES); {code} When used in a real-life scenario (like JMS replication), this leads to the following Lucene error: {code} java.lang.IllegalArgumentException: cannot index term vector payloads without term vector positions (field="x_id_lowercase_copy") at org.apache.lucene.index.TermVectorsConsumerPerField.start(TermVectorsConsumerPerField.java:147) at org.apache.lucene.index.TermsHashPerField.start(TermsHashPerField.java:297) at org.apache.lucene.index.FreqProxTermsWriterPerField.start(FreqProxTermsWriterPerField.java:72) at org.apache.lucene.index.DefaultIndexingChain$PerField.invert(DefaultIndexingChain.java:616) at org.apache.lucene.index.DefaultIndexingChain.processField(DefaultIndexingChain.java:359) 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.addDocument(IndexWriter.java:1246) at org.hibernate.search.backend.impl.lucene.works.AddWorkDelegate.performWork(AddWorkDelegate.java:54) at org.hibernate.search.backend.impl.lucene.LuceneBackendQueueTask.performWork(LuceneBackendQueueTask.java:111) at org.hibernate.search.backend.impl.lucene.LuceneBackendQueueTask.applyUpdates(LuceneBackendQueueTask.java:92) at org.hibernate.search.backend.impl.lucene.LuceneBackendQueueTask.run(LuceneBackendQueueTask.java:47) at org.hibernate.search.backend.impl.lucene.SyncWorkProcessor$Consumer.applyChangesets(SyncWorkProcessor.java:145) at org.hibernate.search.backend.impl.lucene.SyncWorkProcessor$Consumer.run(SyncWorkProcessor.java:135) at java.lang.Thread.run(Thread.java:745) {code} Thanks Benoit

    Hibernate JIRA | 1 year ago | Benoit Guillon
    java.lang.IllegalArgumentException: cannot index term vector payloads without term vector positions (field="x_id_lowercase_copy")
  3. 0

    Strange exception in Elasticsearch 1.4.3

    Google Groups | 2 years ago | Angel Cross
    java.lang.IllegalArgumentException: State contains AttributeImpl of type org.apache.lucene.analysis.tokenattributes.PayloadAttributeImpl that is not in in this AttributeSource
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    cluster can't recover after upgrade from 1.1.1 to 1.3.2 due to MaxBytesLengthExceededException

    Google Groups | 2 years ago | omar
    org.elasticsearch.index.gateway.IndexShardGatewayRecoveryException: [transient_2014_09_10][7] failed to recover shard
  6. 0

    How to correctly implement a delegating tokenizer in lucene 4.x?

    Stack Overflow | 2 years ago | user3159253
    java.lang.IllegalArgumentException: first position increment must be > 0 (got 0) for field 'address' at org.apache.lucene.index.DefaultIndexingChain$PerField.invert(DefaultIndexingChain.java:617)

  1. tyson925 3 times, last 4 months ago
2 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.IllegalArgumentException

    cannot index term vector payloads without term vector positions (field="x_id_lowercase_copy")

    at org.apache.lucene.index.TermVectorsConsumerPerField.start()
  2. Lucene
    IndexWriter.addDocument
    1. org.apache.lucene.index.TermVectorsConsumerPerField.start(TermVectorsConsumerPerField.java:147)
    2. org.apache.lucene.index.TermsHashPerField.start(TermsHashPerField.java:297)
    3. org.apache.lucene.index.FreqProxTermsWriterPerField.start(FreqProxTermsWriterPerField.java:72)
    4. org.apache.lucene.index.DefaultIndexingChain$PerField.invert(DefaultIndexingChain.java:616)
    5. org.apache.lucene.index.DefaultIndexingChain.processField(DefaultIndexingChain.java:359)
    6. org.apache.lucene.index.DefaultIndexingChain.processDocument(DefaultIndexingChain.java:318)
    7. org.apache.lucene.index.DocumentsWriterPerThread.updateDocument(DocumentsWriterPerThread.java:239)
    8. org.apache.lucene.index.DocumentsWriter.updateDocument(DocumentsWriter.java:457)
    9. org.apache.lucene.index.IndexWriter.updateDocument(IndexWriter.java:1511)
    10. org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:1246)
    10 frames
  3. Hibernate Search Engine
    SyncWorkProcessor$Consumer.run
    1. org.hibernate.search.backend.impl.lucene.works.AddWorkDelegate.performWork(AddWorkDelegate.java:54)
    2. org.hibernate.search.backend.impl.lucene.LuceneBackendQueueTask.performWork(LuceneBackendQueueTask.java:111)
    3. org.hibernate.search.backend.impl.lucene.LuceneBackendQueueTask.applyUpdates(LuceneBackendQueueTask.java:92)
    4. org.hibernate.search.backend.impl.lucene.LuceneBackendQueueTask.run(LuceneBackendQueueTask.java:47)
    5. org.hibernate.search.backend.impl.lucene.SyncWorkProcessor$Consumer.applyChangesets(SyncWorkProcessor.java:145)
    6. org.hibernate.search.backend.impl.lucene.SyncWorkProcessor$Consumer.run(SyncWorkProcessor.java:135)
    6 frames
  4. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:745)
    1 frame