polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paulmer...@apache.org
Subject [5/7] polygene-java git commit: indexing-elasticsearch: minor enhancements
Date Sun, 23 Apr 2017 11:07:35 GMT
indexing-elasticsearch: minor enhancements


Project: http://git-wip-us.apache.org/repos/asf/polygene-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/polygene-java/commit/9a31a124
Tree: http://git-wip-us.apache.org/repos/asf/polygene-java/tree/9a31a124
Diff: http://git-wip-us.apache.org/repos/asf/polygene-java/diff/9a31a124

Branch: refs/heads/develop
Commit: 9a31a124f418a8d69bac70eec9b4371067a2d2cb
Parents: b2ff271
Author: Paul Merlin <paulmerlin@apache.org>
Authored: Sun Apr 23 13:05:47 2017 +0200
Committer: Paul Merlin <paulmerlin@apache.org>
Committed: Sun Apr 23 13:05:47 2017 +0200

----------------------------------------------------------------------
 .../index/elasticsearch/ElasticSearchFinder.java     |  2 +-
 .../index/elasticsearch/ImmenseTermTest.java         | 15 ++++-----------
 2 files changed, 5 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/polygene-java/blob/9a31a124/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/ElasticSearchFinder.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/ElasticSearchFinder.java
b/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/ElasticSearchFinder.java
index fe4c029..18c49eb 100644
--- a/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/ElasticSearchFinder.java
+++ b/extensions/indexing-elasticsearch/src/main/java/org/apache/polygene/index/elasticsearch/ElasticSearchFinder.java
@@ -316,7 +316,7 @@ public interface ElasticSearchFinder
                     processSpecification( shouldBuilder, operand, variables );
                     orBuilder.should( shouldBuilder );
                 }
-                orBuilder.minimumNumberShouldMatch( 1 );
+                orBuilder.minimumShouldMatch( 1 );
                 queryBuilder.must( orBuilder );
             }
             else

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/9a31a124/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ImmenseTermTest.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ImmenseTermTest.java
b/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ImmenseTermTest.java
index 2935d8c..a8bd09b 100644
--- a/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ImmenseTermTest.java
+++ b/extensions/indexing-elasticsearch/src/test/java/org/apache/polygene/index/elasticsearch/ImmenseTermTest.java
@@ -20,7 +20,6 @@
 
 package org.apache.polygene.index.elasticsearch;
 
-import java.util.List;
 import org.apache.polygene.api.association.ManyAssociation;
 import org.apache.polygene.api.common.Optional;
 import org.apache.polygene.api.common.Visibility;
@@ -78,9 +77,6 @@ public class ImmenseTermTest
     public interface TestEntity
         extends EntityComposite
     {
-        @Optional
-        Property<String> property();
-
         @Queryable( false )
         ManyAssociation<TestEntity2> manyAssociation();
     }
@@ -90,9 +86,6 @@ public class ImmenseTermTest
     {
         @Optional
         Property<String> property();
-
-        @Optional
-        Property<List<Byte>> binaryProperty();
     }
 
     @Override
@@ -128,12 +121,12 @@ public class ImmenseTermTest
     public void testManyAssociation()
         throws Exception
     {
-        long count = 10_000L;
+        int count = 10_000;
         TestEntity testEntity;
         try( UnitOfWork uow = unitOfWorkFactory.newUnitOfWork() )
         {
             testEntity = uow.newEntity( TestEntity.class );
-            for( long i = 0; i < count; i++ )
+            for( int i = 0; i < count; i++ )
             {
                 TestEntity2 testEntity2 = unitOfWorkFactory.currentUnitOfWork().newEntity(
TestEntity2.class );
                 testEntity2.property().set( "test" );
@@ -149,8 +142,8 @@ public class ImmenseTermTest
                     eq( templateFor( TestEntity2.class ).property(), "test" )
                 )
             );
-            assertThat( query.count(), is( count ) );
-            assertThat( testEntity.manyAssociation().count(), is( (int) count ) );
+            assertThat( (int) query.count(), is( count ) );
+            assertThat( testEntity.manyAssociation().count(), is( count ) );
         }
     }
 }


Mime
View raw message