Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0
Description
See https://groups.google.com/forum/#!topic/qi4j-dev/g4BF0q7tqc4
Jaydatt Desai a écrit :
> Hello Gentlemen,
>
> I was doing some testing with ManyAssociation, where I was adding many(~200) number of entities to this ManyAssociation property. For Index/Query here is ElasticSearch.
> So, when I was executing this test case it failed and throws an "ElasticSearchIndexException". This is only occurred when trying to associate entities up to some limit (works perfectly with ~100 entities in this case, but throws exception when we try to associate ~200), and this limit vary upon entity size.
>
> Details are below:
> Exception:
> org.qi4j.index.elasticsearch.ElasticSearchIndexException: failure in bulk execution:
> [178]: index [qi4j_index], type [qi4j_entities], id [869f4cf5-b258-4aa4-9536-c11b336862c5-0], message [IllegalArgumentException[Document contains at least one immense term in field="_all" (whose UTF8 encoding is longer than the max length 32766), all of which were skipped. Please correct the analyzer to not produce such terms. The prefix of the first immense term is: '[38 36 39 66 34 63 66 35 2d 62 32 35 38 2d 34 61 61 34 2d 39 35 33 36 2d 63 31 31 62 33 33]...']]
> at org.qi4j.index.elasticsearch.ElasticSearchIndexer$Mixin.notifyChanges(ElasticSearchIndexer.java:150)
> at org.qi4j.spi.entitystore.StateChangeNotificationConcern$1.commit(StateChangeNotificationConcern.java:44)
> at org.qi4j.spi.entitystore.ConcurrentModificationCheckConcern$ConcurrentCheckingEntityStoreUnitOfWork$1.commit(ConcurrentModificationCheckConcern.java:116)
>
> Code:
>
> @Test
> public void testManyAssociation() throws Exception{
> UnitOfWork uow = module.newUnitOfWork();
> TestEntity testEntity = module.currentUnitOfWork().newEntity(TestEntity.class);
>
> for(int i = 0 ; i<200; i++)
> uow.complete();
>
> }
>
>
> public interface TestEntity
> extends EntityComposite
>
>
> public interface TestEntity2
> extends EntityComposite
>
>