Paul Merlin created ZEST-57:
-------------------------------

             Summary: ElasticSearch Query engine generate immense term queries 
on "large" associations
                 Key: ZEST-57
                 URL: https://issues.apache.org/jira/browse/ZEST-57
             Project: Zest
          Issue Type: Bug
    Affects Versions: 2.0
            Reporter: Paul Merlin
            Assignee: Paul Merlin
             Fix For: 2.1


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++) {
>             TestEntity2 testEntity2 = 
> module.currentUnitOfWork().newEntity(TestEntity2.class);
>             testEntity2.property().set("test");
>             testEntity.manyAssociation().add(testEntity2);
>         }
>         uow.complete();
>
>     }
>
>
> public interface TestEntity
>             extends EntityComposite
>     {
>         @Optional
>         Property<String> property();
>
>         ManyAssociation<TestEntity2> manyAssociation();
>     }
>
>     public interface TestEntity2
>             extends EntityComposite
>     {
>         @Optional
>         Property<String> property();
>
>         @Optional
>         Property<List<Byte>> binaryProperty();
>
>     }
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to