You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by fo...@apache.org on 2023/06/14 08:50:52 UTC

[jackrabbit-oak] branch trunk updated: NOJIRA: remove propertyIndex/nodeScopeIndex from dynamicBoost test to verify they still succeed (#974)

This is an automated email from the ASF dual-hosted git repository.

fortino pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
     new d3b9502fe3 NOJIRA: remove propertyIndex/nodeScopeIndex from dynamicBoost test to verify they still succeed (#974)
d3b9502fe3 is described below

commit d3b9502fe3a254d63852d7c9c43796ec184dfed7
Author: Fabrizio Fortino <fa...@gmail.com>
AuthorDate: Wed Jun 14 10:50:47 2023 +0200

    NOJIRA: remove propertyIndex/nodeScopeIndex from dynamicBoost test to verify they still succeed (#974)
---
 .../jackrabbit/oak/plugins/index/DynamicBoostCommonTest.java   | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/oak-search/src/test/java/org/apache/jackrabbit/oak/plugins/index/DynamicBoostCommonTest.java b/oak-search/src/test/java/org/apache/jackrabbit/oak/plugins/index/DynamicBoostCommonTest.java
index 27b0f52c57..5f4cd7fb6a 100644
--- a/oak-search/src/test/java/org/apache/jackrabbit/oak/plugins/index/DynamicBoostCommonTest.java
+++ b/oak-search/src/test/java/org/apache/jackrabbit/oak/plugins/index/DynamicBoostCommonTest.java
@@ -30,6 +30,7 @@ import org.junit.Test;
 
 import java.io.ByteArrayInputStream;
 import java.util.List;
+import java.util.UUID;
 
 import static org.junit.Assert.assertEquals;
 
@@ -167,15 +168,21 @@ public abstract class DynamicBoostCommonTest extends AbstractQueryTest {
         Tree testParent = createNodeWithType(root.getTree("/"), "test", JcrConstants.NT_UNSTRUCTURED, "");
 
         Tree predicted1 = createAssetNodeWithPredicted(testParent, "asset1", "titleone long");
+        predicted1.setProperty("jcr:mixinTypes", List.of("mix:referenceable"), Type.STRINGS);
+        predicted1.setProperty("jcr:uuid", UUID.randomUUID().toString());
         createPredictedTag(predicted1, "plant", 0.1);
         createPredictedTag(predicted1, "flower", 0.1);
 
         Tree predicted2 = createAssetNodeWithPredicted(testParent, "asset2", "titletwo long");
+        predicted2.setProperty("jcr:mixinTypes", List.of("mix:referenceable"), Type.STRINGS);
+        predicted2.setProperty("jcr:uuid", UUID.randomUUID().toString());
         createPredictedTag(predicted2, "plant", 0.9);
         createPredictedTag(predicted2, "flower", 0.1);
         createPredictedTag(predicted2, "coffee", 0.5);
 
         Tree predicted3 = createAssetNodeWithPredicted(testParent, "asset3", "titlethree short");
+        predicted3.setProperty("jcr:mixinTypes", List.of("mix:referenceable"), Type.STRINGS);
+        predicted3.setProperty("jcr:uuid", UUID.randomUUID().toString());
         createPredictedTag(predicted3, "plant", 0.5);
         createPredictedTag(predicted3, "blue", 0.5);
         root.commit();
@@ -202,8 +209,6 @@ public abstract class DynamicBoostCommonTest extends AbstractQueryTest {
         predictedTagsDynamicBoost.setProperty("name", "jcr:content/metadata/predictedTags/.*");
         predictedTagsDynamicBoost.setProperty("isRegexp", true);
         predictedTagsDynamicBoost.setProperty("dynamicBoost", true);
-        predictedTagsDynamicBoost.setProperty("propertyIndex", true);
-        predictedTagsDynamicBoost.setProperty("nodeScopeIndex", true);
 
         if (similarityTags) {
             Tree predictedTags = createNodeWithType(indexRuleProps, "predictedTags", JcrConstants.NT_UNSTRUCTURED, "");
@@ -211,6 +216,7 @@ public abstract class DynamicBoostCommonTest extends AbstractQueryTest {
             predictedTags.setProperty("isRegexp", true);
             predictedTags.setProperty("similarityTags", true);
         }
+
         root.commit();
     }