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 mk...@apache.org on 2025/05/08 10:26:08 UTC
(jackrabbit-oak) 03/08: OAK-11694:Implement inference in oak-search-elastic
This is an automated email from the ASF dual-hosted git repository.
mkataria pushed a commit to branch OAK-11694_1
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git
commit e11f112f096228d5e07d3b7650e1cc062d94236a
Author: Mohit Kataria <ti...@gmail.com>
AuthorDate: Mon May 5 14:46:56 2025 +0530
OAK-11694:Implement inference in oak-search-elastic
---
.../index/elastic/ElasticIndexProviderService.java | 26 +-
.../index/elastic/index/ElasticIndexHelper.java | 83 +-
.../index/elastic/index/ElasticIndexWriter.java | 63 +-
.../index/elastic/query/ElasticIndexPlanner.java | 1 +
.../index/elastic/query/ElasticRequestHandler.java | 264 +++--
.../elastic/query/inference/InferenceService.java | 89 +-
.../query/inference/InferenceServiceManager.java | 18 +-
...rvice.java => InferenceServiceUsingConfig.java} | 80 +-
....java => InferenceServiceUsingIndexConfig.java} | 12 +-
.../index/elastic/ElasticAbstractQueryTest.java | 85 +-
.../elastic/ElasticIndexProviderServiceTest.java | 2 +
.../index/elastic/ElasticIndexQueryCommonTest.java | 5 +-
.../elastic/ElasticPropertyIndexFailuresTest.java | 19 +-
...ava => ElasticPropertyIndexNonFailureTest.java} | 55 +-
.../index/elastic/ElasticPropertyIndexTest.java | 57 --
.../elastic/index/ElasticIndexWriterTest.java | 6 +
.../inference/ElasticInferenceUsingConfigTest.java | 339 +++++++
.../inferenceUsingConfig/content/cars.json | 1029 +++++++++++++++++++
.../inferenceUsingConfig/content/health.json | 1029 +++++++++++++++++++
.../resources/inferenceUsingConfig/content/ml.json | 1029 +++++++++++++++++++
.../inferenceUsingConfig/content/programming.json | 1029 +++++++++++++++++++
.../inferenceUsingConfig/content/yoga.json | 1029 +++++++++++++++++++
...inner_guide_to_data_manipulation_in_python.json | 1040 ++++++++++++++++++++
.../queries/delayed/farming_practices.json | 0
.../queries/faulty/machine_learning.json | 0
...to_improve_mental_health_through_exercises.json | 1040 ++++++++++++++++++++
...tritional_advice_for_a_healthier_lifestyle.json | 1040 ++++++++++++++++++++
...ological_advancements_in_electric_vehicles.json | 1040 ++++++++++++++++++++
...he_key_algorithms_used_in_machine_learning.json | 1040 ++++++++++++++++++++
29 files changed, 11234 insertions(+), 315 deletions(-)
diff --git a/oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/ElasticIndexProviderService.java b/oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/ElasticIndexProviderService.java
index a026b3f79e..43565495dd 100644
--- a/oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/ElasticIndexProviderService.java
+++ b/oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/ElasticIndexProviderService.java
@@ -23,8 +23,11 @@ import org.apache.jackrabbit.oak.plugins.index.IndexEditorProvider;
import org.apache.jackrabbit.oak.plugins.index.IndexInfoProvider;
import org.apache.jackrabbit.oak.plugins.index.elastic.index.ElasticIndexEditorProvider;
import org.apache.jackrabbit.oak.plugins.index.elastic.query.ElasticIndexProvider;
+import org.apache.jackrabbit.oak.plugins.index.elastic.query.inference.InferenceConfig;
+import org.apache.jackrabbit.oak.plugins.index.elastic.query.inference.InferenceConstants;
import org.apache.jackrabbit.oak.plugins.index.fulltext.PreExtractedTextProvider;
import org.apache.jackrabbit.oak.plugins.index.search.ExtractedTextCache;
+import org.apache.jackrabbit.oak.query.QueryEngineSettings;
import org.apache.jackrabbit.oak.spi.commit.Observer;
import org.apache.jackrabbit.oak.spi.query.QueryIndexProvider;
import org.apache.jackrabbit.oak.spi.state.NodeStore;
@@ -69,9 +72,11 @@ public class ElasticIndexProviderService {
protected static final String PROP_ELASTIC_API_KEY_ID = "elasticsearch.apiKeyId";
protected static final String PROP_ELASTIC_API_KEY_SECRET = "elasticsearch.apiKeySecret";
protected static final String PROP_LOCAL_TEXT_EXTRACTION_DIR = "localTextExtractionDir";
+ private static final boolean DEFAULT_IS_INFERENCE_ENABLED = false;
@ObjectClassDefinition(name = "ElasticIndexProviderService", description = "Apache Jackrabbit Oak ElasticIndexProvider")
public @interface Config {
+
@AttributeDefinition(name = "Disable the OAK Elastic service",
description = "If true, does not start the Elastic component")
boolean disabled() default false;
@@ -79,7 +84,7 @@ public class ElasticIndexProviderService {
@AttributeDefinition(name = "Extracted text cache size (MB)",
description = "Cache size in MB for caching extracted text for some time. When set to 0 then " +
"cache would be disabled")
- int extractedTextCacheSizeInMB() default 20 ;
+ int extractedTextCacheSizeInMB() default 20;
@AttributeDefinition(name = "Extracted text cache expiry (secs)",
description = "Time in seconds for which the extracted text would be cached in memory")
@@ -119,7 +124,17 @@ public class ElasticIndexProviderService {
@AttributeDefinition(name = "Remote index deletion threshold", description = "Time in seconds after which a remote index whose local index is not found gets deleted." +
"Default is 1 day.")
- int remoteIndexDeletionThreshold() default 24*60*60;
+ int remoteIndexDeletionThreshold() default 24 * 60 * 60;
+
+ @AttributeDefinition(
+ name = "Enable inference",
+ description = "If enabled the inference index config will be used"
+ )
+ boolean isInferenceEnabled() default DEFAULT_IS_INFERENCE_ENABLED;
+
+
+ @AttributeDefinition(name = "Inference Config Path", description = "Path to the inference configuration")
+ String inferenceConfigPath() default InferenceConstants.DEFAULT_OAK_INDEX_INFERENCE_CONFIG_PATH;
}
@@ -151,6 +166,7 @@ public class ElasticIndexProviderService {
private ElasticMetricHandler metricHandler;
private ElasticIndexTracker indexTracker;
private ElasticIndexEditorProvider elasticIndexEditorProvider;
+ private boolean isInferenceEnabled;
@Activate
private void activate(BundleContext bundleContext, Config config) {
@@ -167,6 +183,12 @@ public class ElasticIndexProviderService {
metricHandler.markEnabled(isElasticAvailable);
whiteboard = new OsgiWhiteboard(bundleContext);
+ if (System.getProperty(QueryEngineSettings.OAK_INFERENCE_ENABLED) != null) {
+ this.isInferenceEnabled = Boolean.parseBoolean(System.getProperty(QueryEngineSettings.OAK_INFERENCE_ENABLED));
+ } else {
+ this.isInferenceEnabled = config.isInferenceEnabled();
+ }
+ InferenceConfig.reInitialize(nodeStore, config.inferenceConfigPath(), isInferenceEnabled);
//initializeTextExtractionDir(bundleContext, config);
//initializeExtractedTextCache(config, statisticsProvider);
diff --git a/oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/index/ElasticIndexHelper.java b/oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/index/ElasticIndexHelper.java
index cd9ac9f2b3..d6c4c6a81d 100644
--- a/oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/index/ElasticIndexHelper.java
+++ b/oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/index/ElasticIndexHelper.java
@@ -16,18 +16,6 @@
*/
package org.apache.jackrabbit.oak.plugins.index.elastic.index;
-import static org.apache.jackrabbit.oak.plugins.index.elastic.ElasticPropertyDefinition.DEFAULT_SIMILARITY_METRIC;
-
-import co.elastic.clients.json.JsonData;
-import org.apache.jackrabbit.oak.api.Type;
-import org.apache.jackrabbit.oak.plugins.index.elastic.ElasticIndexDefinition;
-import org.apache.jackrabbit.oak.plugins.index.elastic.ElasticPropertyDefinition;
-import org.apache.jackrabbit.oak.plugins.index.elastic.util.ElasticIndexUtils;
-import org.apache.jackrabbit.oak.plugins.index.search.FieldNames;
-import org.apache.jackrabbit.oak.plugins.index.search.IndexDefinition.IndexingRule;
-import org.apache.jackrabbit.oak.plugins.index.search.PropertyDefinition;
-import org.jetbrains.annotations.NotNull;
-
import co.elastic.clients.elasticsearch._types.Time;
import co.elastic.clients.elasticsearch._types.mapping.DenseVectorProperty;
import co.elastic.clients.elasticsearch._types.mapping.DynamicMapping;
@@ -37,18 +25,40 @@ import co.elastic.clients.elasticsearch.indices.CreateIndexRequest;
import co.elastic.clients.elasticsearch.indices.IndexSettings;
import co.elastic.clients.elasticsearch.indices.IndexSettingsAnalysis;
import co.elastic.clients.elasticsearch.indices.PutIndicesSettingsRequest;
+import co.elastic.clients.json.JsonData;
import co.elastic.clients.util.ObjectBuilder;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.apache.jackrabbit.oak.api.Type;
+import org.apache.jackrabbit.oak.commons.PathUtils;
+import org.apache.jackrabbit.oak.plugins.index.elastic.ElasticIndexDefinition;
+import org.apache.jackrabbit.oak.plugins.index.elastic.ElasticPropertyDefinition;
+import org.apache.jackrabbit.oak.plugins.index.elastic.query.inference.InferenceConfig;
+import org.apache.jackrabbit.oak.plugins.index.elastic.query.inference.InferenceConstants;
+import org.apache.jackrabbit.oak.plugins.index.elastic.query.inference.InferenceIndexConfig;
+import org.apache.jackrabbit.oak.plugins.index.elastic.util.ElasticIndexUtils;
+import org.apache.jackrabbit.oak.plugins.index.search.FieldNames;
+import org.apache.jackrabbit.oak.plugins.index.search.IndexDefinition.IndexingRule;
+import org.apache.jackrabbit.oak.plugins.index.search.PropertyDefinition;
+import org.jetbrains.annotations.NotNull;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
+import static org.apache.jackrabbit.oak.plugins.index.elastic.ElasticPropertyDefinition.DEFAULT_SIMILARITY_METRIC;
+
/**
* Provides utility functions around Elasticsearch indexing
*/
class ElasticIndexHelper {
+ private static final Logger LOG = LoggerFactory.getLogger(ElasticIndexHelper.class);
+ private static final ObjectMapper mapper = new ObjectMapper();
// Unset the refresh interval and disable replicas at index creation to optimize for initial loads
// https://www.elastic.co/guide/en/elasticsearch/reference/current/tune-for-indexing-speed.html
private static final Time INITIAL_REFRESH_INTERVAL = Time.of(b -> b.time("-1"));
@@ -97,9 +107,48 @@ class ElasticIndexHelper {
if (indexDefinition.inferenceDefinition != null) {
mapInferenceDefinition(builder, indexDefinition.inferenceDefinition);
}
+ // We only add mappings if both the inference config (in queryEngineSettings config) and the inference index config are enabled.
+ if (InferenceConfig.getInstance().isInferenceEnabled() && InferenceConfig.getInstance().isEnabled()) {
+ mapInferenceConfig(builder, indexDefinition, InferenceConfig.getInstance());
+ }
return builder;
}
+ private static void mapInferenceConfig(TypeMapping.Builder builder, @NotNull ElasticIndexDefinition indexDefinition, @NotNull InferenceConfig inferenceConfig) {
+ String indexName = PathUtils.getName(indexDefinition.getIndexName());
+
+ InferenceIndexConfig inferenceIndexConfig = inferenceConfig.getInferenceIndexConfig(indexName);
+ if (InferenceIndexConfig.NOOP.equals(inferenceIndexConfig)) {
+ return;
+ }
+ try {
+ // We are already validating the enricherConfigJson in the InferenceIndexConfig constructor
+ Map<String, Object> enricherConfigJson = mapper.readValue(inferenceConfig.getInferenceIndexConfig(indexName).getEnricherConfig(),
+ new TypeReference<Map<String, Object>>() {
+ });
+ // Store the enricher configuration in the index metadata so that it can be used by the enricher service
+ enricherConfigJson.forEach((k, v) -> {
+ builder.meta(k, JsonData.of(v));
+ });
+ } catch (JsonProcessingException e) {
+ throw new RuntimeException("enricherConfig parsing should never fail as it is validated in InferenceIndexConfig" + e.getMessage());
+ }
+
+ builder.properties(InferenceConstants.VECTOR_SPACES, b -> b.object(spaces -> {
+ for (var inferenceModelConfig : inferenceIndexConfig.getInferenceModelConfigs().entrySet()) {
+ if (inferenceModelConfig.getValue().isEnabled()) {
+ spaces.properties(inferenceModelConfig.getKey(), v -> v.nested(vb -> {
+ vb.properties("id", p -> p.keyword(k -> k));
+ vb.properties("vector", p -> p.denseVector(dv -> dv));
+ vb.properties("metadata", p -> p.object(o -> o.enabled(false)));
+ return vb;
+ }));
+ }
+ }
+ return spaces;
+ }));
+ }
+
private static void mapInternalProperties(@NotNull TypeMapping.Builder builder) {
builder.properties(FieldNames.PATH,
b1 -> b1.keyword(builder3 -> builder3))
@@ -304,13 +353,13 @@ class ElasticIndexHelper {
int denseVectorSize = pd.getSimilaritySearchDenseVectorSize();
DenseVectorProperty denseVectorProperty = new DenseVectorProperty.Builder()
- .index(true)
- .dims(denseVectorSize)
- .similarity(DEFAULT_SIMILARITY_METRIC)
- .build();
+ .index(true)
+ .dims(denseVectorSize)
+ .similarity(DEFAULT_SIMILARITY_METRIC)
+ .build();
builder.properties(FieldNames.createSimilarityFieldName(
- ElasticIndexUtils.fieldName(pd.name)),
+ ElasticIndexUtils.fieldName(pd.name)),
b1 -> b1.denseVector(denseVectorProperty));
}
diff --git a/oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/index/ElasticIndexWriter.java b/oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/index/ElasticIndexWriter.java
index 9ba8e5f4d2..a5313cd291 100644
--- a/oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/index/ElasticIndexWriter.java
+++ b/oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/index/ElasticIndexWriter.java
@@ -29,6 +29,7 @@ import co.elastic.clients.elasticsearch.indices.UpdateAliasesRequest;
import co.elastic.clients.elasticsearch.indices.UpdateAliasesResponse;
import co.elastic.clients.json.JsonpUtils;
import org.apache.jackrabbit.oak.api.PropertyState;
+import org.apache.jackrabbit.oak.commons.PathUtils;
import org.apache.jackrabbit.oak.plugins.index.IndexConstants;
import org.apache.jackrabbit.oak.plugins.index.elastic.ElasticConnection;
import org.apache.jackrabbit.oak.plugins.index.elastic.ElasticIndexDefinition;
@@ -36,6 +37,9 @@ import org.apache.jackrabbit.oak.plugins.index.elastic.ElasticIndexNameHelper;
import org.apache.jackrabbit.oak.plugins.index.elastic.ElasticIndexNode;
import org.apache.jackrabbit.oak.plugins.index.elastic.ElasticIndexStatistics;
import org.apache.jackrabbit.oak.plugins.index.elastic.ElasticIndexTracker;
+import org.apache.jackrabbit.oak.plugins.index.elastic.query.inference.InferenceConfig;
+import org.apache.jackrabbit.oak.plugins.index.elastic.query.inference.InferenceConstants;
+import org.apache.jackrabbit.oak.plugins.index.elastic.query.inference.InferenceIndexConfig;
import org.apache.jackrabbit.oak.plugins.index.elastic.util.ElasticIndexUtils;
import org.apache.jackrabbit.oak.plugins.index.importer.AsyncLaneSwitcher;
import org.apache.jackrabbit.oak.plugins.index.search.spi.editor.FulltextIndexWriter;
@@ -48,6 +52,7 @@ import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.util.ArrayList;
+import java.util.Map;
import java.util.Set;
import java.util.UUID;
@@ -78,6 +83,9 @@ class ElasticIndexWriter implements FulltextIndexWriter<ElasticDocument> {
// old index until the new one gets enabled) during incremental reindexing
if (this.reindex) {
try {
+ //TODO we should observe changes under inference config path.
+ InferenceConfig.reInitialize();
+ // refresh inference config on any index reindex.
long seed = indexDefinition.indexNameSeed == 0L ? UUID.randomUUID().getMostSignificantBits() : indexDefinition.indexNameSeed;
// merge gets called on node store later in the indexing flow
definitionBuilder.setProperty(ElasticIndexDefinition.PROP_INDEX_NAME_SEED, seed);
@@ -134,9 +142,62 @@ class ElasticIndexWriter implements FulltextIndexWriter<ElasticDocument> {
public void updateDocument(String path, ElasticDocument doc) throws IOException {
// update is a heavier operation compared to index, we can always use the index operation on full reindex
// or if the index is not externally modifiable
- if (reindex || !indexDefinition.isExternallyModifiable()) {
+ String jcrIndexName = PathUtils.getName(indexDefinition.getIndexName());
+ /*
+ we directly index the document if:
+ content is being reindexed
+ OR
+ (the index is not externally modifiable
+ AND InferenceIndexConfig is NOOP
+ )
+ */
+ if (reindex
+ || (!indexDefinition.isExternallyModifiable()
+ && !InferenceConfig.getInstance().isInferenceEnabled()
+ && (InferenceIndexConfig.NOOP.equals(InferenceConfig.getInstance().getInferenceIndexConfig(jcrIndexName))))) {
bulkProcessorHandler.index(indexName, ElasticIndexUtils.idFromPath(path), doc);
} else {
+ if (InferenceConfig.getInstance().isInferenceEnabled()
+ && InferenceConfig.getInstance().getInferenceIndexConfig(jcrIndexName).isEnabled()) {
+ doc.addProperty(InferenceConstants.ENRICH_NODE,
+ Map.of(InferenceConstants.ENRICH_STATUS, InferenceConstants.ENRICH_STATUS_PENDING));
+ }
+ /*
+
+ Once inference is enabled, it is not trivial to disable it. As inference configuration in Elasticsearch (ES)
+ is persisted only during the creation of a new index
+ or reindexing of an existing one. This means that the enricher configuration is updated only under
+ these conditions. If we want to disable inference on instance, the existing enricher configuration
+ remains unchanged, and the enricher will continue processing new documents.
+
+ To stop the enricher from processing documents, we need to explicitly update the enricher status to
+ `COMPLETED` in the ES document by adding the following structure:
+ {
+ :enrich {
+ "status": "COMPLETED",
+ "inferenceDisabled": true
+ }
+ }
+
+ The `inferenceDisabled` flag is added to allow for potential evaluations at a later stage.
+
+ This should happen in all cases where we try to disable inference i.e.
+
+ 1. Inference is disabled in ElasticIndexProviderService but InferenceConfig is valid.
+ 2. Inference is enabled and InferenceConfig is not equal to InferenceConfig.NOOP i.e.
+ any of the properties is different from below:
+ enricherConfig = "";
+ isEnabled = false;
+ inferenceModelConfigs = Map.of();
+ Note: This is possible by not setting enricherConfig to empty string as other fields are set to default values.
+ */
+ else {
+ Map<String, Object> enrichDocStatus = Map.of(
+ InferenceConstants.ENRICH_STATUS, InferenceConstants.ENRICH_STATUS_COMPLETED,
+ InferenceConstants.ENRICH_STATUS_INFERENCE_DISABLED, true
+ );
+ doc.addProperty(InferenceConstants.ENRICH_NODE, enrichDocStatus);
+ }
bulkProcessorHandler.update(indexName, ElasticIndexUtils.idFromPath(path), doc);
}
}
diff --git a/oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/query/ElasticIndexPlanner.java b/oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/query/ElasticIndexPlanner.java
index eaff458804..3dc705fa95 100644
--- a/oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/query/ElasticIndexPlanner.java
+++ b/oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/query/ElasticIndexPlanner.java
@@ -19,6 +19,7 @@
package org.apache.jackrabbit.oak.plugins.index.elastic.query;
import org.apache.jackrabbit.JcrConstants;
+import org.apache.jackrabbit.oak.plugins.index.elastic.query.inference.InferenceConfig;
import org.apache.jackrabbit.oak.plugins.index.search.IndexDefinition;
import org.apache.jackrabbit.oak.plugins.index.search.IndexNode;
import org.apache.jackrabbit.oak.plugins.index.search.PropertyDefinition;
diff --git a/oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/query/ElasticRequestHandler.java b/oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/query/ElasticRequestHandler.java
index dbae459210..87625e8404 100644
--- a/oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/query/ElasticRequestHandler.java
+++ b/oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/query/ElasticRequestHandler.java
@@ -16,23 +16,26 @@
*/
package org.apache.jackrabbit.oak.plugins.index.elastic.query;
-import static org.apache.jackrabbit.JcrConstants.JCR_MIXINTYPES;
-import static org.apache.jackrabbit.JcrConstants.JCR_PRIMARYTYPE;
-import static org.apache.jackrabbit.oak.plugins.index.elastic.ElasticPropertyDefinition.DEFAULT_SIMILARITY_METRIC;
-import static org.apache.jackrabbit.oak.plugins.index.elastic.util.ElasticIndexUtils.toFloats;
-import static org.apache.jackrabbit.oak.plugins.index.elastic.util.TermQueryBuilderFactory.newAncestorQuery;
-import static org.apache.jackrabbit.oak.plugins.index.elastic.util.TermQueryBuilderFactory.newDepthQuery;
-import static org.apache.jackrabbit.oak.plugins.index.elastic.util.TermQueryBuilderFactory.newPathQuery;
-import static org.apache.jackrabbit.oak.plugins.index.elastic.util.TermQueryBuilderFactory.newPrefixPathQuery;
-import static org.apache.jackrabbit.oak.plugins.index.elastic.util.TermQueryBuilderFactory.newPrefixQuery;
-import static org.apache.jackrabbit.oak.plugins.index.elastic.util.TermQueryBuilderFactory.newPropertyRestrictionQuery;
-import static org.apache.jackrabbit.oak.plugins.index.elastic.util.TermQueryBuilderFactory.newWildcardPathQuery;
-import static org.apache.jackrabbit.oak.plugins.index.elastic.util.TermQueryBuilderFactory.newWildcardQuery;
-import static org.apache.jackrabbit.oak.plugins.index.search.FulltextIndexConstants.DYNAMIC_BOOST_WEIGHT;
-import static org.apache.jackrabbit.oak.spi.query.QueryConstants.JCR_PATH;
-import static org.apache.jackrabbit.oak.spi.query.QueryConstants.JCR_SCORE;
-import static org.apache.jackrabbit.util.ISO8601.parse;
-
+import co.elastic.clients.elasticsearch._types.FieldValue;
+import co.elastic.clients.elasticsearch._types.KnnQuery;
+import co.elastic.clients.elasticsearch._types.SortOptions;
+import co.elastic.clients.elasticsearch._types.SortOrder;
+import co.elastic.clients.elasticsearch._types.SuggestMode;
+import co.elastic.clients.elasticsearch._types.aggregations.Aggregation;
+import co.elastic.clients.elasticsearch._types.query_dsl.BoolQuery;
+import co.elastic.clients.elasticsearch._types.query_dsl.ChildScoreMode;
+import co.elastic.clients.elasticsearch._types.query_dsl.MoreLikeThisQuery;
+import co.elastic.clients.elasticsearch._types.query_dsl.NestedQuery;
+import co.elastic.clients.elasticsearch._types.query_dsl.Operator;
+import co.elastic.clients.elasticsearch._types.query_dsl.Query;
+import co.elastic.clients.elasticsearch._types.query_dsl.QueryStringQuery;
+import co.elastic.clients.elasticsearch._types.query_dsl.TermQuery;
+import co.elastic.clients.elasticsearch._types.query_dsl.TextQueryType;
+import co.elastic.clients.elasticsearch.core.search.Highlight;
+import co.elastic.clients.elasticsearch.core.search.HighlightField;
+import co.elastic.clients.elasticsearch.core.search.InnerHits;
+import co.elastic.clients.elasticsearch.core.search.PhraseSuggester;
+import co.elastic.clients.json.JsonpUtils;
import co.elastic.clients.util.ObjectBuilder;
import org.apache.jackrabbit.oak.api.Blob;
import org.apache.jackrabbit.oak.api.PropertyState;
@@ -43,6 +46,9 @@ import org.apache.jackrabbit.oak.plugins.index.elastic.ElasticConnection;
import org.apache.jackrabbit.oak.plugins.index.elastic.ElasticIndexDefinition;
import org.apache.jackrabbit.oak.plugins.index.elastic.ElasticPropertyDefinition;
import org.apache.jackrabbit.oak.plugins.index.elastic.query.async.facets.ElasticFacetProvider;
+import org.apache.jackrabbit.oak.plugins.index.elastic.query.inference.InferenceConfig;
+import org.apache.jackrabbit.oak.plugins.index.elastic.query.inference.InferenceConstants;
+import org.apache.jackrabbit.oak.plugins.index.elastic.query.inference.InferenceModelConfig;
import org.apache.jackrabbit.oak.plugins.index.elastic.query.inference.InferenceService;
import org.apache.jackrabbit.oak.plugins.index.elastic.query.inference.InferenceServiceManager;
import org.apache.jackrabbit.oak.plugins.index.elastic.util.ElasticIndexUtils;
@@ -64,6 +70,8 @@ import org.apache.jackrabbit.oak.spi.query.fulltext.FullTextExpression;
import org.apache.jackrabbit.oak.spi.query.fulltext.FullTextOr;
import org.apache.jackrabbit.oak.spi.query.fulltext.FullTextTerm;
import org.apache.jackrabbit.oak.spi.query.fulltext.FullTextVisitor;
+import org.apache.jackrabbit.oak.spi.query.fulltext.InferenceQuery;
+import org.apache.jackrabbit.oak.spi.query.fulltext.InferenceQueryConfig;
import org.apache.jackrabbit.oak.spi.state.NodeState;
import org.apache.lucene.search.WildcardQuery;
import org.jetbrains.annotations.NotNull;
@@ -71,27 +79,7 @@ import org.jetbrains.annotations.Nullable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import co.elastic.clients.elasticsearch._types.FieldValue;
-import co.elastic.clients.elasticsearch._types.KnnQuery;
-import co.elastic.clients.elasticsearch._types.SortOptions;
-import co.elastic.clients.elasticsearch._types.SortOrder;
-import co.elastic.clients.elasticsearch._types.SuggestMode;
-import co.elastic.clients.elasticsearch._types.aggregations.Aggregation;
-import co.elastic.clients.elasticsearch._types.query_dsl.BoolQuery;
-import co.elastic.clients.elasticsearch._types.query_dsl.ChildScoreMode;
-import co.elastic.clients.elasticsearch._types.query_dsl.MoreLikeThisQuery;
-import co.elastic.clients.elasticsearch._types.query_dsl.NestedQuery;
-import co.elastic.clients.elasticsearch._types.query_dsl.Operator;
-import co.elastic.clients.elasticsearch._types.query_dsl.Query;
-import co.elastic.clients.elasticsearch._types.query_dsl.QueryStringQuery;
-import co.elastic.clients.elasticsearch._types.query_dsl.TermQuery;
-import co.elastic.clients.elasticsearch._types.query_dsl.TextQueryType;
-import co.elastic.clients.elasticsearch.core.search.Highlight;
-import co.elastic.clients.elasticsearch.core.search.HighlightField;
-import co.elastic.clients.elasticsearch.core.search.InnerHits;
-import co.elastic.clients.elasticsearch.core.search.PhraseSuggester;
-import co.elastic.clients.json.JsonpUtils;
-
+import javax.jcr.PropertyType;
import java.io.IOException;
import java.io.StringReader;
import java.util.ArrayList;
@@ -110,7 +98,22 @@ import java.util.stream.Collectors;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;
-import javax.jcr.PropertyType;
+import static org.apache.jackrabbit.JcrConstants.JCR_MIXINTYPES;
+import static org.apache.jackrabbit.JcrConstants.JCR_PRIMARYTYPE;
+import static org.apache.jackrabbit.oak.plugins.index.elastic.ElasticPropertyDefinition.DEFAULT_SIMILARITY_METRIC;
+import static org.apache.jackrabbit.oak.plugins.index.elastic.util.ElasticIndexUtils.toFloats;
+import static org.apache.jackrabbit.oak.plugins.index.elastic.util.TermQueryBuilderFactory.newAncestorQuery;
+import static org.apache.jackrabbit.oak.plugins.index.elastic.util.TermQueryBuilderFactory.newDepthQuery;
+import static org.apache.jackrabbit.oak.plugins.index.elastic.util.TermQueryBuilderFactory.newPathQuery;
+import static org.apache.jackrabbit.oak.plugins.index.elastic.util.TermQueryBuilderFactory.newPrefixPathQuery;
+import static org.apache.jackrabbit.oak.plugins.index.elastic.util.TermQueryBuilderFactory.newPrefixQuery;
+import static org.apache.jackrabbit.oak.plugins.index.elastic.util.TermQueryBuilderFactory.newPropertyRestrictionQuery;
+import static org.apache.jackrabbit.oak.plugins.index.elastic.util.TermQueryBuilderFactory.newWildcardPathQuery;
+import static org.apache.jackrabbit.oak.plugins.index.elastic.util.TermQueryBuilderFactory.newWildcardQuery;
+import static org.apache.jackrabbit.oak.plugins.index.search.FulltextIndexConstants.DYNAMIC_BOOST_WEIGHT;
+import static org.apache.jackrabbit.oak.spi.query.QueryConstants.JCR_PATH;
+import static org.apache.jackrabbit.oak.spi.query.QueryConstants.JCR_SCORE;
+import static org.apache.jackrabbit.util.ISO8601.parse;
/**
* Class to map query plans into Elastic request objects.
@@ -194,6 +197,10 @@ public class ElasticRequestHandler {
for (String stf : elasticIndexDefinition.getSimilarityTagsFields()) {
Map<String, String> shallowMltParams = new HashMap<>(MoreLikeThisHelperUtil.getParamMapFromMltQuery(stf));
shallowMltParams.putAll(mltParams);
+ if (shallowMltParams.containsKey("mlt.fl") && shallowMltParams.get("mlt.fl").equals("*")) {
+ String simFields = generateFieldsForMLT();
+ shallowMltParams.put("mlt.fl", simFields);
+ }
bqb.should(m -> m.moreLikeThis(mltQuery(shallowMltParams)));
}
} else {
@@ -201,15 +208,16 @@ public class ElasticRequestHandler {
}
} else {
similarityQuery(queryNodePath, sp).ifPresent(similarityQuery ->
- bqb.filter(fb -> fb.exists(ef -> ef.field(similarityQuery.field())))
- .should(s -> s.knn(similarityQuery))
- );
+ bqb.filter(fb -> fb.exists(ef -> ef.field(similarityQuery.field())))
+ .should(s -> s.knn(similarityQuery))
+ );
}
// Add should clause to improve relevance using similarity tags only when similarity is
// enabled and there is at least one similarity tag property
if (elasticIndexDefinition.areSimilarityTagsEnabled() &&
!elasticIndexDefinition.getSimilarityTagsProperties().isEmpty()) {
+
// add should clause to improve relevance using similarity tags
bqb.should(s -> s
.moreLikeThis(m -> m
@@ -235,6 +243,49 @@ public class ElasticRequestHandler {
return bqb;
}
+ private String generateFieldsForMLT() {
+ //todo with addition of :enricher status for inference. All documents will now have :enricher for inference enabled indexes.
+ // as as result mlt is now returning all documents.
+ // find a better way so that these fields can be easily managed.
+ List<String> keys = elasticIndexDefinition.getPropertiesByName().entrySet().stream().map(Map.Entry::getKey).collect(Collectors.toList());
+ List<String> simFields = new ArrayList<>();
+ keys.forEach(key -> {
+ simFields.add(key);
+ simFields.add(key + ".keyword");
+ }
+ );
+ simFields.add(FieldNames.ANCESTORS);
+ simFields.add(FieldNames.PATH_DEPTH);
+ simFields.add(ElasticIndexDefinition.DYNAMIC_BOOST_FULLTEXT);
+ simFields.add(ElasticIndexDefinition.DYNAMIC_PROPERTIES);
+ simFields.add(FieldNames.FULLTEXT);
+ simFields.add(ElasticIndexDefinition.LAST_UPDATED);
+ simFields.add(FieldNames.PATH);
+ simFields.add(ElasticIndexDefinition.PATH_RANDOM_VALUE);
+ simFields.add(ElasticIndexDefinition.SIMILARITY_TAGS);
+ simFields.add(FieldNames.SPELLCHECK);
+ simFields.add(FieldNames.SUGGEST);
+
+ simFields.add(FieldNames.NULL_PROPS);
+ simFields.add(FieldNames.NOT_NULL_PROPS);
+ simFields.add(FieldNames.NODE_NAME);
+
+ if (!elasticIndexDefinition.getSimilarityProperties().isEmpty()) {
+ simFields.add(FieldNames.SIMILARITY_TAGS);
+ }
+ if (!elasticIndexDefinition.getDynamicBoostProperties().isEmpty()) {
+ simFields.add(ElasticIndexDefinition.DYNAMIC_BOOST_FULLTEXT);
+ }
+ StringBuilder sb = new StringBuilder();
+ for (String field : simFields) {
+ if (sb.length() > 0) {
+ sb.append(",");
+ }
+ sb.append(field);
+ }
+ return sb.toString();
+ }
+
public Optional<KnnQuery> similarityQuery(@NotNull String text, List<PropertyDefinition> sp) {
if (!sp.isEmpty()) {
LOG.debug("generating similarity query for {}", text);
@@ -282,9 +333,9 @@ public class ElasticRequestHandler {
@NotNull
private KnnQuery.Builder baseKnnQueryBuilder(String similarityPropFieldName, byte[] bytes, ElasticPropertyDefinition pd) {
KnnQuery.Builder knnQueryBuilder = new KnnQuery.Builder()
- .field(similarityPropFieldName)
- .queryVector(toFloats(bytes))
- .numCandidates(pd.getKnnSearchParameters().getCandidates());
+ .field(similarityPropFieldName)
+ .queryVector(toFloats(bytes))
+ .numCandidates(pd.getKnnSearchParameters().getCandidates());
if (!pd.getKnnSearchParameters().getSimilarityMetric().equals(DEFAULT_SIMILARITY_METRIC)) {
knnQueryBuilder.similarity(pd.getKnnSearchParameters().getSimilarity());
}
@@ -551,8 +602,11 @@ public class ElasticRequestHandler {
}
private boolean visitTerm(String propertyName, String text, String boost, boolean not) {
+ String queryText;
BoolQuery.Builder bqBuilder = new BoolQuery.Builder();
+
if (propertyName != null && FulltextIndex.isNodePath(propertyName) && !pr.isPathTransformed()) {
+ queryText = text;
//Get rid of /* as aggregated fulltext field name is the
//node relative path
String p = PathUtils.getParentPath(propertyName);
@@ -569,11 +623,37 @@ public class ElasticRequestHandler {
boolean includeDynamicBoostedValues = !elasticIndexDefinition.getDynamicBoostProperties().isEmpty() &&
elasticIndexDefinition.getDynamicBoostProperties().stream().anyMatch(ElasticPropertyDefinition::useInFullTextQuery);
+ String indexName = PathUtils.getName(indexPlan.getPlanName());
+ String inferenceModelConfig = null;
+ InferenceQueryConfig inferenceQueryConfig;
+ InferenceQuery inferenceQuery;
+ if (indexPlan.getFilter().getQueryLimits().isInferenceEnabled()
+ //todo should we remove this condition and always remove inferenceConfig from query
+ // so that other indexes can be used to do fulltext search with only text part of InferenceQuery.
+ // this will help in case another index gets picked, may be because of index corruption.
+ && InferenceConfig.getInstance().getInferenceIndexConfig(indexName).isEnabled()
+ && text.startsWith(InferenceQuery.INFERENCE_QUERY_CONFIG_PREFIX)) {
+ inferenceQuery = new InferenceQuery(text);
+ String queryConfig = inferenceQuery.getQueryInferenceConfig();
+ queryText = inferenceQuery.getQueryText();
+ inferenceQueryConfig = new InferenceQueryConfig(queryConfig);
+ inferenceModelConfig = InferenceConfig.getInstance().getInferenceModelConfig(indexName, inferenceQueryConfig.getInferenceModelConfig()).getInferenceModelConfigName();
+ } else {
+ inferenceQueryConfig = null;
+ inferenceQuery = null;
+ queryText = text;
+ }
+
+ if (indexPlan.getFilter().getQueryLimits().isInferenceEnabled() && InferenceConfig.getInstance().isEnabled()
+ && !InferenceModelConfig.NOOP.equals(InferenceConfig.getInstance().getInferenceModelConfig(indexName, inferenceModelConfig))) {
+
+ bqBuilder.must(m -> m.bool(b -> inferenceConfigQuery(b, propertyName, queryText, pr, includeDynamicBoostedValues, inferenceQuery, inferenceQueryConfig)));
+ }
// Experimental support for inference queries
- if (elasticIndexDefinition.inferenceDefinition != null && elasticIndexDefinition.inferenceDefinition.queries != null) {
- bqBuilder.must(m -> m.bool(b -> inference(b, propertyName, text, pr, includeDynamicBoostedValues)));
+ else if (elasticIndexDefinition.inferenceDefinition != null && elasticIndexDefinition.inferenceDefinition.queries != null) {
+ bqBuilder.must(m -> m.bool(b -> inference(b, propertyName, queryText, pr, includeDynamicBoostedValues)));
} else {
- QueryStringQuery.Builder qsqBuilder = fullTextQuery(text, getElasticFulltextFieldName(propertyName), pr, includeDynamicBoostedValues);
+ QueryStringQuery.Builder qsqBuilder = fullTextQuery(queryText, getElasticFulltextFieldName(propertyName), pr, includeDynamicBoostedValues);
bqBuilder.must(m -> m.queryString(qsqBuilder.build()));
}
}
@@ -582,7 +662,7 @@ public class ElasticRequestHandler {
bqBuilder.boost(Float.valueOf(boost));
}
- Stream<NestedQuery> dynamicScoreQueries = dynamicScoreQueries(text);
+ Stream<NestedQuery> dynamicScoreQueries = dynamicScoreQueries(queryText);
dynamicScoreQueries.forEach(dsq -> bqBuilder.should(s -> s.nested(dsq)));
if (not) {
@@ -597,11 +677,67 @@ public class ElasticRequestHandler {
return Query.of(q -> q.bool(result.get()));
}
+ private ObjectBuilder<BoolQuery> inferenceConfigQuery(BoolQuery.Builder b, String propertyName, String text, PlanResult pr, boolean dbEnabled, InferenceQuery inferenceQuery, InferenceQueryConfig inferenceQueryConfig) {
+ QueryStringQuery.Builder qsqBuilder = fullTextQuery(inferenceQuery.getQueryText(), getElasticFulltextFieldName(propertyName), pr, dbEnabled);
+
+ // the query can be null if no inference query is eligible for the given text or the min terms are not met
+ // in this case, we fall back to the default full-text query
+ if (inferenceQuery.getQueryInferenceConfig() != null) {
+
+ LOG.info("Using inference query config: {}", inferenceQuery.getQueryInferenceConfig());
+ try {
+ String inferenceQueryModelName = inferenceQueryConfig.getInferenceModelConfig();
+ String indexName = PathUtils.getName(elasticIndexDefinition.getIndexName());
+ InferenceModelConfig inferenceModelConfig = InferenceConfig.getInstance().getInferenceModelConfig(indexName, inferenceQueryModelName);
+ if (!inferenceModelConfig.isEnabled()
+ || inferenceModelConfig.getMinTerms() > inferenceQuery.getQueryText().split("\\s+").length) {
+ LOG.debug("inferenceModelConfig isEnable: {}, Config minTerms:{}, query: {}, ", inferenceModelConfig.isEnabled(),
+ inferenceModelConfig.getMinTerms(), text);
+ return b.must(mm -> mm.queryString(qsqBuilder.build()));
+ } else if (inferenceModelConfig.isEnabled() && inferenceModelConfig.getMinTerms() <= inferenceQuery.getQueryText().split("\\s+").length) {
+ InferenceService inferenceService = InferenceServiceManager
+ .getInstance(inferenceModelConfig);
+ List<Float> embeddings = inferenceService.embeddings(inferenceQuery.getQueryText(), (int) inferenceModelConfig.getTimeoutMillis());
+ if (embeddings != null) {
+ KnnQuery.Builder knnQueryBuilder = new KnnQuery.Builder();
+ knnQueryBuilder.field(InferenceConstants.VECTOR_SPACES + "." + inferenceQueryModelName + "." + InferenceConstants.VECTOR);
+ knnQueryBuilder.numCandidates(inferenceModelConfig.getNumCandidates());
+ knnQueryBuilder.queryVector(embeddings);
+
+ KnnQuery knnQuery = knnQueryBuilder.build();
+
+ NestedQuery.Builder nestedQueryBuilder = new NestedQuery.Builder()
+ .path(InferenceConstants.VECTOR_SPACES + "." + inferenceQueryModelName)
+ .query(Query.of(q2 -> q2.knn(knnQuery)));
+
+ b.should(s -> s.nested(nestedQueryBuilder.build()));
+
+ int tokens = inferenceQuery.getQueryText().split("\\s+").length;
+ // the more tokens, the less important the full-text query is
+ // TODO: make it configurable
+ double qsBoost = (tokens > 1) ? 1.0d / (5 * tokens) : 1.0d;
+
+ return b.should(s -> s.queryString(qsqBuilder.boost((float) qsBoost).build()));
+ } else {
+ LOG.warn("No embeddings found for text {}", text);
+ }
+ } else {
+ LOG.warn("No properties with model {} found", inferenceQueryModelName);
+ }
+
+ } catch (Exception e) {
+ LOG.warn("Error while calling inference service. Query won't use embeddings", e);
+ }
+ }
+
+ return b.must(mm -> mm.queryString(qsqBuilder.build()));
+ }
+
private ObjectBuilder<BoolQuery> inference(BoolQuery.Builder b, String propertyName, String text, PlanResult pr, boolean dbEnabled) {
ElasticIndexDefinition.InferenceDefinition.Query q = null;
// select first query eligible for the given text
// TODO: evaluate if/how to handle multiple queries
- String queryText = text;
+ String queryText = text;
for (ElasticIndexDefinition.InferenceDefinition.Query query : elasticIndexDefinition.inferenceDefinition.queries) {
if (query.isEligibleForInput(queryText)) {
queryText = query.rewrite(queryText);
@@ -657,20 +793,20 @@ public class ElasticRequestHandler {
private Stream<NestedQuery> dynamicScoreQueries(String text) {
return elasticIndexDefinition.getDynamicBoostProperties().stream()
- .map(pd -> {
- String field = ElasticIndexUtils.fieldName(pd.nodeName);
- return NestedQuery.of(n -> n
- .path(field)
- .query(q -> q.functionScore(s -> s
- .boost(DYNAMIC_BOOST_WEIGHT)
- .query(fq -> fq.match(m -> m.field(
- field + ".value").
- query(FieldValue.of(text))))
- .functions(f -> f.fieldValueFactor(fv -> fv.field(
- field + ".boost")))))
- .scoreMode(ChildScoreMode.Avg));
- }
- );
+ .map(pd -> {
+ String field = ElasticIndexUtils.fieldName(pd.nodeName);
+ return NestedQuery.of(n -> n
+ .path(field)
+ .query(q -> q.functionScore(s -> s
+ .boost(DYNAMIC_BOOST_WEIGHT)
+ .query(fq -> fq.match(m -> m.field(
+ field + ".value").
+ query(FieldValue.of(text))))
+ .functions(f -> f.fieldValueFactor(fv -> fv.field(
+ field + ".boost")))))
+ .scoreMode(ChildScoreMode.Avg));
+ }
+ );
}
private List<Query> nonFullTextConstraints(IndexPlan plan, PlanResult planResult) {
diff --git a/oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/query/inference/InferenceService.java b/oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/query/inference/InferenceService.java
index d363fc8d20..3f1ace96a2 100644
--- a/oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/query/inference/InferenceService.java
+++ b/oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/query/inference/InferenceService.java
@@ -18,94 +18,11 @@
*/
package org.apache.jackrabbit.oak.plugins.index.elastic.query.inference;
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.ObjectMapper;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.http.HttpClient;
-import java.net.http.HttpRequest;
-import java.net.http.HttpResponse;
-import java.nio.charset.StandardCharsets;
-import java.util.Arrays;
-import java.util.LinkedHashMap;
import java.util.List;
-import java.util.Map;
-import java.util.stream.Collectors;
-
-/**
- * EXPERIMENTAL: A service that sends text to an inference service and receives embeddings in return.
- * The embeddings are cached to avoid repeated calls to the inference service.
- */
-public class InferenceService {
-
- private static final ObjectMapper MAPPER = new ObjectMapper();
-
- private final URI uri;
- private final Cache<String, List<Float>> cache;
- private final HttpClient httpClient;
-
- public InferenceService(String url, int cacheSize) {
- try {
- this.uri = new URI(url);
- } catch (URISyntaxException e) {
- throw new IllegalArgumentException("Invalid URL: " + url, e);
- }
- this.cache = new Cache<>(cacheSize);
- this.httpClient = HttpClient.newHttpClient();
- }
-
- public List<Float> embeddings(String text, int timeoutMillis) {
- if (cache.containsKey(text)) {
- return cache.get(text);
- }
-
- try {
- // Create the JSON payload.
- String jsonInputString = "{\"text\":\"" + text + "\"}";
-
- // Build the HttpRequest.
- HttpRequest request = HttpRequest.newBuilder()
- .uri(uri)
- .timeout(java.time.Duration.ofMillis(timeoutMillis))
- .header("Content-Type", "application/json; utf-8")
- .POST(HttpRequest.BodyPublishers.ofString(jsonInputString, StandardCharsets.UTF_8))
- .build();
-
- // Send the request and get the response.
- HttpResponse<String> response = httpClient.send(request, HttpResponse.BodyHandlers.ofString());
-
- // Parse the response string into a JsonNode.
- JsonNode jsonResponse = MAPPER.readTree(response.body());
-
- // Extract the 'embedding' property.
- JsonNode embedding = jsonResponse.get("embedding");
-
- double[] embeddings = MAPPER.treeToValue(embedding, double[].class);
-
- // Convert the array of doubles to a list of floats.
- List<Float> result = Arrays.stream(embeddings)
- .mapToObj(d -> ((Double) d).floatValue())
- .collect(Collectors.toList());
-
- cache.put(text, result);
- return result;
- } catch (Exception e) {
- throw new InferenceServiceException("Failed to get embeddings", e);
- }
- }
- private static class Cache<K, V> extends LinkedHashMap<K, V> {
- private final int maxEntries;
+public interface InferenceService {
- public Cache(int maxEntries) {
- super(maxEntries + 1, 1.0f, true);
- this.maxEntries = maxEntries;
- }
+ List<Float> embeddings(String text);
- @Override
- protected boolean removeEldestEntry(Map.Entry<K, V> eldest) {
- return size() > maxEntries;
- }
- }
+ List<Float> embeddings(String text, long timeoutMillis);
}
diff --git a/oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/query/inference/InferenceServiceManager.java b/oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/query/inference/InferenceServiceManager.java
index 4774204af7..a5b2fe389f 100644
--- a/oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/query/inference/InferenceServiceManager.java
+++ b/oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/query/inference/InferenceServiceManager.java
@@ -36,16 +36,30 @@ public class InferenceServiceManager {
private static final ConcurrentHashMap<String, InferenceService> SERVICES = new ConcurrentHashMap<>();
+ @Deprecated
public static InferenceService getInstance(@NotNull String url, String model) {
String k = model == null ? url : url + "|" + model;
if (SERVICES.size() >= MAX_CACHED_SERVICES) {
LOGGER.warning("InferenceServiceManager maximum cached services reached: " + MAX_CACHED_SERVICES);
LOGGER.warning("Returning a new InferenceService instance with no cache");
- return new InferenceService(url, 0);
+ return new InferenceServiceUsingIndexConfig(url, 0);
}
- return SERVICES.computeIfAbsent(k, key -> new InferenceService(url, CACHE_SIZE));
+ return SERVICES.computeIfAbsent(k, key -> new InferenceServiceUsingIndexConfig(url, CACHE_SIZE));
}
+ public static InferenceService getInstance(InferenceModelConfig inferenceModelConfig) {
+ //TODO we should use hash here, as hash takes care of all properties in model config.
+ String key = inferenceModelConfig.getEmbeddingServiceUrl()
+ + "|" + inferenceModelConfig.getInferenceModelConfigName()
+ + "|" + inferenceModelConfig.getModel();
+
+ if (SERVICES.size() >= MAX_CACHED_SERVICES) {
+ LOGGER.warning("InferenceServiceManager maximum cached services reached: " + MAX_CACHED_SERVICES);
+ LOGGER.warning("Returning a new InferenceService instance with no cache");
+ return new InferenceServiceUsingConfig(inferenceModelConfig);
+ }
+ return SERVICES.computeIfAbsent(key, k -> new InferenceServiceUsingConfig(inferenceModelConfig));
+ }
}
diff --git a/oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/query/inference/InferenceService.java b/oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/query/inference/InferenceServiceUsingConfig.java
similarity index 51%
copy from oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/query/inference/InferenceService.java
copy to oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/query/inference/InferenceServiceUsingConfig.java
index d363fc8d20..b5c6d9f56d 100644
--- a/oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/query/inference/InferenceService.java
+++ b/oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/query/inference/InferenceServiceUsingConfig.java
@@ -18,8 +18,9 @@
*/
package org.apache.jackrabbit.oak.plugins.index.elastic.query.inference;
-import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.net.URI;
import java.net.URISyntaxException;
@@ -27,72 +28,89 @@ import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.charset.StandardCharsets;
-import java.util.Arrays;
+import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
+import java.util.stream.Stream;
/**
* EXPERIMENTAL: A service that sends text to an inference service and receives embeddings in return.
* The embeddings are cached to avoid repeated calls to the inference service.
*/
-public class InferenceService {
+public class InferenceServiceUsingConfig implements InferenceService {
+ private static final Logger LOG = LoggerFactory.getLogger(InferenceServiceUsingConfig.class);
private static final ObjectMapper MAPPER = new ObjectMapper();
private final URI uri;
private final Cache<String, List<Float>> cache;
private final HttpClient httpClient;
+ private final long timeoutMillis;
+ private final InferenceModelConfig inferenceModelConfig;
+ private final String[] headersValue;
- public InferenceService(String url, int cacheSize) {
+
+ public InferenceServiceUsingConfig(InferenceModelConfig inferenceModelConfig) {
try {
- this.uri = new URI(url);
+ this.uri = new URI(inferenceModelConfig.getEmbeddingServiceUrl());
} catch (URISyntaxException e) {
- throw new IllegalArgumentException("Invalid URL: " + url, e);
+ throw new IllegalArgumentException("Invalid URL: " + inferenceModelConfig.getEmbeddingServiceUrl(), e);
}
- this.cache = new Cache<>(cacheSize);
+ this.cache = new Cache<>(inferenceModelConfig.getCacheSize());
this.httpClient = HttpClient.newHttpClient();
+ this.timeoutMillis = inferenceModelConfig.getTimeoutMillis();
+ this.inferenceModelConfig = inferenceModelConfig;
+ this.headersValue = inferenceModelConfig.getHeader().getInferenceHeaderPayload()
+ .entrySet().stream()
+ .flatMap(e -> Stream.of(e.getKey(), e.getValue()))
+ .collect(Collectors.toList()).toArray(String[]::new);
+
+ }
+
+ @Override
+ public List<Float> embeddings(String text) {
+ return embeddings(text, timeoutMillis);
}
- public List<Float> embeddings(String text, int timeoutMillis) {
+ public List<Float> embeddings(String text, long timeoutMillis) {
if (cache.containsKey(text)) {
return cache.get(text);
}
+ List<Float> result = null;
try {
// Create the JSON payload.
- String jsonInputString = "{\"text\":\"" + text + "\"}";
+ String jsonInputString = inferenceModelConfig.getPayload().getInferencePayload(text);
+ List<String> headerValues = inferenceModelConfig.getHeader().getInferenceHeaderPayload()
+ .entrySet().stream()
+ .flatMap(e -> Stream.of(e.getKey(), e.getValue()))
+ .collect(Collectors.toList());
- // Build the HttpRequest.
HttpRequest request = HttpRequest.newBuilder()
- .uri(uri)
- .timeout(java.time.Duration.ofMillis(timeoutMillis))
- .header("Content-Type", "application/json; utf-8")
- .POST(HttpRequest.BodyPublishers.ofString(jsonInputString, StandardCharsets.UTF_8))
- .build();
+ .uri(uri)
+ .timeout(java.time.Duration.ofMillis(timeoutMillis))
+ .headers(headersValue)
+ .POST(HttpRequest.BodyPublishers.ofString(jsonInputString, StandardCharsets.UTF_8))
+ .build();
// Send the request and get the response.
HttpResponse<String> response = httpClient.send(request, HttpResponse.BodyHandlers.ofString());
- // Parse the response string into a JsonNode.
- JsonNode jsonResponse = MAPPER.readTree(response.body());
-
- // Extract the 'embedding' property.
- JsonNode embedding = jsonResponse.get("embedding");
-
- double[] embeddings = MAPPER.treeToValue(embedding, double[].class);
-
- // Convert the array of doubles to a list of floats.
- List<Float> result = Arrays.stream(embeddings)
- .mapToObj(d -> ((Double) d).floatValue())
- .collect(Collectors.toList());
-
- cache.put(text, result);
- return result;
+ if (response.statusCode() == 200) {
+ List<Float> embeddingList = new ArrayList<>();
+ MAPPER.readTree(response.body()).path("data").get(0).get("embedding").forEach(n -> {
+ embeddingList.add(n.floatValue());
+ });
+ result = embeddingList;
+ cache.put(text, result);
+ return result;
+ }
} catch (Exception e) {
- throw new InferenceServiceException("Failed to get embeddings", e);
+ LOG.warn("Unable to get embeddings" + e.getMessage());
}
+ return result;
}
private static class Cache<K, V> extends LinkedHashMap<K, V> {
diff --git a/oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/query/inference/InferenceService.java b/oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/query/inference/InferenceServiceUsingIndexConfig.java
similarity index 92%
copy from oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/query/inference/InferenceService.java
copy to oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/query/inference/InferenceServiceUsingIndexConfig.java
index d363fc8d20..5181f23527 100644
--- a/oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/query/inference/InferenceService.java
+++ b/oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/query/inference/InferenceServiceUsingIndexConfig.java
@@ -37,7 +37,7 @@ import java.util.stream.Collectors;
* EXPERIMENTAL: A service that sends text to an inference service and receives embeddings in return.
* The embeddings are cached to avoid repeated calls to the inference service.
*/
-public class InferenceService {
+public class InferenceServiceUsingIndexConfig implements InferenceService{
private static final ObjectMapper MAPPER = new ObjectMapper();
@@ -45,7 +45,7 @@ public class InferenceService {
private final Cache<String, List<Float>> cache;
private final HttpClient httpClient;
- public InferenceService(String url, int cacheSize) {
+ public InferenceServiceUsingIndexConfig(String url, int cacheSize) {
try {
this.uri = new URI(url);
} catch (URISyntaxException e) {
@@ -55,7 +55,12 @@ public class InferenceService {
this.httpClient = HttpClient.newHttpClient();
}
- public List<Float> embeddings(String text, int timeoutMillis) {
+ @Override
+ public List<Float> embeddings(String text) {
+ return embeddings(text, 5000);
+ }
+
+ public List<Float> embeddings(String text, long timeoutMillis) {
if (cache.containsKey(text)) {
return cache.get(text);
}
@@ -95,6 +100,7 @@ public class InferenceService {
}
}
+
private static class Cache<K, V> extends LinkedHashMap<K, V> {
private final int maxEntries;
diff --git a/oak-search-elastic/src/test/java/org/apache/jackrabbit/oak/plugins/index/elastic/ElasticAbstractQueryTest.java b/oak-search-elastic/src/test/java/org/apache/jackrabbit/oak/plugins/index/elastic/ElasticAbstractQueryTest.java
index c3063b900a..88fd7744c5 100644
--- a/oak-search-elastic/src/test/java/org/apache/jackrabbit/oak/plugins/index/elastic/ElasticAbstractQueryTest.java
+++ b/oak-search-elastic/src/test/java/org/apache/jackrabbit/oak/plugins/index/elastic/ElasticAbstractQueryTest.java
@@ -16,6 +16,8 @@
*/
package org.apache.jackrabbit.oak.plugins.index.elastic;
+import co.elastic.clients.elasticsearch._types.ElasticsearchException;
+import co.elastic.clients.elasticsearch.core.CountRequest;
import co.elastic.clients.elasticsearch.core.GetRequest;
import co.elastic.clients.elasticsearch.indices.get_mapping.IndexMappingRecord;
import com.fasterxml.jackson.databind.node.ObjectNode;
@@ -32,6 +34,7 @@ import org.apache.jackrabbit.oak.plugins.index.TrackingCorruptIndexHandler;
import org.apache.jackrabbit.oak.plugins.index.counter.NodeCounterEditorProvider;
import org.apache.jackrabbit.oak.plugins.index.elastic.index.ElasticIndexEditorProvider;
import org.apache.jackrabbit.oak.plugins.index.elastic.query.ElasticIndexProvider;
+import org.apache.jackrabbit.oak.plugins.index.elastic.query.inference.InferenceConfig;
import org.apache.jackrabbit.oak.plugins.index.elastic.util.ElasticIndexDefinitionBuilder;
import org.apache.jackrabbit.oak.plugins.index.nodetype.NodeTypeIndexProvider;
import org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexEditorProvider;
@@ -39,6 +42,7 @@ import org.apache.jackrabbit.oak.plugins.index.search.ExtractedTextCache;
import org.apache.jackrabbit.oak.plugins.index.search.util.IndexDefinitionBuilder;
import org.apache.jackrabbit.oak.plugins.memory.MemoryNodeStore;
import org.apache.jackrabbit.oak.query.AbstractQueryTest;
+import org.apache.jackrabbit.oak.query.QueryEngineSettings;
import org.apache.jackrabbit.oak.spi.security.OpenSecurityProvider;
import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
import org.apache.jackrabbit.oak.spi.state.NodeStore;
@@ -49,8 +53,6 @@ import org.junit.ClassRule;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import co.elastic.clients.elasticsearch._types.ElasticsearchException;
-import co.elastic.clients.elasticsearch.core.CountRequest;
import java.io.IOException;
import java.util.List;
import java.util.concurrent.TimeUnit;
@@ -78,6 +80,7 @@ public abstract class ElasticAbstractQueryTest extends AbstractQueryTest {
protected long INDEX_CORRUPT_INTERVAL_IN_MILLIS = 100;
protected NodeStore nodeStore;
protected int DEFAULT_ASYNC_INDEXING_TIME_IN_SECONDS = 5;
+ protected static final String INFERENCE_CONFIG_PATH = "oak:index/:inferenceConfig";
@ClassRule
public static ElasticConnectionRule elasticRule = new ElasticConnectionRule(elasticConnectionString);
@@ -85,8 +88,8 @@ public abstract class ElasticAbstractQueryTest extends AbstractQueryTest {
@After
public void tearDown() throws IOException {
if (esConnection != null) {
- esConnection.getClient().indices().delete(i->i
- .index(esConnection.getIndexPrefix() + "*"));
+ esConnection.getClient().indices().delete(i -> i
+ .index(esConnection.getIndexPrefix() + "*"));
esConnection.close();
}
}
@@ -135,22 +138,25 @@ public abstract class ElasticAbstractQueryTest extends AbstractQueryTest {
protected ElasticConnection getElasticConnection() {
return elasticRule.useDocker() ? elasticRule.getElasticConnectionForDocker() :
- elasticRule.getElasticConnectionFromString();
+ elasticRule.getElasticConnectionFromString();
}
@Override
protected ContentRepository createRepository() {
esConnection = getElasticConnection();
+ nodeStore = getNodeStore();
+ QueryEngineSettings queryEngineSettings = new QueryEngineSettings();
+ queryEngineSettings.setInferenceEnabled(isInferenceEnabled());
+ InferenceConfig.reInitialize(nodeStore, INFERENCE_CONFIG_PATH, isInferenceEnabled());
indexTracker = new ElasticIndexTracker(esConnection, getMetricHandler());
ElasticIndexEditorProvider editorProvider = new ElasticIndexEditorProvider(indexTracker, esConnection,
- new ExtractedTextCache(10 * FileUtils.ONE_MB, 100));
+ new ExtractedTextCache(10 * FileUtils.ONE_MB, 100));
ElasticIndexProvider indexProvider = new ElasticIndexProvider(indexTracker);
- nodeStore = getNodeStore();
asyncIndexUpdate = getAsyncIndexUpdate("async", nodeStore, CompositeIndexEditorProvider.compose(
- editorProvider,
- new NodeCounterEditorProvider()
+ editorProvider,
+ new NodeCounterEditorProvider()
));
TrackingCorruptIndexHandler trackingCorruptIndexHandler = new TrackingCorruptIndexHandler();
@@ -158,26 +164,31 @@ public abstract class ElasticAbstractQueryTest extends AbstractQueryTest {
asyncIndexUpdate.setCorruptIndexHandler(trackingCorruptIndexHandler);
Oak oak = new Oak(nodeStore)
- .with(getInitialContent())
- .with(new OpenSecurityProvider())
- .with(editorProvider)
- .with(indexTracker)
- .with(indexProvider)
- .with(new PropertyIndexEditorProvider())
- .with(new NodeTypeIndexProvider());
+ .with(getInitialContent())
+ .with(queryEngineSettings)
+ .with(new OpenSecurityProvider())
+ .with(editorProvider)
+ .with(indexTracker)
+ .with(indexProvider)
+ .with(new PropertyIndexEditorProvider())
+ .with(new NodeTypeIndexProvider());
if (useAsyncIndexing()) {
oak = addAsyncIndexingLanesToOak(oak);
}
return oak.createContentRepository();
}
+ protected boolean isInferenceEnabled() {
+ return true;
+ }
+
protected ElasticMetricHandler getMetricHandler() {
return new ElasticMetricHandler(StatisticsProvider.NOOP);
}
protected void assertEventually(Runnable r) {
TestUtil.assertEventually(r,
- ((useAsyncIndexing() ? DEFAULT_ASYNC_INDEXING_TIME_IN_SECONDS * 1000L : 0) + BULK_FLUSH_INTERVAL_MS_DEFAULT) * 5);
+ ((useAsyncIndexing() ? DEFAULT_ASYNC_INDEXING_TIME_IN_SECONDS * 1000L : 0) + BULK_FLUSH_INTERVAL_MS_DEFAULT) * 5);
}
protected IndexDefinitionBuilder createIndex(String... propNames) {
@@ -223,9 +234,9 @@ public abstract class ElasticAbstractQueryTest extends AbstractQueryTest {
try {
return esConnection.getClient().indices()
- .exists(i -> i
- .index(esIdxDef.getIndexAlias()))
- .value();
+ .exists(i -> i
+ .index(esIdxDef.getIndexAlias()))
+ .value();
} catch (IOException e) {
return false;
}
@@ -233,22 +244,22 @@ public abstract class ElasticAbstractQueryTest extends AbstractQueryTest {
protected long countDocuments(Tree index) {
ElasticIndexDefinition esIdxDef = getElasticIndexDefinition(index);
-
- CountRequest count = CountRequest.of( r -> r
- .index(esIdxDef.getIndexAlias()));
+
+ CountRequest count = CountRequest.of(r -> r
+ .index(esIdxDef.getIndexAlias()));
try {
- return esConnection.getClient().count(count).count();
- } catch (ElasticsearchException | IOException e) {
- throw new IllegalStateException(e);
- }
+ return esConnection.getClient().count(count).count();
+ } catch (ElasticsearchException | IOException e) {
+ throw new IllegalStateException(e);
+ }
}
protected ObjectNode getDocument(Tree index, String id) {
ElasticIndexDefinition esIdxDef = getElasticIndexDefinition(index);
GetRequest get = GetRequest.of(r -> r
- .index(esIdxDef.getIndexAlias())
- .id(id));
+ .index(esIdxDef.getIndexAlias())
+ .id(id));
try {
return esConnection.getClient().get(get, ObjectNode.class).source();
} catch (ElasticsearchException | IOException e) {
@@ -260,9 +271,9 @@ public abstract class ElasticAbstractQueryTest extends AbstractQueryTest {
ElasticIndexDefinition esIdxDef = getElasticIndexDefinition(index);
try {
esConnection.getClient().update(b -> b
- .index(esIdxDef.getIndexAlias())
- .id(id)
- .doc(doc), ObjectNode.class);
+ .index(esIdxDef.getIndexAlias())
+ .id(id)
+ .doc(doc), ObjectNode.class);
} catch (IOException e) {
throw new IllegalStateException(e);
}
@@ -272,7 +283,7 @@ public abstract class ElasticAbstractQueryTest extends AbstractQueryTest {
ElasticIndexDefinition esIdxDef = getElasticIndexDefinition(index);
try {
return esConnection.getClient().indices().getMapping(i -> i.index(esIdxDef.getIndexAlias()))
- .result().entrySet().stream().findFirst().get().getValue();
+ .result().entrySet().stream().findFirst().get().getValue();
} catch (IOException e) {
throw new IllegalStateException(e);
}
@@ -280,10 +291,10 @@ public abstract class ElasticAbstractQueryTest extends AbstractQueryTest {
protected ElasticIndexDefinition getElasticIndexDefinition(Tree index) {
return new ElasticIndexDefinition(
- nodeStore.getRoot(),
- nodeStore.getRoot().getChildNode(INDEX_DEFINITIONS_NAME).getChildNode(index.getName()),
- index.getPath(),
- esConnection.getIndexPrefix());
+ nodeStore.getRoot(),
+ nodeStore.getRoot().getChildNode(INDEX_DEFINITIONS_NAME).getChildNode(index.getName()),
+ index.getPath(),
+ esConnection.getIndexPrefix());
}
protected void assertOrderedQuery(String sql, List<String> paths) {
diff --git a/oak-search-elastic/src/test/java/org/apache/jackrabbit/oak/plugins/index/elastic/ElasticIndexProviderServiceTest.java b/oak-search-elastic/src/test/java/org/apache/jackrabbit/oak/plugins/index/elastic/ElasticIndexProviderServiceTest.java
index 3d92112379..010e7f442d 100644
--- a/oak-search-elastic/src/test/java/org/apache/jackrabbit/oak/plugins/index/elastic/ElasticIndexProviderServiceTest.java
+++ b/oak-search-elastic/src/test/java/org/apache/jackrabbit/oak/plugins/index/elastic/ElasticIndexProviderServiceTest.java
@@ -20,6 +20,7 @@ import org.apache.jackrabbit.oak.osgi.OsgiWhiteboard;
import org.apache.jackrabbit.oak.plugins.index.AsyncIndexInfoService;
import org.apache.jackrabbit.oak.plugins.index.IndexEditorProvider;
import org.apache.jackrabbit.oak.plugins.memory.MemoryNodeStore;
+import org.apache.jackrabbit.oak.query.QueryEngineSettings;
import org.apache.jackrabbit.oak.spi.mount.MountInfoProvider;
import org.apache.jackrabbit.oak.spi.mount.Mounts;
import org.apache.jackrabbit.oak.spi.query.QueryIndexProvider;
@@ -87,6 +88,7 @@ public class ElasticIndexProviderServiceTest {
context.registerService(NodeStore.class, new MemoryNodeStore());
context.registerService(StatisticsProvider.class, spyStatsProvider);
context.registerService(AsyncIndexInfoService.class, mock(AsyncIndexInfoService.class));
+ context.registerService(QueryEngineSettings.class, mock(QueryEngineSettings.class));
wb = new OsgiWhiteboard(context.bundleContext());
MockOsgi.injectServices(service, context.bundleContext());
diff --git a/oak-search-elastic/src/test/java/org/apache/jackrabbit/oak/plugins/index/elastic/ElasticIndexQueryCommonTest.java b/oak-search-elastic/src/test/java/org/apache/jackrabbit/oak/plugins/index/elastic/ElasticIndexQueryCommonTest.java
index f733b0f120..8c1ed390f5 100644
--- a/oak-search-elastic/src/test/java/org/apache/jackrabbit/oak/plugins/index/elastic/ElasticIndexQueryCommonTest.java
+++ b/oak-search-elastic/src/test/java/org/apache/jackrabbit/oak/plugins/index/elastic/ElasticIndexQueryCommonTest.java
@@ -51,8 +51,7 @@ public class ElasticIndexQueryCommonTest extends IndexQueryCommonTest {
String query = "explain select [jcr:path] from [nt:base] where " +
"native('lucene', 'mlt?stream.body=/test/a&mlt.fl=:path&mlt.mindf=0&mlt.mintf=0')";
- String explainWithoutSimilarityTags = "{\"_source\":{\"includes\":[\":path\"]},\"query\":{\"bool\":{\"should\":[{\"more_like_this\":{\"boost\":3.0,\"include\":true,\"like\":[{\"fields\":[\":dynamic-boost-ft\"],\"_id\":\"/test/a\"}],\"min_doc_freq\":0,\"min_term_freq\":0}},{\"more_like_this\":{\"include\":true,\"like\":[{\"fields\":[\"*\"],\"_id\":\"/test/a\"}],\"min_doc_freq\":0,\"min_term_freq\":0}}]}},\"size\":10,\"sort\":[{\"_score\":{\"order\":\"desc\"}},{\":path\":{\"order\" [...]
-
+ String explainWithoutSimilarityTags = "{\"_source\":{\"includes\":[\":path\"]},\"query\":{\"bool\":{\"should\":[{\"more_like_this\":{\"boost\":3.0,\"include\":true,\"like\":[{\"fields\":[\":dynamic-boost-ft\"],\"_id\":\"/test/a\"}],\"min_doc_freq\":0,\"min_term_freq\":0}},{\"more_like_this\":{\"include\":true,\"like\":[{\"fields\":[\"propb\",\"propb.keyword\",\"propa\",\"propa.keyword\",\"function*lower*@name\",\"function*lower*@name.keyword\",\"c1/p\",\"c1/p.keyword\",\"function [...]
Tree test = root.getTree("/").addChild("test");
test.addChild("a").setProperty("text", "Hello World");
test.addChild("b").setProperty("text", "He said Hello and then the world said Hello as well.");
@@ -70,7 +69,7 @@ public class ElasticIndexQueryCommonTest extends IndexQueryCommonTest {
// similarity tags enabled, but no similarity tags properties configured, should not be present in the explain output
assertEventually(getAssertionForExplain(query, Query.JCR_SQL2, explainWithoutSimilarityTags, false));
- String explainWithSimilarityTags = "{\"_source\":{\"includes\":[\":path\"]},\"query\":{\"bool\":{\"should\":[{\"more_like_this\":{\"boost\":3.0,\"include\":true,\"like\":[{\"fields\":[\":dynamic-boost-ft\"],\"_id\":\"/test/a\"}],\"min_doc_freq\":0,\"min_term_freq\":0}},{\"more_like_this\":{\"include\":true,\"like\":[{\"fields\":[\"*\"],\"_id\":\"/test/a\"}],\"min_doc_freq\":0,\"min_term_freq\":0}},{\"more_like_this\":{\"boost\":0.5,\"fields\":[\":simTags\"],\"like\":[{\"_id\":\"/ [...]
+ String explainWithSimilarityTags = "{\"_source\":{\"includes\":[\":path\"]},\"query\":{\"bool\":{\"should\":[{\"more_like_this\":{\"boost\":3.0,\"include\":true,\"like\":[{\"fields\":[\":dynamic-boost-ft\"],\"_id\":\"/test/a\"}],\"min_doc_freq\":0,\"min_term_freq\":0}},{\"more_like_this\":{\"include\":true,\"like\":[{\"fields\":[\"propb\",\"propb.keyword\",\"propa\",\"propa.keyword\",\"function*lower*@name\",\"function*lower*@name.keyword\",\"c1/p\",\"c1/p.keyword\",\"function*le [...]
Tree properties = indexDefn.getChild(FulltextIndexConstants.INDEX_RULES).getChild("nt:base").getChild("properties");
Tree simProp = TestUtil.enableForFullText(properties, "simProp", false);
simProp.setProperty(FulltextIndexConstants.PROP_SIMILARITY_TAGS, true);
diff --git a/oak-search-elastic/src/test/java/org/apache/jackrabbit/oak/plugins/index/elastic/ElasticPropertyIndexFailuresTest.java b/oak-search-elastic/src/test/java/org/apache/jackrabbit/oak/plugins/index/elastic/ElasticPropertyIndexFailuresTest.java
index d7a1c6aca7..8a701845a7 100644
--- a/oak-search-elastic/src/test/java/org/apache/jackrabbit/oak/plugins/index/elastic/ElasticPropertyIndexFailuresTest.java
+++ b/oak-search-elastic/src/test/java/org/apache/jackrabbit/oak/plugins/index/elastic/ElasticPropertyIndexFailuresTest.java
@@ -39,12 +39,25 @@ public class ElasticPropertyIndexFailuresTest extends ElasticAbstractQueryTest {
super.before();
}
+ @Override
+ protected boolean isInferenceEnabled() {
+ return false;
+ }
+
+ /*
+ In indexFailuresWithFailOnErrorOff test we are explicitly setting "strict mapping". For inference
+ enabled oak, this is not supported as enricher for oak will be an external service and this enricher
+ service would need some flexibility and may want to add additional properties.
+
+ So we are explicitly setting inference to false for this test.
+ */
+
@Test
public void indexFailuresWithFailOnErrorOff() throws Exception {
IndexDefinitionBuilder builder = createIndex("a");
builder.includedPaths("/test")
- .indexRule("nt:base")
- .property("nodeName", PROPDEF_PROP_NODE_NAME);
+ .indexRule("nt:base")
+ .property("nodeName", PROPDEF_PROP_NODE_NAME);
// configuring the index with a regex property and strict mapping to simulate failures
builder.indexRule("nt:base").property("b", true).propertyIndex();
@@ -75,7 +88,7 @@ public class ElasticPropertyIndexFailuresTest extends ElasticAbstractQueryTest {
String query = "select [jcr:path] from [nt:base] where [a] = 'foo'";
assertEventually(() -> assertQuery(query, SQL2,
- List.of("/test/a1", "/test/a2", "/test/a100", "/test/a101", "/test/a102", "/test/a103", "/test/a104")
+ List.of("/test/a1", "/test/a2", "/test/a100", "/test/a101", "/test/a102", "/test/a103", "/test/a104")
));
}
}
diff --git a/oak-search-elastic/src/test/java/org/apache/jackrabbit/oak/plugins/index/elastic/ElasticPropertyIndexFailuresTest.java b/oak-search-elastic/src/test/java/org/apache/jackrabbit/oak/plugins/index/elastic/ElasticPropertyIndexNonFailureTest.java
similarity index 57%
copy from oak-search-elastic/src/test/java/org/apache/jackrabbit/oak/plugins/index/elastic/ElasticPropertyIndexFailuresTest.java
copy to oak-search-elastic/src/test/java/org/apache/jackrabbit/oak/plugins/index/elastic/ElasticPropertyIndexNonFailureTest.java
index d7a1c6aca7..943787c87d 100644
--- a/oak-search-elastic/src/test/java/org/apache/jackrabbit/oak/plugins/index/elastic/ElasticPropertyIndexFailuresTest.java
+++ b/oak-search-elastic/src/test/java/org/apache/jackrabbit/oak/plugins/index/elastic/ElasticPropertyIndexNonFailureTest.java
@@ -16,6 +16,7 @@
*/
package org.apache.jackrabbit.oak.plugins.index.elastic;
+import org.apache.jackrabbit.oak.api.CommitFailedException;
import org.apache.jackrabbit.oak.api.Tree;
import org.apache.jackrabbit.oak.commons.junit.TemporarySystemProperty;
import org.apache.jackrabbit.oak.plugins.index.elastic.index.ElasticBulkProcessorHandler;
@@ -24,33 +25,59 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
+import java.io.IOException;
import java.util.List;
import static org.apache.jackrabbit.oak.plugins.index.search.FulltextIndexConstants.PROPDEF_PROP_NODE_NAME;
+import static org.hamcrest.MatcherAssert.assertThat;
-public class ElasticPropertyIndexFailuresTest extends ElasticAbstractQueryTest {
-
+public class ElasticPropertyIndexNonFailureTest extends ElasticAbstractQueryTest {
@Rule
public TemporarySystemProperty temporarySystemProperty = new TemporarySystemProperty();
+ // Tests are hardcoded for these values
+ private final static int BULK_ACTIONS_TEST = 250;
+ private final static int BULK_SIZE_BYTES_TEST = 1024 * 1024;
+
@Before
public void before() throws Exception {
- System.setProperty(ElasticBulkProcessorHandler.FAIL_ON_ERROR_PROP, "false");
+ // Use a low value for the tests
+ System.setProperty(ElasticBulkProcessorHandler.BULK_ACTIONS_PROP, Integer.toString(BULK_ACTIONS_TEST));
+ System.setProperty(ElasticBulkProcessorHandler.BULK_SIZE_BYTES_PROP, Integer.toString(BULK_SIZE_BYTES_TEST));
super.before();
}
+ @Override
+ protected boolean isInferenceEnabled() {
+ return false;
+ }
+
+ /*
+ In indexFailuresWithFailOnErrorOn test we are explicitly setting "strict mapping". For inference
+ enabled oak, this is not supported as enricher for oak will be an external service and this enricher
+ service would need some flexibility and may want to add additional properties.
+
+ So we are explicitly setting inference to false for this test.
+ */
+
@Test
- public void indexFailuresWithFailOnErrorOff() throws Exception {
+ public void indexFailuresWithFailOnErrorOn() throws Exception {
+ if (ElasticPropertyDefinition.PROP_IS_FLATTENED_DEFAULT) {
+ // if "flattened" enabled by default,
+ // then the test doesn't make sense.
+ // alternatively, disable "flattened" in the index definition;
+ // but this is already tested in ElasticRegexPropertyIndexTest
+ return;
+ }
IndexDefinitionBuilder builder = createIndex("a");
builder.includedPaths("/test")
- .indexRule("nt:base")
- .property("nodeName", PROPDEF_PROP_NODE_NAME);
+ .indexRule("nt:base")
+ .property("nodeName", PROPDEF_PROP_NODE_NAME);
// configuring the index with a regex property and strict mapping to simulate failures
builder.indexRule("nt:base").property("b", true).propertyIndex();
builder.getBuilderTree().setProperty(ElasticIndexDefinition.DYNAMIC_MAPPING, "strict");
-
setIndex("test1", builder);
root.commit();
@@ -71,11 +98,21 @@ public class ElasticPropertyIndexFailuresTest extends ElasticAbstractQueryTest {
test.addChild("a203").setProperty("b", "foo");
test.addChild("a104").setProperty("a", "foo");
test.addChild("a204").setProperty("b", "foo");
- root.commit();
+
+ CommitFailedException cfe = null;
+ try {
+ root.commit();
+ } catch (CommitFailedException e) {
+ cfe = e;
+ }
+
+ assertThat("no exception thrown", cfe != null);
+ assertThat("the exception cause has to be an IOException", cfe.getCause() instanceof IOException);
+ assertThat("there should be 5 suppressed exception", cfe.getCause().getSuppressed().length == 5);
String query = "select [jcr:path] from [nt:base] where [a] = 'foo'";
assertEventually(() -> assertQuery(query, SQL2,
- List.of("/test/a1", "/test/a2", "/test/a100", "/test/a101", "/test/a102", "/test/a103", "/test/a104")
+ List.of("/test/a1", "/test/a2", "/test/a100", "/test/a101", "/test/a102", "/test/a103", "/test/a104")
));
}
}
diff --git a/oak-search-elastic/src/test/java/org/apache/jackrabbit/oak/plugins/index/elastic/ElasticPropertyIndexTest.java b/oak-search-elastic/src/test/java/org/apache/jackrabbit/oak/plugins/index/elastic/ElasticPropertyIndexTest.java
index 622c5da3a9..3a71815e6b 100644
--- a/oak-search-elastic/src/test/java/org/apache/jackrabbit/oak/plugins/index/elastic/ElasticPropertyIndexTest.java
+++ b/oak-search-elastic/src/test/java/org/apache/jackrabbit/oak/plugins/index/elastic/ElasticPropertyIndexTest.java
@@ -33,7 +33,6 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
-import java.io.IOException;
import java.util.List;
import static org.apache.jackrabbit.oak.plugins.index.search.FulltextIndexConstants.PROPDEF_PROP_NODE_NAME;
@@ -337,62 +336,6 @@ public class ElasticPropertyIndexTest extends ElasticAbstractQueryTest {
});
}
- @Test
- public void indexFailuresWithFailOnErrorOn() throws Exception {
- if (ElasticPropertyDefinition.PROP_IS_FLATTENED_DEFAULT) {
- // if "flattened" enabled by default,
- // then the test doesn't make sense.
- // alternatively, disable "flattened" in the index definition;
- // but this is already tested in ElasticRegexPropertyIndexTest
- return;
- }
- IndexDefinitionBuilder builder = createIndex("a");
- builder.includedPaths("/test")
- .indexRule("nt:base")
- .property("nodeName", PROPDEF_PROP_NODE_NAME);
-
- // configuring the index with a regex property and strict mapping to simulate failures
- builder.indexRule("nt:base").property("b", true).propertyIndex();
- builder.getBuilderTree().setProperty(ElasticIndexDefinition.DYNAMIC_MAPPING, "strict");
-
- setIndex("test1", builder);
- root.commit();
-
- Tree test = root.getTree("/").addChild("test");
- for (int i = 1; i < 3; i++) {
- test.addChild("a" + i).setProperty("a", "foo");
- }
- root.commit();
-
- // now we add 5 correct docs and 5 docs cannot be mapped
- test.addChild("a100").setProperty("a", "foo");
- test.addChild("a200").setProperty("b", "foo");
- test.addChild("a101").setProperty("a", "foo");
- test.addChild("a201").setProperty("b", "foo");
- test.addChild("a102").setProperty("a", "foo");
- test.addChild("a202").setProperty("b", "foo");
- test.addChild("a103").setProperty("a", "foo");
- test.addChild("a203").setProperty("b", "foo");
- test.addChild("a104").setProperty("a", "foo");
- test.addChild("a204").setProperty("b", "foo");
-
- CommitFailedException cfe = null;
- try {
- root.commit();
- } catch (CommitFailedException e) {
- cfe = e;
- }
-
- assertThat("no exception thrown", cfe != null);
- assertThat("the exception cause has to be an IOException", cfe.getCause() instanceof IOException);
- assertThat("there should be 5 suppressed exception", cfe.getCause().getSuppressed().length == 5);
-
- String query = "select [jcr:path] from [nt:base] where [a] = 'foo'";
- assertEventually(() -> assertQuery(query, SQL2,
- List.of("/test/a1", "/test/a2", "/test/a100", "/test/a101", "/test/a102", "/test/a103", "/test/a104")
- ));
- }
-
private void createIndexOfType(String type) throws CommitFailedException {
IndexDefinitionBuilder builder = new ElasticIndexDefinitionBuilder();
builder.noAsync();
diff --git a/oak-search-elastic/src/test/java/org/apache/jackrabbit/oak/plugins/index/elastic/index/ElasticIndexWriterTest.java b/oak-search-elastic/src/test/java/org/apache/jackrabbit/oak/plugins/index/elastic/index/ElasticIndexWriterTest.java
index 1997969dde..97f94a147f 100644
--- a/oak-search-elastic/src/test/java/org/apache/jackrabbit/oak/plugins/index/elastic/index/ElasticIndexWriterTest.java
+++ b/oak-search-elastic/src/test/java/org/apache/jackrabbit/oak/plugins/index/elastic/index/ElasticIndexWriterTest.java
@@ -19,6 +19,8 @@ package org.apache.jackrabbit.oak.plugins.index.elastic.index;
import org.apache.jackrabbit.oak.plugins.index.elastic.ElasticConnection;
import org.apache.jackrabbit.oak.plugins.index.elastic.ElasticIndexDefinition;
import org.apache.jackrabbit.oak.plugins.index.elastic.ElasticIndexTracker;
+import org.apache.jackrabbit.oak.plugins.index.elastic.query.inference.InferenceConfig;
+import org.apache.jackrabbit.oak.plugins.memory.MemoryNodeStore;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -66,6 +68,10 @@ public class ElasticIndexWriterTest {
public void setUp() {
closeable = MockitoAnnotations.openMocks(this);
when(indexDefinitionMock.getIndexAlias()).thenReturn("test-index");
+ when(indexDefinitionMock.getIndexName()).thenReturn("test-index-name");
+ // In this test we are explicitly disabling inference as bulkprocessor
+ // is called with update document if inference is enabled.
+ InferenceConfig.reInitialize(new MemoryNodeStore(), "/oak:index/:inferenceConfig", false);
indexWriter = new ElasticIndexWriter(indexTrackerMock, elasticConnectionMock, indexDefinitionMock, bulkProcessorHandlerMock);
indexAlias = indexDefinitionMock.getIndexAlias();
}
diff --git a/oak-search-elastic/src/test/java/org/apache/jackrabbit/oak/plugins/index/elastic/query/inference/ElasticInferenceUsingConfigTest.java b/oak-search-elastic/src/test/java/org/apache/jackrabbit/oak/plugins/index/elastic/query/inference/ElasticInferenceUsingConfigTest.java
new file mode 100644
index 0000000000..046ca29ee1
--- /dev/null
+++ b/oak-search-elastic/src/test/java/org/apache/jackrabbit/oak/plugins/index/elastic/query/inference/ElasticInferenceUsingConfigTest.java
@@ -0,0 +1,339 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.oak.plugins.index.elastic.query.inference;
+
+import co.elastic.clients.elasticsearch.indices.get_mapping.IndexMappingRecord;
+import co.elastic.clients.json.JsonData;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.json.JsonMapper;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import com.github.tomakehurst.wiremock.client.WireMock;
+import com.github.tomakehurst.wiremock.core.WireMockConfiguration;
+import com.github.tomakehurst.wiremock.junit.WireMockRule;
+import org.apache.commons.io.FilenameUtils;
+import org.apache.commons.io.IOUtils;
+import org.apache.jackrabbit.oak.api.CommitFailedException;
+import org.apache.jackrabbit.oak.api.Tree;
+import org.apache.jackrabbit.oak.api.Type;
+import org.apache.jackrabbit.oak.commons.PathUtils;
+import org.apache.jackrabbit.oak.plugins.index.elastic.ElasticAbstractQueryTest;
+import org.apache.jackrabbit.oak.plugins.index.search.util.IndexDefinitionBuilder;
+import org.apache.jackrabbit.oak.spi.commit.CommitInfo;
+import org.apache.jackrabbit.oak.spi.commit.EmptyHook;
+import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
+import org.junit.Rule;
+import org.junit.Test;
+
+import java.io.IOException;
+import java.net.URL;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.time.Instant;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import static org.apache.jackrabbit.oak.plugins.index.elastic.query.inference.InferenceConstants.ENRICHER_CONFIG;
+import static org.apache.jackrabbit.oak.plugins.index.elastic.query.inference.InferenceConstants.TYPE;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+public class ElasticInferenceUsingConfigTest extends ElasticAbstractQueryTest {
+
+ @Rule
+ public WireMockRule wireMock = new WireMockRule(WireMockConfiguration.options().dynamicPort());
+
+ private final String enricherConfig = "{\"enricher\":{\"config\":{\"vectorSpaces\":{\"semantic\":{\"pipeline\":{\"steps\":[{\"inputFields\":{\"description\":\"STRING\",\"title\":\"STRING\"},\"chunkingConfig\":{\"enabled\":true},\"name\":\"sentence-embeddings\",\"model\":\"text-embedding-ada-002\",\"optional\":true,\"type\":\"embeddings\"}]},\"default\":false}},\"version\":\"0.0.1\"}}}";
+
+ @Test
+ public void inferenceConfigStoredInIndexMetadata() throws CommitFailedException, JsonProcessingException {
+ String indexName = UUID.randomUUID().toString();
+ // check that the inference config
+ NodeBuilder rootBuilder = nodeStore.getRoot().builder();
+ NodeBuilder nodeBuilder = rootBuilder;
+ for (String path : PathUtils.elements(INFERENCE_CONFIG_PATH)) {
+ nodeBuilder = nodeBuilder.child(path);
+ }
+ nodeBuilder.setProperty(TYPE, InferenceConfig.TYPE);
+ nodeBuilder.setProperty(InferenceConstants.ENABLED, true);
+ NodeBuilder inferenceConfig = nodeBuilder;
+
+ // Add inferenceIndexConfig
+ NodeBuilder inferenceIndexConfig = inferenceConfig.child(indexName);
+ inferenceIndexConfig.setProperty(TYPE, InferenceIndexConfig.TYPE);
+ inferenceIndexConfig.setProperty(ENRICHER_CONFIG, enricherConfig);
+ inferenceIndexConfig.setProperty(InferenceConstants.ENABLED, true);
+ // Add inference model1 configuration
+ NodeBuilder inferenceModelConfig1 = inferenceIndexConfig.child("inferenceModel1");
+ inferenceModelConfig1.setProperty(InferenceConstants.TYPE, InferenceModelConfig.TYPE);
+ inferenceModelConfig1.setProperty(InferenceModelConfig.MODEL, "test-model1");
+ inferenceModelConfig1.setProperty(InferenceModelConfig.EMBEDDING_SERVICE_URL, "http://localhost:8080");
+ inferenceModelConfig1.setProperty(InferenceModelConfig.SIMILARITY_THRESHOLD, 0.8);
+ inferenceModelConfig1.setProperty(InferenceModelConfig.MIN_TERMS, 3L);
+ inferenceModelConfig1.setProperty(InferenceModelConfig.IS_DEFAULT, true);
+ inferenceModelConfig1.setProperty(InferenceModelConfig.ENABLED, true);
+
+ // Setup header configuration
+ NodeBuilder header1 = inferenceModelConfig1.child(InferenceModelConfig.HEADER);
+ header1.setProperty("headerKey1_1", "headerValue1_1");
+ header1.setProperty("headerKey2_1", "headerValue2_1");
+
+ // Setup payload configuration
+ NodeBuilder payload1 = inferenceModelConfig1.child(InferenceModelConfig.INFERENCE_PAYLOAD);
+ payload1.setProperty("textKey", "text1");
+ payload1.setProperty("dimension", 1536);
+ payload1.setProperty("model", "model-name-of-inference-model1");
+
+ // Add inference model2 configuration
+ NodeBuilder inferenceModelConfig2 = inferenceIndexConfig.child("inferenceModel2");
+ inferenceModelConfig2.setProperty(InferenceConstants.TYPE, InferenceModelConfig.TYPE);
+ inferenceModelConfig2.setProperty(InferenceModelConfig.MODEL, "test-model2");
+ inferenceModelConfig2.setProperty(InferenceModelConfig.EMBEDDING_SERVICE_URL, "http://localhost:8080");
+ inferenceModelConfig2.setProperty(InferenceModelConfig.SIMILARITY_THRESHOLD, 0.8);
+ inferenceModelConfig2.setProperty(InferenceModelConfig.MIN_TERMS, 3L);
+ inferenceModelConfig2.setProperty(InferenceModelConfig.IS_DEFAULT, false);
+ inferenceModelConfig2.setProperty(InferenceModelConfig.ENABLED, true);
+
+ // Setup header configuration
+ NodeBuilder header2 = inferenceModelConfig1.child(InferenceModelConfig.HEADER);
+ header2.setProperty("headerKey1_2", "headerValue1_2");
+ header2.setProperty("headerKey2_2", "headerValue2_2");
+
+ // Setup payload configuration
+ NodeBuilder payload2 = inferenceModelConfig2.child(InferenceModelConfig.INFERENCE_PAYLOAD);
+ payload2.setProperty("textKey", "searchString2");
+ // dimension is handled automatically by ES on first document ingestion
+// payload2.setProperty("dimension", 1024);
+ payload2.setProperty("model", "model-name-of-inference-model2");
+
+ nodeStore.merge(rootBuilder, EmptyHook.INSTANCE, CommitInfo.EMPTY);
+
+ IndexDefinitionBuilder builder = createIndex("a").noAsync();
+ Tree index = setIndex(indexName, builder);
+ root.commit();
+
+ IndexMappingRecord mapping = getMapping(index);
+ Map<String, JsonData> meta = mapping.mappings().meta();
+ assertNotNull(meta);
+ ObjectMapper objectMapper = new ObjectMapper();
+ JsonNode jsonNode1 = objectMapper.readTree(enricherConfig).get("enricher");
+ JsonNode jsonNode2 = objectMapper.readTree(meta.get("enricher").toJson().toString());
+ assertEquals(jsonNode1, jsonNode2);
+
+ }
+
+ private void createInferenceConfig(String indexName, boolean isInferenceConfigEnabled,
+ String enricherConfig, String inferenceModelConfigName,
+ String inferenceModelName, String embeddingServiceUrl,
+ Double similarityThreshold, long minTerms, boolean isDefaultInferenceModelConfig,
+ boolean isInferenceModelConfigEnabled) throws CommitFailedException {
+ NodeBuilder rootBuilder = nodeStore.getRoot().builder();
+ NodeBuilder nodeBuilder = rootBuilder;
+ for (String path : PathUtils.elements(INFERENCE_CONFIG_PATH)) {
+ nodeBuilder = nodeBuilder.child(path);
+ }
+ nodeBuilder.setProperty(TYPE, InferenceConfig.TYPE);
+ nodeBuilder.setProperty(InferenceConstants.ENABLED, isInferenceConfigEnabled);
+ NodeBuilder inferenceConfig = nodeBuilder;
+
+ // Add inferenceIndexConfig
+ NodeBuilder inferenceIndexConfig = inferenceConfig.child(indexName);
+ inferenceIndexConfig.setProperty(TYPE, InferenceIndexConfig.TYPE);
+ inferenceIndexConfig.setProperty(ENRICHER_CONFIG, enricherConfig);
+ inferenceIndexConfig.setProperty(InferenceConstants.ENABLED, true);
+ // Add inference model1 configuration
+ NodeBuilder inferenceModelConfig1 = inferenceIndexConfig.child(inferenceModelConfigName);
+ inferenceModelConfig1.setProperty(InferenceConstants.TYPE, InferenceModelConfig.TYPE);
+ inferenceModelConfig1.setProperty(InferenceModelConfig.MODEL, inferenceModelName);
+ inferenceModelConfig1.setProperty(InferenceModelConfig.EMBEDDING_SERVICE_URL, embeddingServiceUrl);
+ inferenceModelConfig1.setProperty(InferenceModelConfig.SIMILARITY_THRESHOLD, similarityThreshold);
+ inferenceModelConfig1.setProperty(InferenceModelConfig.MIN_TERMS, minTerms);
+ inferenceModelConfig1.setProperty(InferenceModelConfig.IS_DEFAULT, isDefaultInferenceModelConfig);
+ inferenceModelConfig1.setProperty(InferenceModelConfig.ENABLED, isInferenceModelConfigEnabled);
+
+ // Setup header configuration
+ NodeBuilder header1 = inferenceModelConfig1.child(InferenceModelConfig.HEADER);
+ header1.setProperty("Content-Type", "application/json");
+
+ // Setup payload configuration
+ NodeBuilder payload1 = inferenceModelConfig1.child(InferenceModelConfig.INFERENCE_PAYLOAD);
+ payload1.setProperty("input", List.of(""), Type.STRINGS);
+ payload1.setProperty("model", "text-embedding-ada-002");
+ nodeStore.merge(rootBuilder, EmptyHook.INSTANCE, CommitInfo.EMPTY);
+ }
+
+ @Test
+ public void hybridSearch() throws Exception {
+ String jcrIndexName = UUID.randomUUID().toString();
+
+
+ String inferenceConfigInQuery = "{\"inferenceModelConfig\": \"ada-test-model\"}";
+ String inferenceServiceUrl = "http://localhost:" + wireMock.port() + "/v1/embeddings";
+ String inferenceModelConfigName = "ada-test-model";
+ String inferenceModelName = "text-embedding-ada-002";
+ // create inference config
+ createInferenceConfig(jcrIndexName, true, enricherConfig, inferenceModelConfigName,
+ inferenceModelName, inferenceServiceUrl,
+ 0.8, 1L, true, true);
+
+ IndexDefinitionBuilder builder = createIndex();
+ builder.includedPaths("/content")
+ .indexRule("nt:base")
+ .property("title").propertyIndex().analyzed().nodeScopeIndex()
+ .property("description").propertyIndex().analyzed().nodeScopeIndex()
+ .property("updatedBy").propertyIndex();
+
+ Tree index = setIndex(jcrIndexName, builder);
+ root.commit();
+
+ // add content
+ Tree content = root.getTree("/").addChild("content");
+ Tree health = content.addChild("health");
+ health.setProperty("title", "Healthy Eating for a Balanced Life");
+ health.setProperty("description", "This article discusses how a well-balanced diet can lead to better health outcomes. It covers the importance of fruits, vegetables, lean proteins, and whole grains.");
+
+ Tree cars = content.addChild("cars");
+ cars.setProperty("title", "The Future of Electric Cars");
+ cars.setProperty("description", "Electric vehicles are revolutionizing the automobile industry. This paper explores advancements in battery technology, charging infrastructure, and sustainability.");
+
+ Tree programming = content.addChild("programming");
+ programming.setProperty("title", "Mastering Python for Data Science");
+ programming.setProperty("description", "A comprehensive guide to using Python for data science projects. Topics include data manipulation, visualization, and machine learning algorithms like decision trees and neural networks.");
+
+ Tree ml = content.addChild("ml");
+ ml.setProperty("title", "Introduction to Machine Learning");
+ ml.setProperty("description", "This book introduces machine learning concepts, focusing on supervised and unsupervised learning techniques. It covers algorithms like linear regression, k-means clustering, and support vector machines.");
+
+ Tree yoga = content.addChild("yoga");
+ yoga.setProperty("title", "Yoga for Mental Wellness");
+ yoga.setProperty("description", "The benefits of yoga for mental health are vast. This study shows how practicing yoga can reduce stress, anxiety, and improve overall well-being through breathing techniques and meditation.");
+
+ // this content is not enriched with embeddings on purpose
+ Tree farm = content.addChild("farm");
+ farm.setProperty("title", "Sustainable Farming Practices");
+ farm.setProperty("description", "Sustainable farming practices are essential for preserving the environment. This article discusses crop rotation, soil health, and water conservation methods to reduce the carbon footprint of agriculture.");
+
+ root.commit();
+
+ // let the index catch up
+ assertEventually(() -> assertEquals(7, countDocuments(index)));
+
+ // this mimics the inference service by traversing the content and enriching it with embeddings
+ ObjectMapper mapper = new JsonMapper();
+ List<String> paths = executeQuery("select [jcr:path] from [nt:base] where ISDESCENDANTNODE('/content') and title is not null", SQL2);
+ for (String path : paths) {
+ URL json = this.getClass().getResource("/inferenceUsingConfig" + path + ".json");
+ if (json != null) {
+ Map<String, Collection<Double>> map = mapper.readValue(json, Map.class);
+ ObjectNode updateDoc = mapper.createObjectNode();
+ List<Float> embeddings = map.get("embedding").stream().map(d -> ((Double) d).floatValue()).collect(Collectors.toList());
+ VectorDocument vectorDocument = new VectorDocument(UUID.randomUUID().toString(), embeddings,
+ Map.of("updatedAt", Instant.now().toEpochMilli(), "model", inferenceModelName));
+ ObjectNode vectorSpacesNode = updateDoc.putObject(InferenceConstants.VECTOR_SPACES);
+ ArrayNode inferenceModelConfigNode = vectorSpacesNode.putArray(inferenceModelConfigName);
+ inferenceModelConfigNode.addPOJO(vectorDocument);
+
+ updateDocument(index, path, updateDoc);
+ }
+ }
+
+ try (Stream<Path> stream = Files.walk(Paths.get(this.getClass().getResource("/inferenceUsingConfig/queries").toURI()))) {
+ stream.filter(Files::isRegularFile).forEach(queryFile -> {
+ String query = FilenameUtils.removeExtension(queryFile.getFileName().toString()).replaceAll("_", " ");
+ String str = InferenceConfig.getInstance().getInferenceModelConfig(jcrIndexName, inferenceModelConfigName).getPayload().getInferencePayload(query);
+ if (queryFile.toAbsolutePath().toString().contains("queries/faulty")) {
+
+ wireMock.stubFor(WireMock.post("/v1/embeddings")
+ .withRequestBody(WireMock.equalToJson(InferenceConfig.getInstance().getInferenceModelConfig(jcrIndexName, inferenceModelConfigName).getPayload().getInferencePayload(query)))
+ .willReturn(WireMock.serverError()));
+ } else if (queryFile.toAbsolutePath().toString().contains("delayed")) {
+ wireMock.stubFor(WireMock.post("/v1/embeddings")
+ .withRequestBody(WireMock.equalToJson(InferenceConfig.getInstance().getInferenceModelConfig(jcrIndexName, inferenceModelConfigName).getPayload().getInferencePayload(query)))
+ .willReturn(WireMock.ok()
+ .withHeader("Content-Type", "application/json")
+ .withBody("[]")
+ .withFixedDelay(6000)));
+ } else {
+ String json;
+ try {
+ json = IOUtils.toString(queryFile.toUri(), StandardCharsets.UTF_8);
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ wireMock.stubFor(WireMock.post("/v1/embeddings")
+ .withRequestBody(WireMock.equalToJson(InferenceConfig.getInstance().getInferenceModelConfig(jcrIndexName, inferenceModelConfigName).getPayload().getInferencePayload(query)))
+ .willReturn(WireMock.ok()
+ .withHeader("Content-Type", "application/json")
+ .withBody(json)));
+ }
+ });
+ }
+
+ Map<String, String> queryResults = Map.of(
+ "a beginner guide to data manipulation in python", "/content/programming",
+ "how to improve mental health through exercises", "/content/yoga",
+ "nutritional advice for a healthier lifestyle", "/content/health",
+ "technological advancements in electric vehicles", "/content/cars",
+ "what are the key algorithms used in machine learning", "/content/ml"
+ );
+
+ assertEventually(() -> {
+
+ for (Map.Entry<String, String> entry : queryResults.entrySet()) {
+ String query = entry.getKey();
+ String expectedPath = entry.getValue();
+ String queryPath = "select [jcr:path] from [nt:base] where ISDESCENDANTNODE('/content') and contains(*, '?" + inferenceConfigInQuery + "?" + query + "')";
+
+ List<String> results = executeQuery(queryPath, SQL2, true, true);
+ assertEquals(expectedPath, results.get(0));
+
+ // test that the same query does not return any result when the inference service is not invoked (no prefix)
+ String queryPath2 = "select [jcr:path] from [nt:base] where ISDESCENDANTNODE('/content') and contains(*, '" + query + "')";
+ assertQuery(queryPath2, List.of());
+ }
+
+ // test that a failure in the inference service does not prevent the query from returning results
+ String queryPath3 = "select [jcr:path] from [nt:base] where ISDESCENDANTNODE('/content') and contains(*, '?" + inferenceConfigInQuery + "?" + "machine learning')";
+ assertQuery(queryPath3, List.of("/content/ml", "/content/programming"));
+
+ // test that a delayed response from the inference service does not prevent the query from returning results
+ String queryPath4 = "select [jcr:path] from [nt:base] where ISDESCENDANTNODE('/content') and contains(*, '?" + inferenceConfigInQuery + "?" + "farming practices')";
+ assertQuery(queryPath4, List.of("/content/farm"));
+
+ });
+
+ ObjectNode carsDoc = getDocument(index, "/content/cars");
+ assertNotNull(carsDoc.get(InferenceConstants.VECTOR_SPACES));
+ // let's check that inference data is not deleted when updating a document
+ cars.setProperty("updatedBy", "John Doe");
+ root.commit();
+
+ assertEventually(() -> assertQuery("select [jcr:path] from [nt:base] where ISDESCENDANTNODE('/content') and updatedBy = 'John Doe'", List.of("/content/cars")));
+
+ ObjectNode carsDocUpdated = getDocument(index, "/content/cars");
+ assertNotNull(carsDocUpdated.get(InferenceConstants.VECTOR_SPACES));
+
+ }
+}
diff --git a/oak-search-elastic/src/test/resources/inferenceUsingConfig/content/cars.json b/oak-search-elastic/src/test/resources/inferenceUsingConfig/content/cars.json
new file mode 100644
index 0000000000..bf27b9b547
--- /dev/null
+++ b/oak-search-elastic/src/test/resources/inferenceUsingConfig/content/cars.json
@@ -0,0 +1,1029 @@
+{
+ "embedding": [
+ -0.00032085756538435817,
+ -0.05453383922576904,
+ 0.021284496411681175,
+ 0.011297575198113918,
+ -0.06322141736745834,
+ 0.030026709660887718,
+ -0.02622932381927967,
+ -0.022433506324887276,
+ -0.036360710859298706,
+ 0.036754999309778214,
+ 0.016203081235289574,
+ -0.02671149931848049,
+ 0.021104304119944572,
+ 0.036146581172943115,
+ 0.009873165749013424,
+ 0.042389512062072754,
+ -0.011525302194058895,
+ 0.017060283571481705,
+ 0.02283816784620285,
+ -0.051810815930366516,
+ 0.014093165285885334,
+ -0.057827409356832504,
+ -0.03160601854324341,
+ 0.038884248584508896,
+ -0.022670788690447807,
+ -0.011314068920910358,
+ -0.0416138730943203,
+ -0.020842213183641434,
+ -0.020640166476368904,
+ 0.02694256231188774,
+ -0.006167388521134853,
+ -0.019998257979750633,
+ 0.015384774655103683,
+ -0.055157821625471115,
+ 0.030793113633990288,
+ -0.014814103953540325,
+ -0.04318072646856308,
+ -0.0642055794596672,
+ 0.024317676201462746,
+ -0.01282260287553072,
+ -0.004497056361287832,
+ 0.03974755108356476,
+ -0.025088615715503693,
+ 0.08231592923402786,
+ 0.03025936149060726,
+ 0.04659447446465492,
+ -0.03925337642431259,
+ -0.013090496882796288,
+ -0.0015317130601033568,
+ -0.03163173422217369,
+ 0.05283305421471596,
+ -0.04818202555179596,
+ 0.04445748031139374,
+ 0.030701758340001106,
+ -0.021812595427036285,
+ 0.013233053497970104,
+ 0.016242938116192818,
+ 0.01954074203968048,
+ -0.0008860505768097937,
+ -0.023530565202236176,
+ 0.034376636147499084,
+ 9.283776307711378e-05,
+ 0.03307931497693062,
+ -0.014407970011234283,
+ 0.0033419430255889893,
+ -0.017933696508407593,
+ 0.02483494207262993,
+ 0.012110529467463493,
+ 0.029827602207660675,
+ 0.02295449934899807,
+ -0.024247031658887863,
+ -0.06500384211540222,
+ 0.009326675906777382,
+ 0.04892948642373085,
+ 0.03160814568400383,
+ -0.043178241699934006,
+ -0.00530293257907033,
+ -0.0014785071834921837,
+ 0.03557021543383598,
+ 0.059419579803943634,
+ -0.06300808489322662,
+ -0.0440005287528038,
+ -0.03983315825462341,
+ 0.004201482981443405,
+ 0.012314239516854286,
+ -0.013961213640868664,
+ 0.02842114493250847,
+ -0.016974346712231636,
+ 0.025895873084664345,
+ 0.007776529528200626,
+ 0.07535985857248306,
+ 0.0062449611723423,
+ 0.04497290402650833,
+ -0.007529259193688631,
+ 0.003429861506447196,
+ 0.0003872303059324622,
+ -0.020493915304541588,
+ 0.012098774313926697,
+ 0.04064788669347763,
+ -0.0315297432243824,
+ -0.030655302107334137,
+ -0.03541473299264908,
+ -0.032396215945482254,
+ 0.0266510508954525,
+ -0.024183284491300583,
+ -0.042912304401397705,
+ -0.03289426490664482,
+ 0.0045339674688875675,
+ -0.054046496748924255,
+ -0.010935164988040924,
+ -0.030167417600750923,
+ -0.01569320447742939,
+ 0.01450172159820795,
+ 0.007602537516504526,
+ -0.00787442084401846,
+ 0.037000421434640884,
+ 0.0028276541270315647,
+ -0.019354894757270813,
+ 0.00648122513666749,
+ 0.050349075347185135,
+ 0.05039502680301666,
+ 0.01741696149110794,
+ -0.04663702845573425,
+ -0.01989245042204857,
+ -0.03303885459899902,
+ 0.02273550257086754,
+ -0.03696555644273758,
+ -0.011864867992699146,
+ 0.07046102732419968,
+ 0.05212755128741264,
+ 0.010726888664066792,
+ -0.04087989777326584,
+ -0.005978770088404417,
+ 0.011883223429322243,
+ 0.005802897270768881,
+ 0.057454079389572144,
+ -0.027945777401328087,
+ -0.07029160857200623,
+ -0.00478519219905138,
+ 0.04802520573139191,
+ -0.007016343530267477,
+ -0.026012761518359184,
+ 0.04081803560256958,
+ 0.027746574953198433,
+ 0.014672129414975643,
+ -0.04864092916250229,
+ -0.03931719437241554,
+ -0.02726619504392147,
+ -0.04095327854156494,
+ -0.003715871600434184,
+ -0.04542127996683121,
+ -0.020407484844326973,
+ -0.006947195157408714,
+ 0.029092278331518173,
+ 0.060167621821165085,
+ -0.07290730625391006,
+ 0.04113234952092171,
+ -0.014330049976706505,
+ -0.006443648599088192,
+ 0.04283853992819786,
+ 0.009798162616789341,
+ 0.031886402517557144,
+ -0.034948259592056274,
+ 0.021921735256910324,
+ -0.0003758483799174428,
+ 0.020924627780914307,
+ 0.00468538049608469,
+ 0.009622306562960148,
+ 0.012209167703986168,
+ 0.017645208165049553,
+ 0.018102191388607025,
+ 0.008526170626282692,
+ 0.04300872981548309,
+ 0.03253806009888649,
+ 0.028077498078346252,
+ -0.009734631516039371,
+ 0.03435669094324112,
+ -0.05410346761345863,
+ 0.016477016732096672,
+ 0.01887812465429306,
+ 0.004010640550404787,
+ -0.022954557090997696,
+ -0.03341739624738693,
+ -0.02001102641224861,
+ -0.041754405945539474,
+ 0.036674533039331436,
+ 0.03047695755958557,
+ -0.0025788089260458946,
+ -0.021557839587330818,
+ -0.03287899121642113,
+ -0.02171492390334606,
+ 0.009919337928295135,
+ -0.02460405044257641,
+ 0.046285200864076614,
+ -0.027795709669589996,
+ -0.0256213191896677,
+ -0.031270772218704224,
+ -0.0038638494443148375,
+ -0.030982211232185364,
+ 0.023710113018751144,
+ 0.039561621844768524,
+ 0.03613878786563873,
+ -0.027447998523712158,
+ -0.0200494471937418,
+ 0.03373865783214569,
+ 0.01950472593307495,
+ 0.009246277622878551,
+ 0.02950246073305607,
+ -0.01962418481707573,
+ 0.017156995832920074,
+ 0.011511160060763359,
+ 0.0005734823062084615,
+ -0.008436213247478008,
+ -0.02561483345925808,
+ -0.014667789451777935,
+ 0.010143936611711979,
+ 0.044111426919698715,
+ -0.002293984405696392,
+ -0.008224038407206535,
+ 0.024123072624206543,
+ -0.028998514637351036,
+ 0.008298980072140694,
+ 0.02094656229019165,
+ -0.01404000073671341,
+ 0.004582616034895182,
+ 0.00030016631353646517,
+ -0.05788321793079376,
+ 0.05270202457904816,
+ 0.002928013214841485,
+ -0.016690460965037346,
+ -0.012849885039031506,
+ 0.030712643638253212,
+ -0.04554271697998047,
+ -0.038323987275362015,
+ -0.02844144217669964,
+ 0.003741147229447961,
+ 0.02936384081840515,
+ -0.025091705843806267,
+ 0.021754054352641106,
+ 0.03889261558651924,
+ -0.003594848560169339,
+ 0.04148749262094498,
+ 0.06181594356894493,
+ -0.03827730938792229,
+ 0.020665355026721954,
+ 0.010885936208069324,
+ 0.03340987116098404,
+ 0.00364930322393775,
+ 0.027517588809132576,
+ 0.05084687098860741,
+ 0.010862519964575768,
+ 0.055858511477708817,
+ -0.01953900419175625,
+ -0.06176024675369263,
+ -0.01613631471991539,
+ 0.02631576545536518,
+ 0.04724213108420372,
+ -0.026831023395061493,
+ -0.0040880716405808926,
+ 0.03534208610653877,
+ 0.03780074790120125,
+ -0.03531143069267273,
+ -0.024894654750823975,
+ -0.029303180053830147,
+ -0.04420873150229454,
+ -0.007755547761917114,
+ -0.0033568148501217365,
+ -0.023678308352828026,
+ 0.07113361358642578,
+ -0.02100909873843193,
+ 0.038403887301683426,
+ 0.006231221836060286,
+ 0.06999514251947403,
+ -0.018329858779907227,
+ -0.006935680750757456,
+ -0.00522549357265234,
+ -0.02200785093009472,
+ -0.03786664083600044,
+ 0.014295708388090134,
+ -0.0010451975977048278,
+ 0.026637671515345573,
+ 0.02578325755894184,
+ 0.016171187162399292,
+ 0.05468994006514549,
+ -0.02746020443737507,
+ 0.02801704779267311,
+ -0.027596745640039444,
+ 0.00660832179710269,
+ 0.03232800215482712,
+ 0.025899285450577736,
+ -0.04401755332946777,
+ 0.0006828220211900771,
+ 0.047432538121938705,
+ -0.011939971707761288,
+ -0.010315385647118092,
+ 0.057641781866550446,
+ -0.020192638039588928,
+ 0.03624439984560013,
+ -0.01297750510275364,
+ 0.01623692736029625,
+ 0.05037717893719673,
+ 0.010335907340049744,
+ -0.06748762726783752,
+ -0.06704342365264893,
+ -0.014558940194547176,
+ 0.008359795436263084,
+ 0.01376679353415966,
+ -0.036681875586509705,
+ 0.015874722972512245,
+ 0.036111555993556976,
+ 0.004284363240003586,
+ -0.011499155312776566,
+ -0.04643860086798668,
+ -0.03144599869847298,
+ -0.07691144943237305,
+ -0.009070947766304016,
+ -0.04143701121211052,
+ 0.031817130744457245,
+ -0.0454997755587101,
+ -0.004044258035719395,
+ 0.022708682343363762,
+ -0.0015208746772259474,
+ -0.03918032720685005,
+ 0.0015487221535295248,
+ -0.031659163534641266,
+ -0.005554099567234516,
+ -0.0574621744453907,
+ -0.03503018990159035,
+ -0.015602339059114456,
+ -0.03297632187604904,
+ -0.06096780672669411,
+ -0.012176633812487125,
+ 0.05626242980360985,
+ -0.022312555462121964,
+ -0.013220258988440037,
+ -0.05478321388363838,
+ -0.03137641027569771,
+ -0.02157657779753208,
+ 0.03509980067610741,
+ 0.04289146512746811,
+ 0.05631367489695549,
+ 0.03840114548802376,
+ -0.02267870120704174,
+ -0.049517035484313965,
+ 0.029806027188897133,
+ 0.04759993776679039,
+ 0.03136783093214035,
+ -0.007607747800648212,
+ 0.038594894111156464,
+ 0.01043114997446537,
+ 0.018212635070085526,
+ 0.018146932125091553,
+ 0.004301192704588175,
+ -0.05175178498029709,
+ -0.05209890380501747,
+ -0.04631936922669411,
+ 0.01101370807737112,
+ -0.03907710686326027,
+ 0.013219614513218403,
+ 0.026191256940364838,
+ 0.041132401674985886,
+ -0.04781810939311981,
+ 0.01808045618236065,
+ -0.034916579723358154,
+ 0.009524118155241013,
+ -0.054173581302165985,
+ 0.021638717502355576,
+ -0.03151044249534607,
+ 0.008106418885290623,
+ 0.024169165641069412,
+ 0.004095382522791624,
+ 0.03236396610736847,
+ 0.0025467118248343468,
+ -0.011325155384838581,
+ -0.03822346404194832,
+ -0.037566523998975754,
+ 0.01856778934597969,
+ 0.04773401841521263,
+ 0.030911939218640327,
+ -0.01824602112174034,
+ 0.019122587516903877,
+ 0.04391949251294136,
+ -0.0034806188195943832,
+ -0.0436927005648613,
+ -0.039689674973487854,
+ -0.006022883579134941,
+ -0.02578888088464737,
+ -0.010455603711307049,
+ -0.03820757567882538,
+ -0.029878374189138412,
+ -0.001875463523901999,
+ -0.03319783881306648,
+ 0.04909111186861992,
+ -0.05048620328307152,
+ 0.0016031612176448107,
+ -0.025484735146164894,
+ 0.009316717274487019,
+ -0.08332357555627823,
+ 0.01460395846515894,
+ 0.013663148507475853,
+ 0.051024455577135086,
+ 0.031414955854415894,
+ 0.004570962395519018,
+ -0.01041247695684433,
+ -0.0704021155834198,
+ -0.04861867427825928,
+ 0.04692741110920906,
+ 0.05070369690656662,
+ 0.019614510238170624,
+ -0.037236906588077545,
+ 0.003118579275906086,
+ 0.0487840436398983,
+ 0.0118545051664114,
+ 0.028248801827430725,
+ 0.00549158314242959,
+ 0.02219865284860134,
+ -0.013851895928382874,
+ -0.008346307091414928,
+ -0.02281762845814228,
+ 8.306925155920908e-05,
+ -0.005600399803370237,
+ -0.031517818570137024,
+ -0.02025596983730793,
+ -0.029164597392082214,
+ 0.034490685909986496,
+ -0.027925053611397743,
+ 0.01981569454073906,
+ -0.028834126889705658,
+ 0.023616259917616844,
+ -0.06578265130519867,
+ 0.03321762755513191,
+ -0.042952533811330795,
+ -0.005515327677130699,
+ -0.05006009712815285,
+ 0.014318518340587616,
+ -0.013795706443488598,
+ 0.006379882339388132,
+ 0.015332587994635105,
+ 0.02716187946498394,
+ 0.01316344365477562,
+ 0.03307094797492027,
+ 0.044485338032245636,
+ -0.03636191785335541,
+ -0.06437208503484726,
+ 0.0016379929147660732,
+ -0.04543362185359001,
+ -0.011311812326312065,
+ -0.00580613175407052,
+ -0.039410047233104706,
+ 0.005596708506345749,
+ 0.01984246075153351,
+ 0.010120819322764874,
+ 0.03874339535832405,
+ -0.0529836006462574,
+ -0.06803622841835022,
+ 0.008966771885752678,
+ -0.03396711125969887,
+ 0.02104252763092518,
+ -0.0025844071060419083,
+ -0.014092580415308475,
+ -0.020405130460858345,
+ -0.01975448802113533,
+ 0.02841377630829811,
+ -0.04107167199254036,
+ -0.019141076132655144,
+ -0.022387301549315453,
+ 0.0004175980866421014,
+ 0.03637173771858215,
+ -0.02131461538374424,
+ 0.04732923582196236,
+ -0.028178496286273003,
+ -0.027307448908686638,
+ 0.02991148829460144,
+ 0.01301674172282219,
+ -0.0314277708530426,
+ 0.0369127057492733,
+ 0.035907577723264694,
+ 0.003756759688258171,
+ 0.027589943259954453,
+ 0.05767035484313965,
+ -0.044804394245147705,
+ -0.0059390743263065815,
+ 0.012023952789604664,
+ 0.04387965798377991,
+ -0.06175922229886055,
+ 0.05246754363179207,
+ -0.042731352150440216,
+ -0.028912054374814034,
+ 0.03669661283493042,
+ -0.034823838621377945,
+ -0.026814190670847893,
+ 0.047623854130506516,
+ 0.05629649758338928,
+ 0.013356036506593227,
+ 0.009655585512518883,
+ -0.042180392891168594,
+ -0.0463123545050621,
+ -0.0018905075266957283,
+ -0.0020667079370468855,
+ -0.023534968495368958,
+ 0.03538201376795769,
+ -0.032714586704969406,
+ 0.047038231045007706,
+ 0.048780616372823715,
+ -0.017649570479989052,
+ 0.07991998642683029,
+ -0.01461517158895731,
+ 0.043290525674819946,
+ -0.012398716062307358,
+ 0.030319422483444214,
+ -0.004374418407678604,
+ -0.023461701348423958,
+ -0.012720940634608269,
+ 0.031231055036187172,
+ 0.02019231580197811,
+ 0.02350805141031742,
+ 0.029697272926568985,
+ -0.016429441049695015,
+ 0.0024170533288270235,
+ -0.004548695869743824,
+ -0.04601341858506203,
+ -0.007832661271095276,
+ 0.003050564555451274,
+ -0.01610933244228363,
+ -0.030248010531067848,
+ 0.022528233006596565,
+ -0.006231129635125399,
+ 0.058965571224689484,
+ -0.03164108470082283,
+ -0.011843280866742134,
+ 0.027147585526108742,
+ 0.062376879155635834,
+ -0.00580419460311532,
+ 0.03089951165020466,
+ -0.008129805326461792,
+ 0.027366893365979195,
+ -0.03847167640924454,
+ -0.01680341549217701,
+ -0.00759041728451848,
+ 0.0349147655069828,
+ 0.027957696467638016,
+ 0.033329106867313385,
+ 0.00847702007740736,
+ -0.019817978143692017,
+ -0.04551928490400314,
+ -0.011118019931018353,
+ -0.03749408572912216,
+ 0.017633290961384773,
+ 0.01674238033592701,
+ -0.024709701538085938,
+ 0.007290991954505444,
+ -0.03218381106853485,
+ -0.09178327023983002,
+ -0.033197805285453796,
+ -0.04498476907610893,
+ 0.06436678767204285,
+ -0.07367291301488876,
+ -0.013564608991146088,
+ 0.011066594161093235,
+ 0.01830812729895115,
+ 0.011255575343966484,
+ 0.03651905432343483,
+ 0.025258390232920647,
+ 0.004130151588469744,
+ -0.00852893479168415,
+ 0.04080512747168541,
+ 0.02682644873857498,
+ 0.010441405698657036,
+ -0.044248271733522415,
+ 0.03058003820478916,
+ 0.009797690436244011,
+ -0.019239969551563263,
+ 0.03826361522078514,
+ 0.0036540355067700148,
+ -0.04011862352490425,
+ 0.008941542357206345,
+ 0.0067695812322199345,
+ 0.02404937893152237,
+ 0.055377185344696045,
+ -0.027251645922660828,
+ 0.014831483364105225,
+ -0.04217636212706566,
+ 0.02319449931383133,
+ -0.0018706226255744696,
+ -0.015367971733212471,
+ 0.038671188056468964,
+ -0.0245042871683836,
+ -0.04382634535431862,
+ -0.009918400086462498,
+ 0.033076122403144836,
+ 0.03772599622607231,
+ 0.003010353771969676,
+ -0.02231695130467415,
+ -0.048641953617334366,
+ 0.039112210273742676,
+ -0.03311217203736305,
+ 0.045974764972925186,
+ -0.043934404850006104,
+ -0.04397095367312431,
+ -0.01141875796020031,
+ 0.016546452417969704,
+ -0.026877455413341522,
+ -0.00039359324728138745,
+ -0.038500286638736725,
+ 0.02689109928905964,
+ -0.022555528208613396,
+ 0.022363368421792984,
+ 0.015439481474459171,
+ 0.0077873216941952705,
+ 0.012614794075489044,
+ -0.04341103881597519,
+ 0.002854915102943778,
+ 0.024207713082432747,
+ 0.05798156559467316,
+ -0.01850047893822193,
+ 0.0359506718814373,
+ -0.02639979124069214,
+ -0.022457661107182503,
+ 0.031714726239442825,
+ 0.04740165174007416,
+ -0.030845103785395622,
+ 0.014428327791392803,
+ 0.04110720008611679,
+ 0.03988081216812134,
+ -0.013613447546958923,
+ -0.030660361051559448,
+ 0.01927565038204193,
+ -0.023486219346523285,
+ 0.04549034684896469,
+ 0.023531759157776833,
+ 0.04676511883735657,
+ 0.011540248058736324,
+ 0.01691318303346634,
+ 0.02623659372329712,
+ -0.03400745242834091,
+ -0.018167199566960335,
+ -0.0037668696604669094,
+ -0.03478188440203667,
+ 0.04600360244512558,
+ 0.042031411081552505,
+ 0.007767538074404001,
+ -0.010282007046043873,
+ -0.005519204773008823,
+ 0.031170258298516273,
+ -0.057362377643585205,
+ 0.021285798400640488,
+ -0.022191211581230164,
+ -0.027877578511834145,
+ -0.005191056057810783,
+ -0.04770180210471153,
+ -0.021584272384643555,
+ 0.0034267855808138847,
+ -0.008598802611231804,
+ 0.00946258008480072,
+ 0.03484901413321495,
+ 0.010830136016011238,
+ 0.04487032815814018,
+ 0.014311627484858036,
+ 0.03468425199389458,
+ -0.01044460479170084,
+ 0.06189890578389168,
+ 0.005305053666234016,
+ 0.02358269691467285,
+ -0.01695430278778076,
+ 0.018958620727062225,
+ 0.11130587756633759,
+ -0.01487373560667038,
+ 0.01085286308079958,
+ 0.0018855094676837325,
+ 0.011972827836871147,
+ 0.010329443030059338,
+ -0.013496599160134792,
+ 0.01983099989593029,
+ -0.04130430892109871,
+ 0.019242193549871445,
+ 0.04610566794872284,
+ 0.018296895548701286,
+ 0.039744190871715546,
+ 0.031091460958123207,
+ -0.029224369674921036,
+ 0.03013271652162075,
+ 0.013645462691783905,
+ -0.03705238923430443,
+ -0.048657480627298355,
+ -0.0014556891983374953,
+ -0.010091366246342659,
+ -0.007103427313268185,
+ -0.0239203292876482,
+ 0.02647525444626808,
+ 0.01666972227394581,
+ 0.009704051539301872,
+ 0.010244089178740978,
+ -0.06426414102315903,
+ 0.03748185560107231,
+ 0.038431208580732346,
+ -0.014601403847336769,
+ 0.043511971831321716,
+ -0.038662638515233994,
+ -0.0010270043276250362,
+ -8.416341006522998e-05,
+ -0.017213599756360054,
+ 0.0014030402526259422,
+ 0.08109747618436813,
+ -0.0009769214084371924,
+ 0.002919222693890333,
+ 0.003816022537648678,
+ 0.03863709047436714,
+ -0.030438361689448357,
+ 0.014713307842612267,
+ 0.027176354080438614,
+ -0.017886076122522354,
+ -0.008028514683246613,
+ -0.009046601131558418,
+ 0.02203422784805298,
+ 0.023991214111447334,
+ 0.00918679777532816,
+ 0.005176338832825422,
+ -0.03287708759307861,
+ 0.024353256449103355,
+ -0.03372100368142128,
+ 0.00765839172527194,
+ 0.0026719756424427032,
+ -0.000584588386118412,
+ -0.023760352283716202,
+ -0.040712129324674606,
+ -0.023196469992399216,
+ 0.04257895052433014,
+ 0.024014146998524666,
+ 0.022151511162519455,
+ -0.05226106941699982,
+ -0.01928132027387619,
+ 0.04174303263425827,
+ 0.052716419100761414,
+ 0.0418289490044117,
+ -0.0379711389541626,
+ 0.004082547500729561,
+ -0.04250432923436165,
+ -0.006669533904641867,
+ -0.0014184056781232357,
+ -0.01441886369138956,
+ -0.02688012272119522,
+ -0.02779776230454445,
+ 7.609107706230134e-05,
+ 0.007836505770683289,
+ -0.015612160786986351,
+ -0.02652919851243496,
+ 0.012038168497383595,
+ 0.0010870612459257245,
+ 0.0029285813216120005,
+ 0.024634620174765587,
+ -0.019612407311797142,
+ -0.016768647357821465,
+ 0.016230633482336998,
+ -0.04308318346738815,
+ -0.025095708668231964,
+ -0.024388667196035385,
+ -0.008442498743534088,
+ -0.01696982979774475,
+ 0.023677682504057884,
+ -0.02833184041082859,
+ 0.0387784019112587,
+ -0.04239107295870781,
+ 0.019652055576443672,
+ 0.006498370319604874,
+ 0.03652700036764145,
+ 0.0036783681716769934,
+ 0.02762850932776928,
+ 0.0006031607044860721,
+ 0.0009644058882258832,
+ -0.019841931760311127,
+ -0.03139762952923775,
+ 0.04318121075630188,
+ 0.05271812900900841,
+ 0.009639368392527103,
+ -0.014974258840084076,
+ 0.0505673810839653,
+ 0.024308789521455765,
+ -0.0017279558815062046,
+ 0.020729361101984978,
+ 0.008615143597126007,
+ 0.004803210496902466,
+ -0.023088708519935608,
+ -0.01834014430642128,
+ -0.01636393554508686,
+ 0.040076740086078644,
+ 0.03900521248579025,
+ 0.023557959124445915,
+ 0.05207996815443039,
+ 0.022860335186123848,
+ -0.009387609548866749,
+ 0.05059882253408432,
+ 0.015308234840631485,
+ -0.034178923815488815,
+ -0.0153642687946558,
+ -0.06212221831083298,
+ 0.020828895270824432,
+ -0.005070643499493599,
+ 0.0006971186376176775,
+ -0.004177374299615622,
+ -0.023643257096409798,
+ 0.010916302911937237,
+ 0.03739691525697708,
+ 0.023058269172906876,
+ -0.04279569908976555,
+ -0.00775729538872838,
+ -0.04889952391386032,
+ -0.011227690614759922,
+ -0.01706993579864502,
+ -0.046383168548345566,
+ 0.02131703309714794,
+ 0.00958291720598936,
+ -0.05061955749988556,
+ 0.039667900651693344,
+ 0.050858158618211746,
+ 0.03511078283190727,
+ -0.027795668691396713,
+ -0.019554629921913147,
+ 0.03967487812042236,
+ 0.04024463891983032,
+ 0.006045411340892315,
+ 0.02706064283847809,
+ 0.0836140364408493,
+ -0.011751659214496613,
+ 0.008404431864619255,
+ 0.016113724559545517,
+ 0.04998482018709183,
+ 0.00040583766531199217,
+ -0.020813144743442535,
+ 0.010895965620875359,
+ -0.022508567199110985,
+ -0.029705729335546494,
+ -0.02293618954718113,
+ -0.014131339266896248,
+ 0.0019035794539377093,
+ -0.02314496971666813,
+ 0.022725380957126617,
+ 0.00037125308881513774,
+ -0.012089988216757774,
+ -0.02860303223133087,
+ 0.04747692123055458,
+ 0.014268981292843819,
+ 0.010936987586319447,
+ -0.030621418729424477,
+ -0.009865396656095982,
+ 0.03445883095264435,
+ 0.002512342529371381,
+ 0.006272119004279375,
+ -0.018522385507822037,
+ -0.009310833178460598,
+ 0.016639096662402153,
+ -0.006530633196234703,
+ -0.048427313566207886,
+ 0.026774873957037926,
+ 0.03805725276470184,
+ -0.0482364222407341,
+ 0.03866757079958916,
+ -0.0054497611708939075,
+ -0.012898536399006844,
+ -0.020528927445411682,
+ -0.022648051381111145,
+ -0.034906599670648575,
+ 0.0456620454788208,
+ 0.04521718621253967,
+ -0.00978001020848751,
+ 0.010592835955321789,
+ 0.03688071295619011,
+ -0.015113442204892635,
+ -0.003920670133084059,
+ 0.013868007808923721,
+ -0.04671882092952728,
+ -0.04812724515795708,
+ -0.02148025669157505,
+ 4.0056966099655256e-05,
+ 0.01561345811933279,
+ 0.01780618354678154,
+ -0.007508551236242056,
+ -0.0038625006563961506,
+ 0.021540362387895584,
+ 0.04383013769984245,
+ 0.025360992178320885,
+ 0.030938562005758286,
+ 0.003109243232756853,
+ -0.019059613347053528,
+ 0.039053965359926224,
+ -0.023877788335084915,
+ 0.033915914595127106,
+ 0.03309284523129463,
+ -0.009519226849079132,
+ -0.017570333555340767,
+ -0.03546374663710594,
+ -0.003987277392297983,
+ -0.0586385577917099,
+ 0.021359063684940338,
+ -0.05294963717460632,
+ -0.013280771672725677,
+ 0.00029613354126922786,
+ -0.0007201557164080441,
+ -0.012064212933182716,
+ 0.019639410078525543,
+ 0.00019858193991240114,
+ -0.05703853815793991,
+ 0.030853357166051865,
+ 0.05997017025947571,
+ -0.01448031421750784,
+ 0.011240009218454361,
+ -0.010856930166482925,
+ -0.01869184710085392,
+ 0.048123378306627274,
+ -0.05108755826950073,
+ 0.02143365889787674,
+ 0.03964029252529144,
+ 0.0077093602158129215,
+ 0.015862829983234406,
+ -0.023793671280145645,
+ 0.016103064641356468,
+ -0.0111615639179945,
+ 0.027271032333374023,
+ 0.00944910105317831,
+ -0.006923300679773092,
+ 0.02028406411409378,
+ 0.017267340794205666,
+ 0.009525042027235031,
+ -0.032976627349853516,
+ -0.013832959346473217,
+ -0.03240935504436493,
+ -0.007493842858821154,
+ 0.011097125709056854,
+ 0.015679363161325455,
+ 0.012027919292449951,
+ -0.039154306054115295,
+ -0.04815778508782387,
+ 0.023702610284090042,
+ 0.05085998773574829,
+ 0.03129243850708008,
+ 0.07372922450304031,
+ 0.015753094106912613,
+ 0.030665112659335136,
+ -0.00432703597471118,
+ -0.026253215968608856,
+ -0.022010840475559235,
+ -0.019378971308469772,
+ 0.03475680202245712,
+ 0.021017253398895264,
+ 0.05107325688004494,
+ -0.023925572633743286,
+ -0.01828659325838089,
+ 0.019139248877763748,
+ 0.030441323295235634,
+ -0.008448008447885513,
+ -0.014911835081875324,
+ 0.01133794616907835,
+ -0.02539920248091221,
+ 0.031103206798434258,
+ 0.015894679352641106,
+ 0.025508899241685867,
+ 0.019765855744481087,
+ -0.02641277201473713,
+ -0.03139115497469902,
+ -0.06691446900367737,
+ 0.026274263858795166,
+ 0.011582146398723125,
+ -0.04266483709216118,
+ 0.03125980496406555,
+ 0.008743015117943287,
+ 0.024392135441303253,
+ -0.030810099095106125,
+ 0.04577938839793205,
+ -0.033951763063669205,
+ -0.03599528595805168,
+ -0.04709405079483986,
+ -0.0208954606205225,
+ -0.03952864930033684,
+ 0.017787465825676918,
+ 0.02762901596724987,
+ 0.005586125422269106,
+ 0.03355272486805916,
+ 0.0002580986183602363,
+ -0.0033015208318829536,
+ -0.0032404400408267975,
+ 0.006674498785287142,
+ 0.041222695261240005,
+ 0.04416869208216667,
+ -0.024149160832166672,
+ -0.00680303992703557,
+ 0.020637251436710358,
+ 0.087911456823349,
+ 0.061613209545612335,
+ 0.006702901795506477,
+ -0.03982250392436981,
+ 0.021243959665298462,
+ -0.04361989349126816,
+ -0.012041624635457993,
+ -0.018523704260587692,
+ 0.0007457032334059477,
+ -0.02088860794901848,
+ -0.015467165037989616,
+ -0.016253408044576645,
+ -0.014343307353556156,
+ -0.023641858249902725,
+ -0.04266740009188652,
+ 0.00681725237518549,
+ 0.04786919429898262,
+ 0.024367788806557655,
+ -0.013843126595020294,
+ 0.005326298996806145,
+ 0.015034396201372147,
+ 0.009087293408811092,
+ -0.006705497391521931,
+ -0.03814459592103958,
+ -0.06343591958284378,
+ -0.02220407873392105,
+ -0.021916808560490608,
+ 0.013290063478052616,
+ -0.052008066326379776,
+ 0.006376325152814388,
+ -0.007663873489946127,
+ 0.035855732858181,
+ 0.01852116547524929,
+ 0.009577152319252491,
+ -0.020001336932182312,
+ 0.0316535048186779,
+ -0.06414144486188889,
+ 0.03827294707298279,
+ 0.001169964554719627
+ ],
+ "text": "The Future of Electric Cars Electric vehicles are revolutionizing the automobile industry. This paper explores advancements in battery technology, charging infrastructure, and sustainability."
+}
diff --git a/oak-search-elastic/src/test/resources/inferenceUsingConfig/content/health.json b/oak-search-elastic/src/test/resources/inferenceUsingConfig/content/health.json
new file mode 100644
index 0000000000..99de1c8076
--- /dev/null
+++ b/oak-search-elastic/src/test/resources/inferenceUsingConfig/content/health.json
@@ -0,0 +1,1029 @@
+{
+ "embedding": [
+ 0.0031092134304344654,
+ -0.07179860770702362,
+ -0.012429492548108101,
+ -0.006579301320016384,
+ -0.07426472753286362,
+ 0.047309089452028275,
+ -0.015005910769104958,
+ -0.026390794664621353,
+ -0.006848359480500221,
+ 0.0322503037750721,
+ 0.025181349366903305,
+ -0.03376301750540733,
+ 0.04935681074857712,
+ 0.062369126826524734,
+ -0.013506021350622177,
+ 0.031410880386829376,
+ -0.025750931352376938,
+ -0.011534308083355427,
+ -0.014346842654049397,
+ -0.049838513135910034,
+ 0.025701643899083138,
+ -0.04643886536359787,
+ -0.005444904789328575,
+ 0.037892796099185944,
+ -0.022271662950515747,
+ -0.027072230353951454,
+ -0.02129780873656273,
+ -0.013789446093142033,
+ -0.002936425618827343,
+ 0.0002143041492672637,
+ -0.0114747891202569,
+ 0.006331569980829954,
+ 0.034697968512773514,
+ -0.04342867061495781,
+ 0.03967461362481117,
+ -0.029230153188109398,
+ -0.05447359010577202,
+ -0.02607964351773262,
+ 0.014609708450734615,
+ 0.02454446628689766,
+ 0.0020512298215180635,
+ 0.026616636663675308,
+ -0.04599418491125107,
+ 0.007661501411348581,
+ 0.0016415708232671022,
+ 0.030270704999566078,
+ -0.031159082427620888,
+ -0.017187101766467094,
+ -0.0028304464649409056,
+ -0.02957644686102867,
+ 0.03781641274690628,
+ -0.05045296251773834,
+ 0.06107489392161369,
+ 0.020983388647437096,
+ -0.011943836696445942,
+ -0.018992837518453598,
+ 0.008740605786442757,
+ 0.041302572935819626,
+ 0.004586313385516405,
+ -0.003661106340587139,
+ 0.05795947462320328,
+ -0.004067078232765198,
+ 0.030841652303934097,
+ -0.009036555886268616,
+ 0.0451318696141243,
+ -0.039930857717990875,
+ 0.03641737625002861,
+ 0.018537050113081932,
+ 0.02409197948873043,
+ 0.031032538041472435,
+ -0.035132650285959244,
+ -0.042471133172512054,
+ 0.04119741916656494,
+ 0.05368814244866371,
+ 0.017310546711087227,
+ -0.014740709215402603,
+ -0.023821275681257248,
+ -0.0004094251780770719,
+ 0.047383327037096024,
+ 0.010101976804435253,
+ -0.028759777545928955,
+ -0.02851554937660694,
+ -0.03143460303544998,
+ 0.0016418441664427519,
+ 0.011194761842489243,
+ 0.028942398726940155,
+ 0.014087838120758533,
+ -0.004409576766192913,
+ 0.008270862512290478,
+ 0.016805443912744522,
+ 0.048713646829128265,
+ -0.005199979525059462,
+ 0.032722800970077515,
+ 0.00673002889379859,
+ -0.03229735791683197,
+ -0.012929216958582401,
+ -0.027433091774582863,
+ -0.004712180234491825,
+ 0.022450236603617668,
+ -0.003165115835145116,
+ -0.03336573392152786,
+ -0.058757808059453964,
+ -0.027414631098508835,
+ 0.034962140023708344,
+ -0.0027940974105149508,
+ -0.02475917525589466,
+ -0.05779943987727165,
+ -0.0017543765716254711,
+ -0.0671827644109726,
+ -0.002357102232053876,
+ -0.010187597014009953,
+ -0.047701653093099594,
+ -0.04170113056898117,
+ -0.0092356838285923,
+ -0.04420123249292374,
+ 0.0437852181494236,
+ 0.029815271496772766,
+ -0.002789180725812912,
+ 0.02355458028614521,
+ 0.051283471286296844,
+ 0.04074141010642052,
+ 0.032491933554410934,
+ -0.053161535412073135,
+ -0.024401789531111717,
+ -0.05201321840286255,
+ 0.024659032002091408,
+ -0.03369256481528282,
+ -0.024618642404675484,
+ 0.04569092020392418,
+ 0.06917433440685272,
+ 0.03392364829778671,
+ -0.03662479668855667,
+ 0.014313437975943089,
+ 0.02463654801249504,
+ -0.005492449272423983,
+ 0.06670746207237244,
+ -0.01490107737481594,
+ -0.049329400062561035,
+ 0.026178736239671707,
+ 0.02381458692252636,
+ -0.03966229781508446,
+ -0.018382929265499115,
+ 0.024307290092110634,
+ 0.041408032178878784,
+ -0.009094363078474998,
+ -0.025844082236289978,
+ -0.03326532244682312,
+ -0.021408967673778534,
+ -0.05860837921500206,
+ -0.0439344085752964,
+ -0.04651057720184326,
+ -0.01571473851799965,
+ -0.005192738492041826,
+ 0.016401946544647217,
+ 0.049182675778865814,
+ -0.052121881395578384,
+ 0.03240475803613663,
+ -0.048617951571941376,
+ 0.011147739365696907,
+ 0.011085456237196922,
+ 0.03395605832338333,
+ 0.025573110207915306,
+ -0.01974715106189251,
+ 0.014621623791754246,
+ -0.019314127042889595,
+ 0.014876061119139194,
+ 0.008580133318901062,
+ -0.00367435603402555,
+ -0.004096290562301874,
+ 0.014471524395048618,
+ -0.01708351820707321,
+ 0.026413321495056152,
+ 0.03225378319621086,
+ 0.035934776067733765,
+ 0.022958843037486076,
+ 0.013703086413443089,
+ 0.06521621346473694,
+ -0.0297698937356472,
+ 0.02000812254846096,
+ -0.0008226391510106623,
+ 0.003908093553036451,
+ 0.0008555222884751856,
+ -0.046460963785648346,
+ -0.028069868683815002,
+ -0.038001734763383865,
+ 0.046825215220451355,
+ 0.04039117321372032,
+ -0.012854598462581635,
+ 0.014348309487104416,
+ -0.0557098388671875,
+ -0.019635038450360298,
+ 0.0059766811318695545,
+ -0.03529249504208565,
+ 0.042265575379133224,
+ -0.024782933294773102,
+ -0.02099243924021721,
+ -0.010382494889199734,
+ 0.0008155847317539155,
+ -0.015750901773571968,
+ 0.04613879695534706,
+ 0.05670509114861488,
+ 0.019811131060123444,
+ -0.014413521625101566,
+ -0.007839699275791645,
+ 0.02986174076795578,
+ 0.020518099889159203,
+ 0.022607440128922462,
+ 0.005668793339282274,
+ -0.04442089796066284,
+ 0.01692609116435051,
+ -0.00888009648770094,
+ -0.008809642866253853,
+ 0.001260460470803082,
+ -0.029119964689016342,
+ -0.03616820648312569,
+ 0.0023443587124347687,
+ 0.03419267386198044,
+ 0.029362384229898453,
+ 0.012056457810103893,
+ 0.0004342616884969175,
+ -0.03081686422228813,
+ 0.01558566465973854,
+ 0.04465913027524948,
+ -0.042530033737421036,
+ 0.033380571752786636,
+ -0.023627419024705887,
+ -0.014201677404344082,
+ 0.03085596114397049,
+ 0.004271564539521933,
+ -0.006603648420423269,
+ -0.002139572985470295,
+ 0.01976598985493183,
+ -0.04694287106394768,
+ -0.032385580241680145,
+ -0.03571745753288269,
+ -0.02295122668147087,
+ 0.04189366102218628,
+ -0.04457009211182594,
+ 0.0007453814032487571,
+ 0.05257885158061981,
+ 0.0354873463511467,
+ 0.02205105684697628,
+ 0.02380976639688015,
+ -0.0377565398812294,
+ 0.0459585003554821,
+ 0.0463278591632843,
+ 0.011118506081402302,
+ 0.013739265501499176,
+ -0.0179827231913805,
+ 0.07186006009578705,
+ -0.00013249537732917815,
+ 0.02290297858417034,
+ 0.00035853448207490146,
+ -0.0091592688113451,
+ -0.032927896827459335,
+ -0.000610890390817076,
+ 0.034102242439985275,
+ -0.05449092388153076,
+ -0.010573352687060833,
+ 0.03529929742217064,
+ 0.005320568103343248,
+ -0.09808970242738724,
+ -0.04095776379108429,
+ -0.014364569447934628,
+ -0.04797399789094925,
+ -0.007907026447355747,
+ 0.02809705026447773,
+ -0.026266615837812424,
+ 0.07171791791915894,
+ -0.029328132048249245,
+ 0.004561703186482191,
+ 0.022776788100600243,
+ 0.039424996823072433,
+ -0.03337940573692322,
+ -0.050386082381010056,
+ -0.037282589823007584,
+ -0.019485309720039368,
+ -0.006238619796931744,
+ 0.03852459788322449,
+ 0.00849404837936163,
+ 0.032184477895498276,
+ 0.018180856481194496,
+ -0.026661116629838943,
+ 0.029139017686247826,
+ 0.0012598023749887943,
+ 0.03859098255634308,
+ -0.017786217853426933,
+ 0.03900822252035141,
+ 0.006950655020773411,
+ 0.03132297098636627,
+ -0.025571729987859726,
+ -0.011558987200260162,
+ 0.0527801439166069,
+ 0.0039525399915874004,
+ -0.029001198709011078,
+ 0.03647666424512863,
+ -0.01713770069181919,
+ 0.030697522684931755,
+ 0.0012281271629035473,
+ 0.008203531615436077,
+ 0.06238749623298645,
+ -0.002937023062258959,
+ -0.06927095353603363,
+ -0.05243195965886116,
+ -0.0179146658629179,
+ -0.01722821779549122,
+ 0.04425602778792381,
+ -0.04260602593421936,
+ 0.042360395193099976,
+ 0.015468278899788857,
+ -0.0012054556282237172,
+ -0.02577132359147072,
+ -0.024963393807411194,
+ -0.04132160171866417,
+ -0.07923213392496109,
+ -0.006176193710416555,
+ -0.021413665264844894,
+ 0.031226273626089096,
+ 0.008809169754385948,
+ -0.007640719413757324,
+ 0.029988419264554977,
+ -0.0066343736834824085,
+ -0.05623984336853027,
+ -0.028885280713438988,
+ -0.049676112830638885,
+ 0.021692609414458275,
+ -0.040110934525728226,
+ 0.011844395659863949,
+ -0.007466648239642382,
+ -0.0050537777133286,
+ -0.022125443443655968,
+ 0.0022475828882306814,
+ 0.04025210440158844,
+ 0.0036516855470836163,
+ 0.0022352244704961777,
+ -0.048215243965387344,
+ -0.032870739698410034,
+ -0.010432847775518894,
+ 0.022422030568122864,
+ 0.009009428322315216,
+ 0.06990319490432739,
+ 0.028696350753307343,
+ -0.05756842717528343,
+ -0.03531734645366669,
+ 0.006042206194251776,
+ 0.05465730279684067,
+ 0.014849365688860416,
+ 0.008915653452277184,
+ 0.01446367334574461,
+ -0.0009033837704919279,
+ 0.03306584060192108,
+ -0.0044473339803516865,
+ 0.027121273800730705,
+ -0.005110031459480524,
+ -0.0458553321659565,
+ -0.017538506537675858,
+ 0.010635839775204659,
+ -0.04144034534692764,
+ -0.01229474600404501,
+ 0.04918908700346947,
+ 0.04736895114183426,
+ 0.006839947775006294,
+ 0.032378245145082474,
+ 6.067807771614753e-05,
+ -0.003431307151913643,
+ -0.06133372336626053,
+ 0.027806982398033142,
+ -0.01172563899308443,
+ -0.007622221019119024,
+ -0.01476749312132597,
+ -0.008828245103359222,
+ 0.030535312369465828,
+ 0.02123483084142208,
+ -0.03238919377326965,
+ -0.021147292107343674,
+ -0.037212494760751724,
+ 0.0026219363790005445,
+ 0.037298113107681274,
+ 0.024648457765579224,
+ -0.004797639790922403,
+ 0.013003358617424965,
+ 0.0030771244782954454,
+ -0.0026083351112902164,
+ -0.02310764044523239,
+ -0.03104136697947979,
+ 0.019040178507566452,
+ -0.010478150099515915,
+ -0.0019672387279570103,
+ -0.007625232450664043,
+ -0.052876051515340805,
+ 0.00532271433621645,
+ -0.0598628893494606,
+ 0.043573569506406784,
+ -0.017492596060037613,
+ 0.0009950771927833557,
+ -0.004998842719942331,
+ 0.018061475828289986,
+ -0.016303816810250282,
+ -0.0045980047434568405,
+ 0.014735296368598938,
+ 0.035748425871133804,
+ 0.05305219441652298,
+ -0.005392069928348064,
+ 0.001403982751071453,
+ -0.032632142305374146,
+ -0.04702845215797424,
+ 0.03857297822833061,
+ 0.03493781387805939,
+ 0.03379584476351738,
+ -0.04323748126626015,
+ -0.00666783144697547,
+ 0.04326838254928589,
+ 0.02312149852514267,
+ 0.03363107889890671,
+ 0.004119809716939926,
+ 0.012231471948325634,
+ -0.015575414523482323,
+ -0.023791879415512085,
+ -0.0314212329685688,
+ -0.0171456690877676,
+ -0.004651185590773821,
+ -0.008129807189106941,
+ -0.024488775059580803,
+ -0.04322497546672821,
+ 0.034600675106048584,
+ -0.030667247250676155,
+ 0.024158546701073647,
+ -0.024361753836274147,
+ 0.010586037300527096,
+ -0.04194583371281624,
+ 0.02278420701622963,
+ -0.04298790544271469,
+ -0.028267059475183487,
+ -0.06064184010028839,
+ 0.02064989134669304,
+ -0.021800663322210312,
+ 0.020570974797010422,
+ 0.0016561906086280942,
+ 0.030398307368159294,
+ 0.006557842250913382,
+ 0.05889119580388069,
+ 0.00706073734909296,
+ -0.00010533611930441111,
+ -0.030412273481488228,
+ 0.0013002122286707163,
+ -0.03116532228887081,
+ 0.0054419334046542645,
+ -0.021936802193522453,
+ -0.05430937930941582,
+ 0.02055796980857849,
+ 0.05505607649683952,
+ -0.01830734685063362,
+ 0.05141161382198334,
+ -0.011779985390603542,
+ -0.030543534085154533,
+ -0.012075353413820267,
+ -0.03433366119861603,
+ 0.02698110044002533,
+ -0.027978157624602318,
+ 0.01047437358647585,
+ 0.003948282450437546,
+ -0.04050923511385918,
+ 0.06851420551538467,
+ -0.04194911569356918,
+ -0.016846096143126488,
+ -0.028482375666499138,
+ 0.029673023149371147,
+ 0.015912244096398354,
+ -0.05190900340676308,
+ 0.009337347000837326,
+ -0.012537672184407711,
+ -0.040915340185165405,
+ 0.019085582345724106,
+ 0.0030088608618825674,
+ -0.009210476651787758,
+ 0.05616927146911621,
+ 0.029286082834005356,
+ 0.03875403851270676,
+ 0.03350038826465607,
+ 0.020608263090252876,
+ -0.007846926338970661,
+ 0.0014366351533681154,
+ 0.047816310077905655,
+ 0.006420130841434002,
+ -0.062359925359487534,
+ 0.020122336223721504,
+ -0.057118382304906845,
+ -0.010056383907794952,
+ 0.019956672564148903,
+ -0.04046260938048363,
+ -0.04162763059139252,
+ 0.025593336671590805,
+ 0.08151061832904816,
+ 0.0019590945448726416,
+ 0.01156303659081459,
+ -0.059283919632434845,
+ -0.033462345600128174,
+ 0.016433048993349075,
+ -0.025035403668880463,
+ 0.003836747258901596,
+ 0.057120151817798615,
+ -0.03242708742618561,
+ 0.013453902676701546,
+ -0.004004625137895346,
+ -0.02481270581483841,
+ 0.05744101479649544,
+ -0.01886606588959694,
+ -0.0007557308999821544,
+ -0.038494765758514404,
+ 0.06129954755306244,
+ -0.0050747571513056755,
+ -0.017450040206313133,
+ -0.045534294098615646,
+ 0.061794962733983994,
+ 0.03601701557636261,
+ 0.018224941566586494,
+ 0.053344499319791794,
+ 0.017848139628767967,
+ 0.0001505902037024498,
+ -0.007359472569078207,
+ -0.023337602615356445,
+ 0.001258181408047676,
+ 0.002949783345684409,
+ 0.004428207408636808,
+ -0.022138407453894615,
+ 0.02212429977953434,
+ 0.008077124133706093,
+ 0.05772955343127251,
+ -0.03803091123700142,
+ -0.032408326864242554,
+ -0.004475908819586039,
+ 0.041698191314935684,
+ -0.021756673231720924,
+ 0.022823533043265343,
+ 0.004087194800376892,
+ 0.028958801180124283,
+ -0.03327853977680206,
+ -0.03808353468775749,
+ -0.017929354682564735,
+ 0.04202413186430931,
+ 0.007330142427235842,
+ 0.022718079388141632,
+ 0.023710519075393677,
+ -0.009666967205703259,
+ -0.03314519673585892,
+ -0.023800333961844444,
+ -0.03574242442846298,
+ 0.024494411423802376,
+ 0.012968664057552814,
+ -0.0390293262898922,
+ 0.010511009953916073,
+ -0.03167842701077461,
+ -0.07797947525978088,
+ -0.0342385396361351,
+ -0.0553409568965435,
+ 0.033020101487636566,
+ -0.09054213017225266,
+ 0.02569672092795372,
+ -0.01569107174873352,
+ -0.01199417281895876,
+ -0.005673377774655819,
+ 0.014913939870893955,
+ 0.029258007183670998,
+ -0.00753216864541173,
+ 0.013149961829185486,
+ 0.05191836878657341,
+ 0.0042383610270917416,
+ 0.008096515201032162,
+ -0.038741182535886765,
+ 0.0331500805914402,
+ 0.016691861674189568,
+ -0.03147745877504349,
+ 0.037266071885824203,
+ -0.008077157661318779,
+ -0.02886807918548584,
+ 0.014878920279443264,
+ -0.0017153697554022074,
+ 0.017698056995868683,
+ 0.06776849925518036,
+ -0.06467972695827484,
+ 0.01614784076809883,
+ -0.033913567662239075,
+ 0.0215739868581295,
+ -0.0026350656989961863,
+ 0.003704441711306572,
+ 0.007111765444278717,
+ -0.00303183333016932,
+ -0.032088201493024826,
+ -0.003551324363797903,
+ -0.01771557703614235,
+ 0.043379172682762146,
+ 0.006505212746560574,
+ -0.00844134483486414,
+ -0.03709029033780098,
+ 0.020397400483489037,
+ -0.02704450860619545,
+ 0.03533422574400902,
+ -0.04944666847586632,
+ -0.029238261282444,
+ 0.003164628753438592,
+ 0.036873091012239456,
+ -0.0315898060798645,
+ -0.02425331622362137,
+ -0.05883152410387993,
+ 0.027223387733101845,
+ -0.003916183020919561,
+ 0.01885443739593029,
+ 0.0335865244269371,
+ 0.009334318339824677,
+ -0.03241850435733795,
+ -0.03208073973655701,
+ 0.02611185424029827,
+ 0.05084682255983353,
+ 0.019015729427337646,
+ -0.03919297829270363,
+ 0.04399852082133293,
+ -0.03311019018292427,
+ 0.0022331897635012865,
+ 0.035471104085445404,
+ 0.04641221463680267,
+ -0.05580241605639458,
+ 0.008512181229889393,
+ 0.03548000752925873,
+ 0.023324059322476387,
+ -0.03514016792178154,
+ -0.013725249096751213,
+ 0.02385660633444786,
+ -0.020036321133375168,
+ 0.04976664483547211,
+ 0.0035487262066453695,
+ 0.011789961718022823,
+ -0.008637120015919209,
+ -0.009199428372085094,
+ 0.04130815342068672,
+ -0.036640189588069916,
+ -0.03239263594150543,
+ -0.026432810351252556,
+ -0.006682074163109064,
+ 0.04210711643099785,
+ 0.033929213881492615,
+ 0.008519697934389114,
+ 0.02833126112818718,
+ -0.04067942872643471,
+ 0.04489849507808685,
+ -0.06367972493171692,
+ 0.001243593986146152,
+ -0.04347897320985794,
+ -0.0523432232439518,
+ 0.017217092216014862,
+ -0.053224921226501465,
+ -0.04092680290341377,
+ 0.02605060674250126,
+ -0.022016167640686035,
+ 0.00676574744284153,
+ 0.03182785585522652,
+ 0.03146110102534294,
+ 0.04590890184044838,
+ 0.02208532765507698,
+ 0.029535792768001556,
+ 0.00031919413595460355,
+ 0.05785669758915901,
+ 0.027370989322662354,
+ 0.0023547178134322166,
+ 0.001040703966282308,
+ 0.03544384613633156,
+ 0.11410204321146011,
+ -0.026201456785202026,
+ 0.022576341405510902,
+ -0.04158997908234596,
+ 0.03411998972296715,
+ 0.023970099166035652,
+ 0.010068339295685291,
+ 0.043779339641332626,
+ -0.013790009543299675,
+ 0.030495014041662216,
+ 0.07771947979927063,
+ 0.03009640797972679,
+ 0.0520394966006279,
+ 0.02392892725765705,
+ -0.013205157592892647,
+ 0.07328779995441437,
+ 0.009203932248055935,
+ -0.021261876448988914,
+ -0.045727476477622986,
+ -0.0452759750187397,
+ 0.007504564709961414,
+ -0.028733838349580765,
+ -0.03819974139332771,
+ 0.02999148890376091,
+ 0.053175076842308044,
+ -0.002468409249559045,
+ -0.0011144186137244105,
+ -0.04384322836995125,
+ 0.007292800582945347,
+ 0.04640546068549156,
+ -0.0006050472729839385,
+ 0.03707968816161156,
+ -0.024604469537734985,
+ 0.01286349631845951,
+ 0.002255768980830908,
+ -0.021339176222682,
+ -0.02353413589298725,
+ 0.04877869412302971,
+ 0.0128135085105896,
+ -0.03044341504573822,
+ 0.005113096442073584,
+ 0.06107461825013161,
+ -0.023281438276171684,
+ -0.01763656735420227,
+ 0.057504408061504364,
+ -0.022684497758746147,
+ -0.011720015667378902,
+ -0.037978533655405045,
+ 0.014299191534519196,
+ 0.031021494418382645,
+ 0.030238814651966095,
+ -0.00807925220578909,
+ -0.025861039757728577,
+ 0.037680018693208694,
+ -0.020949801430106163,
+ 0.0023294035345315933,
+ 0.02173573523759842,
+ 0.01484831515699625,
+ -0.015663156285881996,
+ -0.024155382066965103,
+ -0.01711704581975937,
+ 0.01669478975236416,
+ 0.02019156515598297,
+ 0.04578804969787598,
+ -0.06133054196834564,
+ -0.04154035076498985,
+ 0.017646195366978645,
+ 0.02889319136738777,
+ 0.064301498234272,
+ -0.00846303254365921,
+ 0.0017431770684197545,
+ -0.028911447152495384,
+ -0.02431955374777317,
+ 0.038754452019929886,
+ -0.019121285527944565,
+ -0.01641024835407734,
+ 0.006123658735305071,
+ -0.016435762867331505,
+ -0.022731643170118332,
+ -0.012779094278812408,
+ -0.015839414671063423,
+ 0.03160201385617256,
+ -0.04906240105628967,
+ -0.018022719770669937,
+ 0.02697644755244255,
+ -0.02004730887711048,
+ -0.015311839990317822,
+ 0.06514764577150345,
+ -0.007738862186670303,
+ -0.026927031576633453,
+ -0.03935766592621803,
+ -0.004564312286674976,
+ -0.0036754400935024023,
+ 0.023532239720225334,
+ -0.016799388453364372,
+ 0.031074589118361473,
+ 0.0014524378348141909,
+ 0.017213059589266777,
+ 0.022069070488214493,
+ 0.06617451459169388,
+ 0.03772517293691635,
+ 0.054437924176454544,
+ 0.007883294485509396,
+ 0.005764939822256565,
+ -0.008112912997603416,
+ -0.02522236481308937,
+ -0.007997695356607437,
+ 0.04329180717468262,
+ 0.024528658017516136,
+ -0.015382407233119011,
+ 0.058769598603248596,
+ 0.03554869443178177,
+ 0.008989907801151276,
+ 0.014672795310616493,
+ -0.019346656277775764,
+ 0.02419791743159294,
+ 0.021876346319913864,
+ -0.04286644235253334,
+ -0.00045851682079955935,
+ 0.03744935989379883,
+ -0.010030635632574558,
+ 0.02519940957427025,
+ 0.050563354045152664,
+ -0.005328023340553045,
+ -0.010997203178703785,
+ 0.04129459708929062,
+ 0.0002535519888624549,
+ 0.006067077629268169,
+ -0.01001364178955555,
+ -0.010569188743829727,
+ 0.02697043865919113,
+ -0.026580439880490303,
+ -0.01055336743593216,
+ -0.00402513612061739,
+ -0.019393164664506912,
+ 0.017061308026313782,
+ 0.031957320868968964,
+ 0.009320235811173916,
+ -0.003750438569113612,
+ 0.009954956360161304,
+ -0.07248415797948837,
+ -0.020727455615997314,
+ -0.011199741624295712,
+ -0.06415431201457977,
+ 0.028754308819770813,
+ 0.007691392209380865,
+ -0.008669190108776093,
+ 0.021664878353476524,
+ 0.05744139477610588,
+ 0.037201449275016785,
+ 0.004439694341272116,
+ -0.0319041907787323,
+ 0.022104104980826378,
+ 0.02286595106124878,
+ 0.028083911165595055,
+ 0.04512853920459747,
+ 0.043435417115688324,
+ -0.03328544273972511,
+ -0.005162408109754324,
+ 0.034868527203798294,
+ 0.015159089118242264,
+ 0.03192891180515289,
+ -0.0334014818072319,
+ 0.005695881322026253,
+ -0.06039663031697273,
+ -0.031023463234305382,
+ -0.05848164111375809,
+ -0.01880529336631298,
+ -0.017123466357588768,
+ 0.006761240307241678,
+ 0.012383400462567806,
+ 0.011285466141998768,
+ -0.011598194018006325,
+ -0.03216534107923508,
+ 0.054303426295518875,
+ 0.0074540432542562485,
+ 0.018232665956020355,
+ -0.016350630670785904,
+ 0.008706705644726753,
+ 0.045764435082674026,
+ 0.0029185914900153875,
+ 0.017044663429260254,
+ -0.027968578040599823,
+ -0.033459365367889404,
+ 0.01686898246407509,
+ 0.005717776715755463,
+ -0.04038647189736366,
+ 0.04547777399420738,
+ 0.04492352530360222,
+ -0.0685197040438652,
+ 0.02883242256939411,
+ 0.028165973722934723,
+ -0.0006309240125119686,
+ -0.007187739014625549,
+ -0.008368073031306267,
+ -0.013276305049657822,
+ 0.0441998615860939,
+ 0.0046354299411177635,
+ 0.023039158433675766,
+ -0.005450943484902382,
+ 0.04208488017320633,
+ 0.005795630626380444,
+ -0.04489350691437721,
+ 0.03062012419104576,
+ -0.06853915750980377,
+ -0.03235572949051857,
+ -0.03856607899069786,
+ 0.0294349268078804,
+ 0.007543177809566259,
+ -0.003559856442734599,
+ -0.03999133035540581,
+ -0.0384041965007782,
+ 0.0330340676009655,
+ 0.009723738767206669,
+ 0.026248931884765625,
+ 0.0242668017745018,
+ -0.03843033313751221,
+ -0.015891369432210922,
+ 0.020287398248910904,
+ -0.02381136827170849,
+ 0.003882964374497533,
+ 0.026174303144216537,
+ -0.016631826758384705,
+ -0.006631581112742424,
+ -0.03178365156054497,
+ 0.005773214157670736,
+ -0.016373341903090477,
+ 0.015752151608467102,
+ -0.021950598806142807,
+ -0.06372575461864471,
+ 0.0443708673119545,
+ 0.0076531716622412205,
+ 0.0027882843278348446,
+ 0.002942801918834448,
+ -0.007588678039610386,
+ -0.009725849144160748,
+ 0.013154554180800915,
+ 0.029598500579595566,
+ 0.003859188873320818,
+ -0.029648074880242348,
+ 0.0074157980270683765,
+ -0.012972848489880562,
+ 0.00390962790697813,
+ -0.022535989060997963,
+ -0.0009541382314637303,
+ 0.04376484826207161,
+ -0.028996605426073074,
+ 0.01248913910239935,
+ -0.03789408504962921,
+ 0.019337233155965805,
+ -0.005929015576839447,
+ 0.03726016357541084,
+ 0.015548917464911938,
+ -0.005774159450083971,
+ 0.022103413939476013,
+ 0.029327014461159706,
+ 0.04576429724693298,
+ -0.02320915274322033,
+ 0.00788149330765009,
+ -0.012689854949712753,
+ -0.027374636381864548,
+ -0.01907808519899845,
+ 0.042502060532569885,
+ 0.04442039877176285,
+ -0.041420359164476395,
+ -0.05610739812254906,
+ 0.002283720765262842,
+ 0.018263347446918488,
+ 0.03839221969246864,
+ 0.060745324939489365,
+ -0.011288109235465527,
+ -0.0013861670158803463,
+ -0.016067715361714363,
+ -0.0009007453918457031,
+ -0.03457871824502945,
+ -0.04601020738482475,
+ 0.018110031262040138,
+ 0.03466775268316269,
+ 0.048170994967222214,
+ -0.035609662532806396,
+ -0.004264083690941334,
+ 0.01933431252837181,
+ 0.01571987383067608,
+ -0.014360535889863968,
+ -0.009436285123229027,
+ -0.008861325681209564,
+ 0.01015892717987299,
+ 0.018706342205405235,
+ 0.009875197894871235,
+ 0.03322765603661537,
+ 0.04692114517092705,
+ -0.01887691393494606,
+ -0.008923768065869808,
+ -0.0392431765794754,
+ 0.005662352778017521,
+ 0.003248700173571706,
+ -0.037372954189777374,
+ 0.03912824019789696,
+ 0.018520327284932137,
+ 0.022953281179070473,
+ -0.032433588057756424,
+ 0.0308588445186615,
+ 0.0006291419849731028,
+ -0.028045400977134705,
+ -0.05876077711582184,
+ -0.008113686926662922,
+ -0.040062952786684036,
+ 0.008291106671094894,
+ -0.010230077430605888,
+ -0.016534162685275078,
+ 0.0023705908097326756,
+ -0.013397962786257267,
+ -0.017644912004470825,
+ -0.001764944288879633,
+ 0.013031723909080029,
+ 0.06555774062871933,
+ 0.04313308745622635,
+ -0.0293597299605608,
+ -0.007472180295735598,
+ 0.007196046877652407,
+ 0.041742049157619476,
+ 0.05605337396264076,
+ 0.01603379100561142,
+ -0.007084338925778866,
+ 0.012118102982640266,
+ -0.03077852353453636,
+ -0.01164204441010952,
+ -0.02314941957592964,
+ -0.018340501934289932,
+ -0.04480117931962013,
+ -0.019550466910004616,
+ -0.0023087237495929003,
+ -0.04980211332440376,
+ -0.018209096044301987,
+ -0.017975781112909317,
+ -0.01747836172580719,
+ 0.037222083657979965,
+ 0.04630669578909874,
+ -0.005375471897423267,
+ 0.017032071948051453,
+ 0.04282734543085098,
+ 0.007718739099800587,
+ -0.010584663599729538,
+ -0.043478988111019135,
+ -0.04066215828061104,
+ -0.03985553979873657,
+ 0.0019663083367049694,
+ 0.00878046452999115,
+ -0.028067614883184433,
+ -0.00883103534579277,
+ 0.013573084026575089,
+ 0.018506880849599838,
+ 0.05580493062734604,
+ 0.010677562095224857,
+ -0.03495151922106743,
+ 0.017835598438978195,
+ -0.03960588946938515,
+ 0.03548913449048996,
+ 0.019670376554131508
+ ],
+ "text": "Healthy Eating for a Balanced Life This article discusses how a well-balanced diet can lead to better health outcomes. It covers the importance of fruits, vegetables, lean proteins, and whole grains."
+}
diff --git a/oak-search-elastic/src/test/resources/inferenceUsingConfig/content/ml.json b/oak-search-elastic/src/test/resources/inferenceUsingConfig/content/ml.json
new file mode 100644
index 0000000000..54b477dc34
--- /dev/null
+++ b/oak-search-elastic/src/test/resources/inferenceUsingConfig/content/ml.json
@@ -0,0 +1,1029 @@
+{
+ "embedding": [
+ 0.0056596845388412476,
+ -0.06818515807390213,
+ 0.0010020594345405698,
+ -0.005115454085171223,
+ -0.04546260088682175,
+ 0.041559476405382156,
+ -0.04110696539282799,
+ -0.01940556988120079,
+ -0.02303077094256878,
+ 0.006174431182444096,
+ 0.03753180056810379,
+ -0.04796793684363365,
+ 0.032520223408937454,
+ 0.034933414310216904,
+ 0.030039116740226746,
+ 0.03754087910056114,
+ -0.03703702613711357,
+ -0.0005066744633950293,
+ 0.02819022350013256,
+ -0.030268529430031776,
+ 0.029386956244707108,
+ -0.04812484607100487,
+ -0.020895015448331833,
+ 0.03949001431465149,
+ -0.028659075498580933,
+ 0.002349924063310027,
+ -0.032611653208732605,
+ -0.015301074832677841,
+ -0.03354152664542198,
+ 0.012320322915911674,
+ 0.00172754330560565,
+ 0.008336867205798626,
+ 0.005527120549231768,
+ -0.03430454805493355,
+ 0.05003385990858078,
+ -0.00641896016895771,
+ -0.04473878815770149,
+ -0.05109824985265732,
+ 0.043644193559885025,
+ 0.01144089549779892,
+ 0.01739501766860485,
+ 0.029915498569607735,
+ -0.023630701005458832,
+ 0.015326932072639465,
+ 0.017412681132555008,
+ 0.04619144648313522,
+ -0.01399496290832758,
+ -0.0085881557315588,
+ -0.03798869624733925,
+ -0.01813056319952011,
+ 0.03274545073509216,
+ -0.05083398520946503,
+ 0.04463663324713707,
+ 0.028987865895032883,
+ -0.031744878739118576,
+ 0.01782466284930706,
+ -0.0012675997568294406,
+ 0.026197930797934532,
+ -0.021833673119544983,
+ -0.009359977208077908,
+ 0.05190044268965721,
+ -0.0015670254360884428,
+ 0.021439628675580025,
+ -0.028510918840765953,
+ 0.02855878509581089,
+ -0.039708368480205536,
+ 0.058293428272008896,
+ 0.02273436449468136,
+ 0.04848560318350792,
+ -0.0017193021485581994,
+ -0.022725898772478104,
+ -0.060183726251125336,
+ 0.018714070320129395,
+ 0.03719637170433998,
+ 0.020438866689801216,
+ -0.039952147752046585,
+ -0.03603968396782875,
+ 0.01328373234719038,
+ 0.017365792766213417,
+ 0.010721252299845219,
+ -0.001901918789371848,
+ -0.014678191393613815,
+ -0.02437576651573181,
+ -0.03666581213474274,
+ 0.002293751575052738,
+ 0.011557229794561863,
+ 0.019934605807065964,
+ 0.012251620180904865,
+ 0.027761878445744514,
+ 0.009468873962759972,
+ 0.032049939036369324,
+ 0.013388226740062237,
+ 0.003565815044566989,
+ 0.017348123714327812,
+ -0.05522727221250534,
+ 0.0022116084583103657,
+ 0.0030111426021903753,
+ 0.0025651222094893456,
+ 0.03306146711111069,
+ -0.02612454630434513,
+ -0.02607746608555317,
+ -0.02852015011012554,
+ 0.002630053088068962,
+ 0.03315083310008049,
+ -0.03864319995045662,
+ -0.04600037261843681,
+ -0.028368914499878883,
+ 0.0361613854765892,
+ -0.03850516676902771,
+ -0.011721690185368061,
+ -0.017290856689214706,
+ -0.022230347618460655,
+ -0.00020745201618410647,
+ -0.02381964959204197,
+ 0.0029082708060741425,
+ 0.0692921057343483,
+ 0.022987106814980507,
+ -0.011528615839779377,
+ 0.0023475263733416796,
+ 0.05132518708705902,
+ 0.052598580718040466,
+ 0.01022594515234232,
+ -0.032380592077970505,
+ 0.008778599090874195,
+ -0.03141350671648979,
+ 0.06883230060338974,
+ -0.01967557892203331,
+ -0.03652915358543396,
+ 0.028001509606838226,
+ 0.02721385844051838,
+ 0.008046287111938,
+ -0.022964289411902428,
+ -0.04139535501599312,
+ 0.023260531947016716,
+ -0.001710217446088791,
+ 0.07652627676725388,
+ -0.02393105998635292,
+ -0.030038844794034958,
+ 0.008248068392276764,
+ 0.017396919429302216,
+ -0.02151999995112419,
+ 0.0002917184610851109,
+ 0.028311721980571747,
+ 0.040621545165777206,
+ 0.011186342686414719,
+ -0.05458955839276314,
+ 0.007052929140627384,
+ -0.030992882326245308,
+ -0.07787074893712997,
+ -0.02837131917476654,
+ -0.03676769882440567,
+ 0.01686716079711914,
+ -0.04496267810463905,
+ 0.004153323359787464,
+ 0.01873626373708248,
+ -0.06268429011106491,
+ 0.00713273324072361,
+ -0.010338585823774338,
+ 0.011668095365166664,
+ 0.014666331000626087,
+ 0.010213502682745457,
+ 0.03948565199971199,
+ -4.713632506536669e-07,
+ 0.007820071652531624,
+ 0.01772437058389187,
+ -0.00847652181982994,
+ 0.03616131469607353,
+ -0.0005023147678002715,
+ 0.04365924745798111,
+ 0.04151131957769394,
+ -0.032108597457408905,
+ 0.00283625815063715,
+ 0.01841117814183235,
+ 0.02680111490190029,
+ 0.04126165434718132,
+ -0.005960948299616575,
+ 0.03386259078979492,
+ -0.03623616322875023,
+ 0.024115540087223053,
+ 0.00832453928887844,
+ 0.009542162530124187,
+ -0.00021422241115942597,
+ -0.044805485755205154,
+ -0.02363571524620056,
+ -0.023447319865226746,
+ 0.039013609290122986,
+ 0.04272520914673805,
+ -0.02093241736292839,
+ -0.019170070067048073,
+ -0.03353598341345787,
+ -0.004293620120733976,
+ 0.00040914214332588017,
+ -0.05855359137058258,
+ 0.00484942551702261,
+ -0.019672291353344917,
+ -0.00947478786110878,
+ -0.04011203721165657,
+ -0.04987923055887222,
+ -0.022394120693206787,
+ -0.0005843206308782101,
+ 0.03338736668229103,
+ 0.0067399186082184315,
+ -0.025005921721458435,
+ -0.022012984380126,
+ -0.020923562347888947,
+ 0.02134845033288002,
+ 0.004175734240561724,
+ 0.0230952687561512,
+ -0.04439200833439827,
+ 0.011154902167618275,
+ 0.004853664897382259,
+ 0.024175381287932396,
+ 0.02590128593146801,
+ -0.03372545167803764,
+ -0.018582789227366447,
+ 0.03595632314682007,
+ 0.0269862562417984,
+ 0.015065384097397327,
+ 0.004711491987109184,
+ 0.03215494379401207,
+ -0.028201090171933174,
+ -0.00011093567445641384,
+ 0.057730261236429214,
+ 0.005453417543321848,
+ 0.013066316023468971,
+ 0.006060248706489801,
+ -0.053004611283540726,
+ 0.04722315073013306,
+ 0.02689988538622856,
+ 0.00785299576818943,
+ 0.024812573567032814,
+ 0.007903622463345528,
+ -0.031092623248696327,
+ -0.012660304084420204,
+ -0.02148270048201084,
+ 0.021992169320583344,
+ 0.03547290340065956,
+ 0.011881889775395393,
+ -0.002392736729234457,
+ 0.037012018263339996,
+ 0.002225043484941125,
+ 0.03669510781764984,
+ 0.03092535212635994,
+ -0.032413993030786514,
+ 0.020867900922894478,
+ 0.009522371925413609,
+ 0.030460085719823837,
+ 0.020975101739168167,
+ 0.009152155369520187,
+ 0.05140575021505356,
+ 0.00485461950302124,
+ 0.00997081771492958,
+ -0.031808290630578995,
+ -0.025975357741117477,
+ -0.01887347735464573,
+ 0.009000007063150406,
+ 0.04137810319662094,
+ -0.032878030091524124,
+ -0.03399885445833206,
+ 0.043557923287153244,
+ -0.0025626947171986103,
+ -0.06744202971458435,
+ -0.03479336202144623,
+ -0.036750391125679016,
+ -0.045512061566114426,
+ -0.013813578523695469,
+ 0.017681660130620003,
+ -0.02781902626156807,
+ 0.07428102195262909,
+ -0.05984751135110855,
+ 0.03396744653582573,
+ 0.049012672156095505,
+ 0.020539505407214165,
+ -0.05391322821378708,
+ -0.02032947726547718,
+ -0.001458425889723003,
+ -0.032954178750514984,
+ -0.014384178444743156,
+ 0.01591094769537449,
+ 0.01635158434510231,
+ 0.031314704567193985,
+ 0.015678521245718002,
+ 0.025079090148210526,
+ 0.013130150735378265,
+ 0.016438649967312813,
+ 0.013513733632862568,
+ -0.019367815926671028,
+ 0.006321837194263935,
+ 0.04158604145050049,
+ 0.025880547240376472,
+ -0.03260686621069908,
+ -0.013840358704328537,
+ 0.04571728780865669,
+ -0.00527803972363472,
+ -0.03153349086642265,
+ 0.00385074969381094,
+ -0.031916890293359756,
+ 0.04964955896139145,
+ 0.01590566523373127,
+ -0.0021616958547383547,
+ 0.04884559288620949,
+ 0.005307225976139307,
+ -0.07657820731401443,
+ -0.05332785099744797,
+ -0.01465682964771986,
+ -0.03903584182262421,
+ 0.024506419897079468,
+ -0.0502278208732605,
+ 0.0021144289057701826,
+ 0.017860129475593567,
+ 0.000547724892385304,
+ -0.04226221889257431,
+ -0.02986643649637699,
+ -0.027237698435783386,
+ -0.07190912216901779,
+ -0.013645912520587444,
+ -0.05310867354273796,
+ -0.0077867694199085236,
+ 0.03746020048856735,
+ 0.0002461675612721592,
+ 0.03141772001981735,
+ 0.01668182946741581,
+ -0.0385446734726429,
+ -0.03145023062825203,
+ -0.010994158685207367,
+ 0.0022019746247678995,
+ -0.012140864506363869,
+ 0.02354501001536846,
+ -0.005772960372269154,
+ -0.018683871254324913,
+ -0.025732725858688354,
+ -0.004478104878216982,
+ 0.029249250888824463,
+ 0.035582784563302994,
+ 0.0010234122164547443,
+ -0.012898496352136135,
+ -0.0019590796437114477,
+ -0.026100337505340576,
+ -0.0042884028516709805,
+ 0.04481472447514534,
+ 0.04936935380101204,
+ 0.01726156286895275,
+ -0.021415848284959793,
+ -0.020129481330513954,
+ 0.02314516343176365,
+ 0.08571765571832657,
+ 0.04450712725520134,
+ -0.008498620241880417,
+ 0.01627545803785324,
+ 0.017984664067626,
+ 0.02504136972129345,
+ 0.013556663878262043,
+ 0.026547996327280998,
+ -0.03959733620285988,
+ -0.00600566016510129,
+ -0.01661451905965805,
+ 0.01779765449464321,
+ -0.033575594425201416,
+ 0.02470010332763195,
+ 0.061073608696460724,
+ 0.04797918349504471,
+ -0.01924506016075611,
+ 0.03714257478713989,
+ -0.007096515968441963,
+ 0.004546096548438072,
+ -0.04077443480491638,
+ 0.020544780418276787,
+ -0.004836312495172024,
+ 0.020664917305111885,
+ 0.01419390644878149,
+ -0.015880832448601723,
+ 0.026407042518258095,
+ 0.04133869335055351,
+ -0.03378730267286301,
+ -0.04493291676044464,
+ -0.04409182444214821,
+ 0.027797052636742592,
+ 0.0628405287861824,
+ 0.020674314349889755,
+ -0.01880468986928463,
+ 0.015746403485536575,
+ 0.032207369804382324,
+ 0.02544408291578293,
+ -0.02550582028925419,
+ -0.08245082199573517,
+ 0.013331536203622818,
+ 0.007326412945985794,
+ -0.047199130058288574,
+ -0.0011253523407503963,
+ -0.05740173161029816,
+ -0.020708080381155014,
+ -0.05770152807235718,
+ 0.04832562059164047,
+ -0.018909668549895287,
+ -0.016345685347914696,
+ -0.014476385898888111,
+ 0.03235294669866562,
+ -0.053532592952251434,
+ 0.017859656363725662,
+ 0.04368329793214798,
+ 0.0367574580013752,
+ 0.06626962870359421,
+ 0.014665414579212666,
+ 0.011874080635607243,
+ -0.07168039679527283,
+ -0.015022004954516888,
+ 0.05229751765727997,
+ 0.024240102618932724,
+ -0.0022054100409150124,
+ -0.03062092885375023,
+ 0.0030797594226896763,
+ 0.03862561285495758,
+ 0.031423188745975494,
+ -0.0020004899706691504,
+ -0.00277376314625144,
+ 0.027415167540311813,
+ -0.0012619473272934556,
+ -0.017601706087589264,
+ -0.034786760807037354,
+ -0.028148770332336426,
+ -0.035362035036087036,
+ -0.01994389481842518,
+ -0.012440103106200695,
+ -0.02514428086578846,
+ 0.046735480427742004,
+ -0.018018001690506935,
+ 0.00875499565154314,
+ -0.019892197102308273,
+ -0.019561106339097023,
+ -0.061252593994140625,
+ 0.04966167360544205,
+ -0.0823710486292839,
+ -0.021052544936537743,
+ -0.028675101697444916,
+ 0.02632349543273449,
+ -0.01819295808672905,
+ 0.013400988653302193,
+ 0.009165105409920216,
+ 0.031868577003479004,
+ 0.005873958580195904,
+ 0.042560845613479614,
+ 0.019705981016159058,
+ -0.011492976918816566,
+ -0.04706427827477455,
+ 0.01431281864643097,
+ 0.01466378290206194,
+ -0.003729805815964937,
+ -0.0299591813236475,
+ -0.05799433961510658,
+ 0.03988088294863701,
+ 0.05784396827220917,
+ 0.000438397575635463,
+ 0.04950603470206261,
+ -0.030592801049351692,
+ -0.04156235605478287,
+ -0.03330765664577484,
+ -0.02642485871911049,
+ 0.048390623182058334,
+ -0.011870303191244602,
+ 0.0319238118827343,
+ 0.0013338529970496893,
+ -0.02200772985816002,
+ 0.017717259004712105,
+ -0.015158592723309994,
+ -0.008150584064424038,
+ -0.01823236420750618,
+ 0.024179911240935326,
+ 0.02883671410381794,
+ -0.0321827232837677,
+ -0.022159332409501076,
+ -0.013702522963285446,
+ -0.0358637236058712,
+ 0.039340876042842865,
+ -0.008812319487333298,
+ -0.0405539833009243,
+ 0.0007604739512316883,
+ 0.001228404464200139,
+ 0.05553700774908066,
+ 0.02632911689579487,
+ 0.03494129329919815,
+ -0.031744860112667084,
+ -0.0034424501936882734,
+ 0.048096369951963425,
+ 0.017826426774263382,
+ -0.05101527273654938,
+ -0.0006513609550893307,
+ -0.044014330953359604,
+ -0.051362164318561554,
+ 0.029336506500840187,
+ -0.01653548702597618,
+ -0.050632648169994354,
+ 0.05554715543985367,
+ 0.07362282276153564,
+ -0.011678832583129406,
+ 0.011453865095973015,
+ -0.03923485800623894,
+ -0.04209784418344498,
+ 0.017071770504117012,
+ -0.011740479618310928,
+ -0.00035141129046678543,
+ 0.04317062348127365,
+ -0.015359213575720787,
+ 0.026566965505480766,
+ -0.0024152256082743406,
+ -0.014143921434879303,
+ 0.0612487867474556,
+ -0.0314440056681633,
+ 0.005450459197163582,
+ 0.00272478093393147,
+ 0.032248180359601974,
+ -0.02612413838505745,
+ -0.018822556361556053,
+ -0.04571383446455002,
+ 0.0275583378970623,
+ 0.04540858417749405,
+ 0.013253757730126381,
+ 0.07354358583688736,
+ -0.0035513010807335377,
+ 0.020813804119825363,
+ 0.006439531687647104,
+ -0.0005514149670489132,
+ -0.012543309479951859,
+ 0.07056356221437454,
+ -0.04128348082304001,
+ -0.042349182069301605,
+ 0.0237232968211174,
+ 0.007227806374430656,
+ 0.028898658230900764,
+ 0.011599335819482803,
+ -0.03202822431921959,
+ -0.00038642965955659747,
+ 0.048009131103754044,
+ -0.01662733405828476,
+ 0.048182353377342224,
+ -0.0026663418393582106,
+ 0.047521572560071945,
+ -0.053773775696754456,
+ 0.0021594297140836716,
+ 0.006697133183479309,
+ 0.0027857893146574497,
+ 0.007046199403703213,
+ 0.015157192014157772,
+ 0.02006448060274124,
+ -0.015695970505475998,
+ -0.018389692530035973,
+ -0.03053336590528488,
+ -0.015158422291278839,
+ 0.023187793791294098,
+ -0.015148501843214035,
+ -0.03690555319190025,
+ 0.006052148062735796,
+ -0.011919207870960236,
+ -0.06114451587200165,
+ -0.013062571175396442,
+ -0.042143139988183975,
+ 0.053236763924360275,
+ -0.04109629988670349,
+ -0.007455023471266031,
+ 0.000978015479631722,
+ 0.009131154976785183,
+ 0.01019416842609644,
+ 0.041458334773778915,
+ 0.06227992847561836,
+ 0.003992931451648474,
+ 0.00014076221850700676,
+ 0.05085601657629013,
+ 0.009960131719708443,
+ 0.0020930778700858355,
+ -0.03308175876736641,
+ 0.02025238610804081,
+ 0.01655716449022293,
+ -0.03840513154864311,
+ 0.05733869969844818,
+ 0.02686360850930214,
+ -0.057344984263181686,
+ 0.02699076570570469,
+ 0.0280595775693655,
+ 0.027508236467838287,
+ 0.029144341126084328,
+ -0.06216558441519737,
+ -0.020571868866682053,
+ -0.040026262402534485,
+ 0.035283684730529785,
+ -0.013135025277733803,
+ -0.049092426896095276,
+ 0.02137172780930996,
+ 0.005547649692744017,
+ -0.002459745854139328,
+ 0.009965323843061924,
+ 0.029297953471541405,
+ 0.03728645667433739,
+ 0.02503237873315811,
+ -0.011350003071129322,
+ -0.025520281866192818,
+ 0.027038699015975,
+ 0.00021715601906180382,
+ 0.018200179561972618,
+ -0.054106589406728745,
+ 0.011682522483170033,
+ -0.0026428031269460917,
+ 0.002705299761146307,
+ -0.04202483594417572,
+ 0.025305815041065216,
+ -0.060791101306676865,
+ 0.011893877759575844,
+ 0.020304284989833832,
+ 0.04404211789369583,
+ 0.02438039891421795,
+ 0.04824851453304291,
+ 0.02930094301700592,
+ -0.03429395705461502,
+ 0.00950280949473381,
+ 0.03639398142695427,
+ 0.004397678188979626,
+ -0.009835457429289818,
+ 0.030487488955259323,
+ -0.024017084389925003,
+ 0.010701964609324932,
+ 0.02768135629594326,
+ 0.022713541984558105,
+ -0.04573742672801018,
+ 0.0005259062745608389,
+ 0.016803449019789696,
+ 0.042280614376068115,
+ 0.01976701058447361,
+ -0.05180608853697777,
+ 0.04545257240533829,
+ 0.004989023320376873,
+ 0.05341427028179169,
+ 0.002561011351644993,
+ 0.024246620014309883,
+ -0.02070324681699276,
+ -0.030995113775134087,
+ 0.0318680964410305,
+ 0.008656167425215244,
+ -0.038912124931812286,
+ -0.0009301342652179301,
+ -0.0519140288233757,
+ 0.02979324571788311,
+ 0.05220453813672066,
+ 0.03311416134238243,
+ 0.037386853247880936,
+ -0.0027847758028656244,
+ 0.028314342722296715,
+ -0.031957074999809265,
+ 0.031053535640239716,
+ -0.04940151050686836,
+ -0.03884076699614525,
+ 0.014899504370987415,
+ -0.06465323269367218,
+ -0.032321907579898834,
+ 0.023116644471883774,
+ -0.028988560661673546,
+ 0.001443588174879551,
+ 0.014647373929619789,
+ 0.008368921466171741,
+ 0.07738296687602997,
+ 0.02782890945672989,
+ 0.02272210270166397,
+ -0.0024774896446615458,
+ 0.054158084094524384,
+ 0.021281132474541664,
+ 0.010211803950369358,
+ -0.04683631286025047,
+ 0.010146226733922958,
+ 0.12099792808294296,
+ -0.018240155652165413,
+ 0.034591566771268845,
+ -0.0221712663769722,
+ -0.0021194007713347673,
+ 0.02409832738339901,
+ -0.032855886965990067,
+ 0.012051686644554138,
+ -0.006620901171118021,
+ 0.03047706000506878,
+ 0.04935894533991814,
+ 0.02774297632277012,
+ 0.026119602844119072,
+ 0.024169189855456352,
+ -0.05771295353770256,
+ 0.014427125453948975,
+ 0.02218344621360302,
+ 0.010269466787576675,
+ -0.060695942491292953,
+ -0.023016953840851784,
+ -0.00600411556661129,
+ -0.0011508924653753638,
+ -0.06039150059223175,
+ 0.009939983487129211,
+ 0.0474354550242424,
+ 0.03560521453619003,
+ 0.030216148123145103,
+ -0.058400481939315796,
+ 0.034102898091077805,
+ 0.03876390680670738,
+ 0.0135410837829113,
+ 0.027742823585867882,
+ -0.042270611971616745,
+ -0.010479873046278954,
+ 0.008978281170129776,
+ -0.0006369129405356944,
+ -0.03508077934384346,
+ 0.055377159267663956,
+ 0.0411563478410244,
+ -0.04111672565340996,
+ 0.02163744531571865,
+ 0.025657599791884422,
+ -0.015589025802910328,
+ -0.034810591489076614,
+ 0.047063183039426804,
+ -0.04800407215952873,
+ 0.01156677957624197,
+ 0.030879193916916847,
+ -0.008042719215154648,
+ 0.016980955377221107,
+ 0.05343193933367729,
+ -0.00919724628329277,
+ -0.034248508512973785,
+ 0.024288319051265717,
+ -0.002841122215613723,
+ 0.011115304194390774,
+ 0.015437495894730091,
+ 0.02633337862789631,
+ -0.021757934242486954,
+ -0.03634639084339142,
+ -0.015202580951154232,
+ 0.011523944325745106,
+ 0.010075768455862999,
+ 0.04190832003951073,
+ -0.062929667532444,
+ -0.031187377870082855,
+ 0.04144144430756569,
+ 0.025928258895874023,
+ 0.03329617902636528,
+ -0.02464958094060421,
+ 0.0008363919332623482,
+ -0.04448552057147026,
+ 0.011424452997744083,
+ 0.006774563807994127,
+ -0.0380672812461853,
+ -0.06165632978081703,
+ -0.00925905816257,
+ -0.02034451998770237,
+ 0.011900710873305798,
+ -0.0008381368825212121,
+ -0.01629594899713993,
+ -0.013011311180889606,
+ -0.01405542716383934,
+ -0.016372717916965485,
+ 0.056196220219135284,
+ -0.046487465500831604,
+ -0.019961221143603325,
+ 0.03867696598172188,
+ -0.014076007530093193,
+ -0.03622547909617424,
+ -0.0030869459733366966,
+ -0.006963388528674841,
+ -0.021619748324155807,
+ 0.011113855056464672,
+ -0.029111351817846298,
+ 0.0313260443508625,
+ -0.006862808018922806,
+ 0.034946996718645096,
+ 0.013477473519742489,
+ 0.051893871277570724,
+ 0.03761155903339386,
+ 0.06499731540679932,
+ -0.005389737896621227,
+ -0.017357192933559418,
+ -0.004205617122352123,
+ -0.017413977533578873,
+ 0.031167516484856606,
+ 0.021378515288233757,
+ 0.008820049464702606,
+ 0.0047073704190552235,
+ 0.023554867133498192,
+ 0.025320643559098244,
+ -0.015431702136993408,
+ 0.029365867376327515,
+ -0.008634252473711967,
+ -0.020301438868045807,
+ -0.010636833496391773,
+ -0.06286422163248062,
+ -0.011260593309998512,
+ 0.04729411005973816,
+ 0.02924281731247902,
+ 0.036239247769117355,
+ 0.04452500492334366,
+ 0.01934770494699478,
+ -0.00037262251134961843,
+ 0.037441886961460114,
+ 0.0036469597835093737,
+ -0.019477222114801407,
+ -0.023302501067519188,
+ -0.02372000180184841,
+ 0.056713491678237915,
+ -0.03873539716005325,
+ -0.006314767058938742,
+ 0.02143603004515171,
+ -0.029356081038713455,
+ 0.0070127989165484905,
+ -0.016023749485611916,
+ 0.013905971311032772,
+ -0.04856786131858826,
+ 0.03470585495233536,
+ -0.04779103770852089,
+ -0.05553647130727768,
+ -0.01740463636815548,
+ -0.05880575627088547,
+ 0.015082414261996746,
+ 0.013445268385112286,
+ -0.019609104841947556,
+ 0.041719142347574234,
+ 0.030117377638816833,
+ 0.01071175653487444,
+ -0.006025498267263174,
+ -0.04462096840143204,
+ 0.011004041880369186,
+ 0.007634690962731838,
+ 0.020635763183236122,
+ 0.027279702946543694,
+ 0.0652475655078888,
+ -0.030390629544854164,
+ 0.015707217156887054,
+ 0.0029071089811623096,
+ 0.006244441960006952,
+ 0.01360820047557354,
+ -0.040044236928224564,
+ 0.02027900330722332,
+ -0.042151231318712234,
+ -0.026130082085728645,
+ -0.053008437156677246,
+ -0.04439619928598404,
+ 0.008025585673749447,
+ -0.02255825698375702,
+ 0.020897410809993744,
+ 0.010584237985312939,
+ -0.0215274877846241,
+ -0.017088277265429497,
+ 0.002713541267439723,
+ 0.005882819648832083,
+ 0.0044416096061468124,
+ -0.004604024346917868,
+ 0.012770558707416058,
+ -0.0012023093877360225,
+ 0.0014226603088900447,
+ 0.030774762853980064,
+ -0.005681078881025314,
+ -0.017308464273810387,
+ 0.020468860864639282,
+ -0.04813691973686218,
+ -0.03903057053685188,
+ 0.020326638594269753,
+ 0.03487139195203781,
+ -0.038535527884960175,
+ 0.04979024827480316,
+ 0.0005782445077784359,
+ -0.013002509251236916,
+ -0.01606144569814205,
+ -0.002269556513056159,
+ 0.003651206148788333,
+ 0.014356807805597782,
+ 0.0012225254904478788,
+ -0.006457406096160412,
+ -0.007603291422128677,
+ 0.02089572884142399,
+ 0.017727281898260117,
+ -0.026629839092493057,
+ 0.044421520084142685,
+ -0.04422774165868759,
+ -0.056511856615543365,
+ -0.02247588522732258,
+ 0.013286711648106575,
+ -0.005340618081390858,
+ -0.03344081714749336,
+ 0.00393259571865201,
+ -0.04006662219762802,
+ 0.050781700760126114,
+ 0.04045529663562775,
+ -0.006249934900552034,
+ 0.04919661581516266,
+ -0.014690193347632885,
+ -0.023886820301413536,
+ 0.03537324070930481,
+ -0.04338669031858444,
+ 0.007764859590679407,
+ 0.040591686964035034,
+ -0.03896944969892502,
+ -0.050184085965156555,
+ -0.047935813665390015,
+ 0.015989676117897034,
+ -0.0425800159573555,
+ -0.006517145782709122,
+ -0.007257524877786636,
+ -0.030547989532351494,
+ 0.02526431903243065,
+ 0.015907887369394302,
+ -0.012078856118023396,
+ -0.013502202928066254,
+ 0.020342648029327393,
+ -0.039222512394189835,
+ 0.007220504339784384,
+ 0.0665888711810112,
+ -0.02256382815539837,
+ 0.0068607875145971775,
+ -0.0006932805990800261,
+ 0.006526276469230652,
+ 0.0522148497402668,
+ -0.023630838841199875,
+ 0.03583565354347229,
+ 0.050248581916093826,
+ -0.005797720048576593,
+ 0.03440520539879799,
+ -0.047629307955503464,
+ 0.003198075806722045,
+ -0.03575705364346504,
+ 0.03514384105801582,
+ -0.0032902115490287542,
+ -0.017929892987012863,
+ 0.05553199350833893,
+ 0.03215308114886284,
+ 0.04009357467293739,
+ -0.023595336824655533,
+ 0.010433034040033817,
+ -0.023072771728038788,
+ -0.029681073501706123,
+ -0.015199225395917892,
+ 0.044309381395578384,
+ 0.03420555964112282,
+ -0.050472937524318695,
+ -0.047820206731557846,
+ -0.004500357899814844,
+ 0.038410864770412445,
+ 0.018315551802515984,
+ 0.04649476334452629,
+ -0.0026149791665375233,
+ 0.022567756474018097,
+ -0.04958360269665718,
+ -0.03990668058395386,
+ -0.03435269370675087,
+ -0.04300957918167114,
+ 0.03688633814454079,
+ -0.020329592749476433,
+ 0.04785287380218506,
+ -0.044504955410957336,
+ 0.0028806678019464016,
+ 0.04113234207034111,
+ 0.0594451017677784,
+ -0.03905147314071655,
+ -0.02921249531209469,
+ -0.028967157006263733,
+ 0.018317028880119324,
+ -0.003344106487929821,
+ 0.010835330002009869,
+ 0.03715725988149643,
+ 0.008470806293189526,
+ -0.02690628543496132,
+ -0.006040805019438267,
+ -0.05460245534777641,
+ 0.021083466708660126,
+ -0.023755019530653954,
+ -0.04239029809832573,
+ 0.010452902875840664,
+ 0.00888014119118452,
+ 0.014176059514284134,
+ -0.047177549451589584,
+ 0.010559223592281342,
+ -0.02444373071193695,
+ -0.01942051202058792,
+ -0.05707121640443802,
+ -0.04400869458913803,
+ -0.035443320870399475,
+ 0.03253202885389328,
+ 0.026516495272517204,
+ -0.0087546082213521,
+ 0.013954308815300465,
+ -0.0015504646580666304,
+ -0.005606042221188545,
+ -0.02449563331902027,
+ -0.012727383524179459,
+ 0.029686180874705315,
+ 0.026785805821418762,
+ -0.043088797479867935,
+ -0.013438996858894825,
+ 0.030052930116653442,
+ 0.04167750105261803,
+ 0.0307056475430727,
+ 0.000614233547821641,
+ -0.018791941925883293,
+ 0.021779129281640053,
+ -0.048688147217035294,
+ -0.02022966928780079,
+ -0.04777122661471367,
+ -0.010700101032853127,
+ -0.005638815928250551,
+ -0.032259345054626465,
+ -0.023151876404881477,
+ -0.014591539278626442,
+ 0.0032879349309951067,
+ -0.00285548809915781,
+ 0.0201586727052927,
+ 0.018070366233587265,
+ 0.03907126933336258,
+ -0.013599048368632793,
+ 0.030063889920711517,
+ 0.033127300441265106,
+ -0.009222102351486683,
+ 0.01821543462574482,
+ -0.0177189689129591,
+ -0.04808376729488373,
+ -0.04500606656074524,
+ -0.02455408312380314,
+ 0.028065498918294907,
+ -0.007687045261263847,
+ -0.013004649430513382,
+ 0.01441373210400343,
+ 0.007627960294485092,
+ 0.02565823309123516,
+ -0.0058751897886395454,
+ -0.013662979006767273,
+ 0.003128878539428115,
+ -0.04875454679131508,
+ 0.04592122137546539,
+ 0.006255257874727249
+ ],
+ "text": "Introduction to Machine Learning This book introduces machine learning concepts, focusing on supervised and unsupervised learning techniques. It covers algorithms like linear regression, k-means clustering, and support vector machines."
+}
diff --git a/oak-search-elastic/src/test/resources/inferenceUsingConfig/content/programming.json b/oak-search-elastic/src/test/resources/inferenceUsingConfig/content/programming.json
new file mode 100644
index 0000000000..b940c140d7
--- /dev/null
+++ b/oak-search-elastic/src/test/resources/inferenceUsingConfig/content/programming.json
@@ -0,0 +1,1029 @@
+{
+ "embedding": [
+ 0.006905433256179094,
+ -0.03519833832979202,
+ 0.0012540991883724928,
+ -0.0004917292972095311,
+ -0.044460128992795944,
+ 0.07576492428779602,
+ -0.048846159130334854,
+ -0.03931073844432831,
+ -0.03982621431350708,
+ 0.012242240831255913,
+ 0.04208049550652504,
+ -0.02680802159011364,
+ 0.03439393639564514,
+ 0.03209781274199486,
+ 0.028407495468854904,
+ 0.02966664731502533,
+ -0.003525573294609785,
+ 0.013982588425278664,
+ 0.017316263169050217,
+ -0.07194646447896957,
+ 0.022080903872847557,
+ -0.05708015710115433,
+ -0.02585279755294323,
+ 0.035977400839328766,
+ -0.023389820009469986,
+ -0.01545045431703329,
+ -0.046796660870313644,
+ 0.005475664045661688,
+ -0.06384968012571335,
+ 0.003986102528870106,
+ 0.00029860931681469083,
+ -0.032830432057380676,
+ 0.03623742237687111,
+ -0.03388163074851036,
+ 0.048039764165878296,
+ 0.0018364664865657687,
+ -0.030512982979416847,
+ -0.05696463584899902,
+ 0.03172624111175537,
+ 0.010566533543169498,
+ 0.004124586936086416,
+ 0.03057199716567993,
+ -0.032570790499448776,
+ 0.028125803917646408,
+ 0.025810016319155693,
+ 0.04087699204683304,
+ -0.018012678250670433,
+ 0.02197740226984024,
+ -0.024652469903230667,
+ -0.020590152591466904,
+ 0.04140174388885498,
+ -0.04978116601705551,
+ 0.05541740730404854,
+ 0.042761705815792084,
+ -0.039474982768297195,
+ 0.029675524681806564,
+ 0.019304342567920685,
+ 0.020914815366268158,
+ -0.00026673910906538367,
+ -0.03447283059358597,
+ 0.03624411299824715,
+ -0.03542837128043175,
+ 0.030065732076764107,
+ -0.003868026426061988,
+ 0.010302654467523098,
+ -0.041792094707489014,
+ 0.0377049595117569,
+ 0.023211384192109108,
+ -0.004011430311948061,
+ 0.005988455377519131,
+ -0.01516539603471756,
+ -0.042405951768159866,
+ 0.0013235288206487894,
+ 0.05531332641839981,
+ 0.027745964005589485,
+ -0.018185148015618324,
+ -0.05882502347230911,
+ 0.010318714193999767,
+ 0.02861320599913597,
+ 0.0006867413176223636,
+ -0.04739399626851082,
+ -0.022337855771183968,
+ -0.06154981255531311,
+ -0.020993612706661224,
+ 0.019612900912761688,
+ 0.023651467636227608,
+ 0.017845621332526207,
+ -0.004624238703399897,
+ 0.029194427654147148,
+ 0.015935121104121208,
+ 0.031275514513254166,
+ -0.019484518095850945,
+ 0.014432528987526894,
+ 0.010888034477829933,
+ -0.03539871796965599,
+ -0.017619382590055466,
+ -0.013821269385516644,
+ -0.004859964828938246,
+ 0.023847002536058426,
+ -0.018360646441578865,
+ -0.04936840385198593,
+ -0.050717055797576904,
+ -0.03014034777879715,
+ 0.04281359538435936,
+ -0.016023946925997734,
+ -0.038385290652513504,
+ -0.032331179827451706,
+ 0.013288808055222034,
+ -0.03158990666270256,
+ -0.02123381942510605,
+ 0.0005618743598461151,
+ -0.03645898029208183,
+ -0.003980046138167381,
+ -0.015780311077833176,
+ -0.004524712450802326,
+ 0.022187668830156326,
+ 0.04780234396457672,
+ -0.0021937761921435595,
+ -0.0032338970340788364,
+ 0.05312682315707207,
+ 0.03388478234410286,
+ -0.005061888135969639,
+ -0.007808506954461336,
+ -0.012507102452218533,
+ -0.024118244647979736,
+ 0.03392805904150009,
+ -0.032358698546886444,
+ -0.005094188265502453,
+ 0.036630142480134964,
+ 0.046356987208127975,
+ 0.029827307909727097,
+ -0.03386879712343216,
+ 0.009692072868347168,
+ 0.031891725957393646,
+ -0.006030289921909571,
+ 0.06763021647930145,
+ -0.01672816276550293,
+ -0.04567351192235947,
+ -0.004104858264327049,
+ 0.022926287725567818,
+ -0.025361672043800354,
+ -0.0014757445314899087,
+ 0.05545547604560852,
+ 0.048819079995155334,
+ 0.026778489351272583,
+ -0.06309095025062561,
+ -0.03961276635527611,
+ -0.03755916655063629,
+ -0.08208990097045898,
+ -0.03987313061952591,
+ -0.06150328740477562,
+ -0.02143298275768757,
+ -0.03504788503050804,
+ 0.00913950800895691,
+ 0.03774502873420715,
+ -0.05142640694975853,
+ 0.0029424885287880898,
+ -0.03682165592908859,
+ 0.000748641905374825,
+ 0.030324414372444153,
+ 0.019355451688170433,
+ 0.02751387096941471,
+ -0.003696190658956766,
+ 0.032896656543016434,
+ 0.0035181520506739616,
+ 0.0033944544848054647,
+ 0.02492542192339897,
+ -0.008550985716283321,
+ 0.05762578174471855,
+ -0.0002367861452512443,
+ 0.006492410786449909,
+ 0.0018688160926103592,
+ 0.021486790850758553,
+ 0.04139116406440735,
+ 0.05191883072257042,
+ -0.02346113696694374,
+ 0.03358675539493561,
+ -0.027264157310128212,
+ 0.03392104431986809,
+ 0.002023791428655386,
+ 0.004582496825605631,
+ -0.002523445524275303,
+ -0.07271161675453186,
+ -0.024197112768888474,
+ -0.02980472892522812,
+ 0.0377102755010128,
+ 0.03951741009950638,
+ -0.05517413094639778,
+ 0.01092163473367691,
+ -0.0560193732380867,
+ 0.0035153497010469437,
+ -0.004568345844745636,
+ -0.037473876029253006,
+ -0.0009853411465883255,
+ -0.021250823512673378,
+ -0.01258144062012434,
+ -0.023302534595131874,
+ -0.037764664739370346,
+ -0.011061624623835087,
+ 0.019054638221859932,
+ 0.024006498977541924,
+ 0.020019087940454483,
+ -0.026153134182095528,
+ -0.0021923817694187164,
+ -0.021285245195031166,
+ 0.016840577125549316,
+ 0.006400499027222395,
+ 0.014920148067176342,
+ -0.044096626341342926,
+ 0.0020793413277715445,
+ 0.014667912386357784,
+ -0.013352794572710991,
+ 0.011543230153620243,
+ -0.015117036178708076,
+ -0.015760743990540504,
+ 0.018986621871590614,
+ 0.014119623228907585,
+ 0.004103092942386866,
+ 0.0010287658078595996,
+ 0.01900015026330948,
+ -0.04475557059049606,
+ 0.011742796748876572,
+ 0.05544107407331467,
+ -0.01105925440788269,
+ 0.03368395194411278,
+ -0.001084679737687111,
+ -0.045960407704114914,
+ 0.061049189418554306,
+ 0.028866855427622795,
+ 0.01088645774871111,
+ -0.008648383431136608,
+ 0.04423842951655388,
+ -0.040607668459415436,
+ -0.022674858570098877,
+ -0.006442734971642494,
+ 0.0008354418096132576,
+ 0.04971904680132866,
+ -0.0067219920456409454,
+ 0.02172304503619671,
+ 0.05442124605178833,
+ 0.0006657635094597936,
+ 0.04079727828502655,
+ 0.01896311342716217,
+ -0.01388788316398859,
+ 0.016387758776545525,
+ 0.042816802859306335,
+ 0.04044334962964058,
+ 0.04386446997523308,
+ 0.0373680405318737,
+ 0.07219181209802628,
+ -0.005956126842647791,
+ 0.013156170956790447,
+ -0.016698082908988,
+ -0.022224923595786095,
+ 0.019264673814177513,
+ 0.015830842778086662,
+ 0.04609030485153198,
+ -0.034609824419021606,
+ -0.03364162892103195,
+ 0.050816185772418976,
+ 0.04260234534740448,
+ -0.0464916005730629,
+ -0.03565220162272453,
+ -0.0002432324836263433,
+ -0.02038498781621456,
+ -0.013470866717398167,
+ 0.0007945980760268867,
+ 0.002568498719483614,
+ 0.07458331435918808,
+ -0.043257810175418854,
+ 0.024875925853848457,
+ 0.025748491287231445,
+ 0.016770899295806885,
+ -0.03457263112068176,
+ -0.009256714023649693,
+ -0.01115755457431078,
+ -0.028784576803445816,
+ -0.009806708432734013,
+ 0.025345051661133766,
+ 0.008311728946864605,
+ 0.027493100613355637,
+ 0.0330178439617157,
+ -0.009466122835874557,
+ 0.028596892952919006,
+ -0.0326911136507988,
+ 0.008193060755729675,
+ -0.008843875490128994,
+ 0.017789490520954132,
+ 0.04926081374287605,
+ 0.017565790563821793,
+ -0.020813535898923874,
+ -0.02494071237742901,
+ 0.0496755950152874,
+ -0.02454233728349209,
+ -0.03431839868426323,
+ 0.03157520666718483,
+ -0.04608284309506416,
+ 0.01565057411789894,
+ 0.03355807065963745,
+ -0.011939754709601402,
+ 0.06385480612516403,
+ 0.0029491090681403875,
+ -0.042205121368169785,
+ -0.058048151433467865,
+ 0.009865094907581806,
+ -0.01575372740626335,
+ 0.03456607088446617,
+ -0.032690584659576416,
+ 0.023609507828950882,
+ 0.009087864309549332,
+ -0.0019396571442484856,
+ -0.04068353772163391,
+ -0.03405461087822914,
+ -0.027174264192581177,
+ -0.06404847651720047,
+ -0.017592377960681915,
+ -0.0338151641190052,
+ 0.04014239087700844,
+ 0.008995221927762032,
+ 0.02468179166316986,
+ 0.0314488522708416,
+ 0.02011595480144024,
+ -0.0482153594493866,
+ -0.02645541913807392,
+ -0.05280603840947151,
+ 0.013502266258001328,
+ -0.023632248863577843,
+ 0.021558770909905434,
+ -0.031393978744745255,
+ -0.02741948887705803,
+ -0.06569851189851761,
+ 0.001324822660535574,
+ 0.02013026550412178,
+ 0.004268855322152376,
+ -0.013963567093014717,
+ -0.0016427133232355118,
+ -0.007563452236354351,
+ -0.006352782249450684,
+ 0.0046447268687188625,
+ 0.004162155091762543,
+ 0.06687237322330475,
+ 0.010643389075994492,
+ -0.016736477613449097,
+ -0.0544692762196064,
+ 0.008740462362766266,
+ 0.047310784459114075,
+ 0.05452967435121536,
+ 0.0005373881431296468,
+ 0.014924484305083752,
+ 0.04631965979933739,
+ 0.03840494528412819,
+ 0.01764589734375477,
+ 0.014504621736705303,
+ -0.04227568581700325,
+ -0.05125737190246582,
+ -0.0012634999584406614,
+ 0.02001255191862583,
+ -0.03097999282181263,
+ 0.01337449625134468,
+ 0.05551157519221306,
+ 0.05160326510667801,
+ -0.027748465538024902,
+ 0.05253591388463974,
+ -0.012199594639241695,
+ 0.001204093568958342,
+ -0.05914003774523735,
+ -0.00269652483984828,
+ 0.005503590684384108,
+ -0.015931028872728348,
+ 0.004356845747679472,
+ -0.021242663264274597,
+ 0.021228009834885597,
+ 0.013634659349918365,
+ -0.020665977150201797,
+ -0.033146634697914124,
+ -0.010021848604083061,
+ 0.014823601581156254,
+ 0.049875784665346146,
+ 0.019500859081745148,
+ -0.01691560447216034,
+ 0.013060576282441616,
+ 0.04931814223527908,
+ 0.00018668874690774828,
+ -0.031211374327540398,
+ -0.054432593286037445,
+ 0.007674850057810545,
+ -0.004803709220141172,
+ 0.002873397199437022,
+ -0.002869742689654231,
+ -0.05916743725538254,
+ -0.010827085934579372,
+ -0.06098674237728119,
+ 0.03085101768374443,
+ -0.019652318209409714,
+ -0.007574550341814756,
+ -0.02824743650853634,
+ 0.02689695730805397,
+ -0.031453367322683334,
+ 0.04300133138895035,
+ 0.04140906780958176,
+ 0.051370467990636826,
+ 0.054038502275943756,
+ 0.004250896628946066,
+ 0.03212369233369827,
+ -0.07543334364891052,
+ -0.0018475041724741459,
+ 0.04458864405751228,
+ 0.03458799049258232,
+ 0.02978801168501377,
+ -0.029581887647509575,
+ -0.015310203656554222,
+ 0.02880845032632351,
+ 0.01619189791381359,
+ -0.013182178139686584,
+ 0.003453693585470319,
+ 0.010219553485512733,
+ 0.016048891469836235,
+ -0.020937275141477585,
+ -0.03340546786785126,
+ -0.0026646535843610764,
+ -0.024624107405543327,
+ -0.029672564938664436,
+ 0.003559434087947011,
+ -0.0334307961165905,
+ 0.03389991819858551,
+ -0.014919283799827099,
+ 0.011439939960837364,
+ -0.019110500812530518,
+ -0.014423818327486515,
+ -0.05866050720214844,
+ 0.033748555928468704,
+ -0.07678104937076569,
+ -0.01032362412661314,
+ -0.014910794794559479,
+ 0.05344889312982559,
+ -0.019015025347471237,
+ 0.02117954194545746,
+ 0.00971377082169056,
+ 0.025040585547685623,
+ -0.009419799782335758,
+ 0.06964392960071564,
+ 0.0197021272033453,
+ 0.0046984124928712845,
+ -0.040071990340948105,
+ 0.021676843985915184,
+ -0.014575962908565998,
+ 0.02325182408094406,
+ -0.025924738496541977,
+ -0.03291619196534157,
+ 0.042493849992752075,
+ 0.05713236704468727,
+ -0.02300724945962429,
+ 0.0190435741096735,
+ -0.04385988414287567,
+ -0.03688064217567444,
+ -0.02381383813917637,
+ -0.044232871383428574,
+ 0.06440568715333939,
+ 0.0011109065962955356,
+ -0.01431491319090128,
+ -0.008817974478006363,
+ -0.03129613399505615,
+ 0.02050958201289177,
+ -0.04054591432213783,
+ 0.0058714840561151505,
+ -0.03633162006735802,
+ 0.033516090363264084,
+ 0.029588377103209496,
+ -0.020975541323423386,
+ 0.021845120936632156,
+ -0.010687431320548058,
+ -0.05074573680758476,
+ 0.059989407658576965,
+ 0.009053317829966545,
+ -0.030038027092814445,
+ -0.001053368323482573,
+ 0.01746540330350399,
+ 0.033901847898960114,
+ 0.020268583670258522,
+ 0.03941906616091728,
+ -0.0281025692820549,
+ -0.0032822650391608477,
+ 0.026627162471413612,
+ 0.04785861819982529,
+ -0.04775317385792732,
+ 0.01601484604179859,
+ -0.02457178756594658,
+ -0.02331777662038803,
+ 0.04212072119116783,
+ -0.02118530496954918,
+ -0.04866956174373627,
+ 0.0395229309797287,
+ 0.057461127638816833,
+ -0.0045812674798071384,
+ 0.012351101264357567,
+ -0.041053351014852524,
+ -0.010130687616765499,
+ 0.012641391716897488,
+ -0.038057856261730194,
+ -0.0006805313751101494,
+ 0.031954895704984665,
+ -0.021186023950576782,
+ 0.02162253111600876,
+ 0.01674676313996315,
+ -0.02932601049542427,
+ 0.0474434420466423,
+ -0.0023498795926570892,
+ -0.008616335690021515,
+ -0.0106939896941185,
+ 0.03493260592222214,
+ -0.045970577746629715,
+ -0.0018180370097979903,
+ -0.015806302428245544,
+ 0.021679216995835304,
+ 0.04368595778942108,
+ 0.005871275905519724,
+ 0.04880867898464203,
+ 0.018420225009322166,
+ 0.011393304914236069,
+ -0.011515012010931969,
+ -0.045702867209911346,
+ 0.009947326965630054,
+ 0.027411505579948425,
+ -0.04150468856096268,
+ -0.06287385523319244,
+ 0.006636086385697126,
+ 0.019196510314941406,
+ 0.03781626373529434,
+ -0.019102662801742554,
+ -0.036677535623311996,
+ -0.015192896127700806,
+ 0.06050729751586914,
+ -0.03177698701620102,
+ 0.003487036796286702,
+ -0.0061492170207202435,
+ 0.015206856653094292,
+ -0.03233404830098152,
+ 0.015713216736912727,
+ 0.015390124171972275,
+ 0.02597900666296482,
+ 0.027159618213772774,
+ 0.00442862045019865,
+ 0.008254116401076317,
+ -0.008811933919787407,
+ -0.07662411779165268,
+ -0.02842547744512558,
+ -0.019761456176638603,
+ 0.007778526283800602,
+ 0.006232299841940403,
+ -0.03307115286588669,
+ -0.004521552007645369,
+ -0.023870470002293587,
+ -0.06285092234611511,
+ -0.013559185899794102,
+ -0.04118892550468445,
+ 0.0508451983332634,
+ -0.032441772520542145,
+ -0.003624428529292345,
+ 0.0015431916108354926,
+ -0.0012906045885756612,
+ 0.04045526683330536,
+ 0.05113678425550461,
+ 0.041829295456409454,
+ 0.024767529219388962,
+ -0.015122288838028908,
+ 0.05632681027054787,
+ -0.01471435371786356,
+ 0.016107089817523956,
+ -0.0411459282040596,
+ 0.0503266267478466,
+ -0.010437950491905212,
+ -0.023936979472637177,
+ 0.04467024654150009,
+ 0.009919660165905952,
+ -0.031773898750543594,
+ 0.0464397594332695,
+ 0.01947876811027527,
+ 0.0084171611815691,
+ 0.04383403807878494,
+ -0.05757533013820648,
+ -0.009685155935585499,
+ -0.05716167390346527,
+ 0.032121580094099045,
+ -0.020522862672805786,
+ -0.015572315081954002,
+ 0.012921694666147232,
+ 0.004415228497236967,
+ -0.025866176933050156,
+ 0.0013706006575375795,
+ 0.030170496553182602,
+ 0.03572964295744896,
+ 0.0437730997800827,
+ -0.023942982777953148,
+ -0.019574645906686783,
+ 0.03237496688961983,
+ -0.031968340277671814,
+ 0.007527276407927275,
+ -0.05722542852163315,
+ -0.013927243649959564,
+ 0.003029764164239168,
+ 0.015485646203160286,
+ -0.03736748918890953,
+ -0.0012812372297048569,
+ -0.04593678563833237,
+ 0.008543883450329304,
+ 0.00809775572270155,
+ 0.04782756045460701,
+ 0.054844342172145844,
+ 0.034551750868558884,
+ 0.002706370549276471,
+ -0.05285974591970444,
+ 0.020378146320581436,
+ 0.025599781423807144,
+ 0.00701298750936985,
+ -0.039455682039260864,
+ 0.03680214285850525,
+ 0.008418609388172626,
+ -0.004831365309655666,
+ 0.025377770885825157,
+ 0.031925324350595474,
+ -0.018985817208886147,
+ 0.02706790342926979,
+ 0.06698980182409286,
+ 0.003009837819263339,
+ -0.005166427697986364,
+ -0.06803666055202484,
+ 0.04126902297139168,
+ -0.01312242727726698,
+ 0.041503213346004486,
+ 0.012588240206241608,
+ 0.0509609691798687,
+ -0.00021422257123049349,
+ -0.018935980275273323,
+ 0.054538823664188385,
+ -0.017202915623784065,
+ -0.015874020755290985,
+ -0.01257689855992794,
+ -0.044375598430633545,
+ 0.007450031582266092,
+ 0.04907442256808281,
+ 0.04876036196947098,
+ 0.04401704668998718,
+ -0.023822275921702385,
+ 0.015837430953979492,
+ -0.03480147942900658,
+ 0.012390751391649246,
+ -0.052077408879995346,
+ -0.013682316988706589,
+ 0.0037676356732845306,
+ -0.03245674818754196,
+ -0.02765452302992344,
+ 0.031062327325344086,
+ -0.021744655445218086,
+ -0.010027662850916386,
+ 0.004708551801741123,
+ 0.036088574677705765,
+ 0.06860089302062988,
+ 0.02974134497344494,
+ 0.03517136722803116,
+ -0.014739405363798141,
+ 0.05011339113116264,
+ 0.006045408546924591,
+ 0.0162129458039999,
+ -0.03971226513385773,
+ 0.01430063508450985,
+ 0.11157537996768951,
+ 0.0042123510502278805,
+ 0.02507776767015457,
+ -0.02920302376151085,
+ 0.01787029393017292,
+ 0.03405550494790077,
+ -0.005352802108973265,
+ 0.018615152686834335,
+ -0.044713109731674194,
+ 0.04894382879137993,
+ 0.031722117215394974,
+ 0.009002442471683025,
+ 0.02825145795941353,
+ 0.0197659432888031,
+ -0.05386019125580788,
+ 0.035604339092969894,
+ 0.03158320486545563,
+ -0.008472666144371033,
+ -0.05729122459888458,
+ -0.02776988036930561,
+ 0.026297522708773613,
+ -0.005825719330459833,
+ -0.08353027701377869,
+ 0.00844262633472681,
+ 0.019969062879681587,
+ 0.0038408206310123205,
+ 0.014521497301757336,
+ -0.05885840952396393,
+ 0.03662974014878273,
+ 0.0465749129652977,
+ -0.015633536502718925,
+ 0.014285607263445854,
+ -0.03354578837752342,
+ 0.001772645628079772,
+ 0.021125536412000656,
+ -0.00715570617467165,
+ -0.029141157865524292,
+ 0.047691710293293,
+ 0.03208401799201965,
+ -0.01821395382285118,
+ 0.016382068395614624,
+ 0.02040851302444935,
+ -0.051458001136779785,
+ 0.0018318247748538852,
+ 0.06195202097296715,
+ -0.0262518972158432,
+ -0.0013837475562468171,
+ -0.00960132572799921,
+ 0.018341628834605217,
+ 0.02901013009250164,
+ 0.03294852748513222,
+ -0.0051157232373952866,
+ -0.028826434165239334,
+ -0.0016424088971689343,
+ 0.004124033730477095,
+ 0.020264578983187675,
+ 0.02309465780854225,
+ 0.024456648156046867,
+ -0.01560642383992672,
+ -0.007111654616892338,
+ -0.024773158133029938,
+ 0.017274606972932816,
+ 0.018577447161078453,
+ 0.015894684940576553,
+ -0.07494078576564789,
+ -0.02165553718805313,
+ 0.035918306559324265,
+ 0.026813020929694176,
+ 0.035204239189624786,
+ -0.026628686115145683,
+ 0.0068339454010128975,
+ -0.04478698596358299,
+ -0.0011134189553558826,
+ 0.004686862695962191,
+ -0.028337547555565834,
+ -0.030899813398718834,
+ -0.03488403186202049,
+ -0.021089091897010803,
+ -0.004515110049396753,
+ -0.0029859065543860197,
+ -0.01948963850736618,
+ 0.029597576707601547,
+ -0.021212836727499962,
+ -0.020988957956433296,
+ 0.0658770278096199,
+ -0.036935437470674515,
+ -0.011935241520404816,
+ 0.0023969674948602915,
+ 0.01371645275503397,
+ -0.023032937198877335,
+ -0.05144860967993736,
+ 0.009706921875476837,
+ 0.004035187419503927,
+ 0.011778129264712334,
+ -0.02376331202685833,
+ 0.019765354692935944,
+ -0.01837426982820034,
+ 0.041164711117744446,
+ 0.014678564853966236,
+ 0.03852199763059616,
+ 0.03425043448805809,
+ 0.06864968687295914,
+ -0.012292291037738323,
+ -0.002136331284418702,
+ -0.025737339630723,
+ -0.03462115675210953,
+ 0.01597042940557003,
+ 0.019452523440122604,
+ 0.012517217546701431,
+ -0.005224039778113365,
+ 0.03264166787266731,
+ 0.008301501162350178,
+ -0.010421090759336948,
+ 0.010755879804491997,
+ -0.023187296465039253,
+ 0.0038502379320561886,
+ -0.013575204648077488,
+ -0.05324453487992287,
+ -0.008526220917701721,
+ 0.030530253425240517,
+ 0.014750972390174866,
+ 0.00860531721264124,
+ 0.0424329973757267,
+ 0.010209901258349419,
+ 0.003138188039883971,
+ 0.04561947286128998,
+ -0.007308186963200569,
+ -0.02292151376605034,
+ -0.033654503524303436,
+ -0.023180700838565826,
+ 0.02548026666045189,
+ -0.038755908608436584,
+ -0.030859824270009995,
+ 0.019951676949858665,
+ -0.031729549169540405,
+ -0.015675436705350876,
+ 0.01858743466436863,
+ 0.0010163778206333518,
+ -0.01921946369111538,
+ 0.0402803048491478,
+ -0.04489588364958763,
+ -0.048873525112867355,
+ -0.015325677581131458,
+ -0.05245252698659897,
+ 0.011095959693193436,
+ 0.021510640159249306,
+ -0.021113533526659012,
+ 0.0070081292651593685,
+ 0.03618529066443443,
+ 0.05697103217244148,
+ -0.01209311280399561,
+ -0.0559455044567585,
+ 0.02796108089387417,
+ 0.009882422164082527,
+ 0.03382537513971329,
+ 0.034950438886880875,
+ 0.060154929757118225,
+ -0.0501958467066288,
+ 0.015529857017099857,
+ 0.006476626265794039,
+ 0.007958593778312206,
+ 0.04140571504831314,
+ -0.025573117658495903,
+ 0.014290151186287403,
+ -0.04424808919429779,
+ -0.016589347273111343,
+ -0.027436891570687294,
+ -0.043797608464956284,
+ 0.004251298028975725,
+ -0.02409028448164463,
+ 0.0011941201519221067,
+ 0.0016674151411280036,
+ -0.027906185016036034,
+ 0.004422668367624283,
+ -0.0015993720153346658,
+ 0.0019860095344483852,
+ 0.008220212534070015,
+ -0.028332674875855446,
+ 0.012221528217196465,
+ -0.005668214522302151,
+ 0.010594192892313004,
+ 0.00949940551072359,
+ 0.020044952630996704,
+ -0.024316657334566116,
+ 0.016599470749497414,
+ -0.028177347034215927,
+ -0.02992788702249527,
+ 0.04263235256075859,
+ 0.019070588052272797,
+ -0.061535418033599854,
+ 0.04981948435306549,
+ -0.0033987120259553194,
+ 0.00718599883839488,
+ -0.03489658609032631,
+ -0.008131437934935093,
+ 0.010371675714850426,
+ 0.03322061896324158,
+ 0.007498573511838913,
+ 0.004607214126735926,
+ -0.008593088947236538,
+ 0.0291622094810009,
+ 0.02543722651898861,
+ -0.01355376560240984,
+ 0.04886019974946976,
+ -0.05648789182305336,
+ -0.04414235055446625,
+ -0.02599986642599106,
+ 0.019488148391246796,
+ 0.014010048471391201,
+ -0.007373264990746975,
+ 0.0078046186827123165,
+ -0.03636636584997177,
+ 0.03340859338641167,
+ 0.007107019890099764,
+ -0.003407146781682968,
+ 0.03973040729761124,
+ 0.01737036183476448,
+ -0.003850964829325676,
+ 0.004779137670993805,
+ -0.0337333120405674,
+ 0.0153570044785738,
+ 0.036544542759656906,
+ 0.019004348665475845,
+ -0.03486310690641403,
+ -0.03902241587638855,
+ -0.013768769800662994,
+ -0.01997002400457859,
+ 0.020046543329954147,
+ -0.02271377108991146,
+ -0.04311855137348175,
+ 0.032682932913303375,
+ 0.041463062167167664,
+ -0.029412906616926193,
+ 0.010213691741228104,
+ 0.028484905138611794,
+ -0.03045361302793026,
+ 0.010688027366995811,
+ 0.035848550498485565,
+ 0.011714552529156208,
+ -0.013536714017391205,
+ 0.02713790163397789,
+ -0.00014473742339760065,
+ 0.03084109164774418,
+ -0.030508477240800858,
+ 0.06530673801898956,
+ 0.05100785568356514,
+ -0.030940134078264236,
+ 0.033357053995132446,
+ -0.054725807160139084,
+ -0.00260305218398571,
+ -0.02225552126765251,
+ 0.05710795521736145,
+ 0.00196810532361269,
+ -0.023802001029253006,
+ 0.07498680800199509,
+ 0.020297816023230553,
+ 0.016024785116314888,
+ -0.017071885988116264,
+ 0.020915204659104347,
+ 0.015491878613829613,
+ -0.02790677547454834,
+ -0.009329582564532757,
+ 0.040057919919490814,
+ 0.03444918990135193,
+ -0.05727033689618111,
+ -0.04280736297369003,
+ -0.007231739349663258,
+ 0.0172431580722332,
+ 0.02856868878006935,
+ 0.04253849759697914,
+ -0.019927380606532097,
+ 0.037158187478780746,
+ -0.03249784931540489,
+ -0.017963113263249397,
+ -0.03098241053521633,
+ -0.06010175123810768,
+ 0.06602855771780014,
+ 0.010281052440404892,
+ 0.05302505940198898,
+ -0.025599131360650063,
+ 0.004457281902432442,
+ 0.020320488139986992,
+ 0.05158695951104164,
+ -0.021216539666056633,
+ 0.0031726460438221693,
+ -0.038230475038290024,
+ -0.013272536918520927,
+ -0.014343664981424809,
+ -0.00928312074393034,
+ 0.036699824035167694,
+ -0.009234491735696793,
+ -0.021094394847750664,
+ -0.027698185294866562,
+ -0.047844890505075455,
+ 0.0005546740139834583,
+ -0.03923030570149422,
+ -0.05693022161722183,
+ 0.007966985926032066,
+ -0.018771832808852196,
+ 0.0111707067117095,
+ -0.028138797730207443,
+ 0.004706535954028368,
+ -0.01253677811473608,
+ -0.041044123470783234,
+ -0.048723507672548294,
+ -0.022999409586191177,
+ -0.03256520256400108,
+ 0.023335617035627365,
+ 0.0017396879848092794,
+ -0.01606805995106697,
+ 0.02667444571852684,
+ -0.013625547289848328,
+ -0.007681459654122591,
+ 0.01396128535270691,
+ 0.0052549997344613075,
+ 0.06146957725286484,
+ 0.03162869065999985,
+ -0.031040407717227936,
+ -0.00218845228664577,
+ 0.04268548637628555,
+ 0.03300148993730545,
+ 0.022804128006100655,
+ 0.0006237816996872425,
+ -0.030357198789715767,
+ 0.02651982754468918,
+ -0.043814290314912796,
+ -0.03970182314515114,
+ -0.03202225640416145,
+ -0.034594807773828506,
+ -0.024189993739128113,
+ -0.022050242871046066,
+ -0.015750108286738396,
+ -0.0007563169347122312,
+ -0.035107482224702835,
+ -0.006063371431082487,
+ 0.002712931716814637,
+ 0.02973623014986515,
+ 0.04305216297507286,
+ -0.020286865532398224,
+ 0.008080225437879562,
+ 0.05653354153037071,
+ 0.011405699886381626,
+ 0.016179043799638748,
+ -0.011536330915987492,
+ -0.049277883023023605,
+ -0.057610753923654556,
+ 0.002804809482768178,
+ 0.011075151152908802,
+ -0.0351228341460228,
+ -0.008501894772052765,
+ 0.0075241276063025,
+ 0.01777978241443634,
+ -0.008782519958913326,
+ 0.015514952130615711,
+ -0.027108654379844666,
+ 0.019761651754379272,
+ -0.026457469910383224,
+ 0.054352398961782455,
+ 0.03072875551879406
+ ],
+ "text": "Mastering Python for Data Science A comprehensive guide to using Python for data science projects. Topics include data manipulation, visualization, and machine learning algorithms like decision trees and neural networks."
+}
diff --git a/oak-search-elastic/src/test/resources/inferenceUsingConfig/content/yoga.json b/oak-search-elastic/src/test/resources/inferenceUsingConfig/content/yoga.json
new file mode 100644
index 0000000000..6a7a9179fa
--- /dev/null
+++ b/oak-search-elastic/src/test/resources/inferenceUsingConfig/content/yoga.json
@@ -0,0 +1,1029 @@
+{
+ "embedding": [
+ 0.020992310717701912,
+ -0.019810812547802925,
+ -0.008555477485060692,
+ -0.02689242735505104,
+ -0.051015377044677734,
+ 0.029607370495796204,
+ -0.031732864677906036,
+ -0.025765033438801765,
+ -0.03390059992671013,
+ 0.045591481029987335,
+ 0.03210284560918808,
+ -0.033030133694410324,
+ 0.031969256699085236,
+ 0.05032876878976822,
+ 0.015699543058872223,
+ 0.016214709728956223,
+ -0.018788272514939308,
+ 0.0015119315357878804,
+ -0.017489297315478325,
+ -0.03808166831731796,
+ 0.019828785210847855,
+ -0.03688770905137062,
+ -0.058778949081897736,
+ 0.0438777320086956,
+ -0.004687566310167313,
+ -0.037345126271247864,
+ 0.0027498172130435705,
+ -0.008950874209403992,
+ -0.04175897687673569,
+ 0.01874188706278801,
+ -0.021506771445274353,
+ 0.014111939817667007,
+ -0.01201037596911192,
+ -0.029284553602337837,
+ 0.046936798840761185,
+ -0.058711882680654526,
+ -0.05141674727201462,
+ -0.004093990195542574,
+ 0.045757703483104706,
+ 0.0036068817134946585,
+ 0.045199014246463776,
+ 0.012121996842324734,
+ -0.040058959275484085,
+ 0.03344060480594635,
+ 0.003114549443125725,
+ 0.0005707496893592179,
+ -0.01049262285232544,
+ -0.019330618903040886,
+ -0.022175928577780724,
+ -0.03153237700462341,
+ 0.039049889892339706,
+ -0.04597968980669975,
+ 0.05029134452342987,
+ 0.023334387689828873,
+ -0.02147350274026394,
+ -0.019783733412623405,
+ 0.018505778163671494,
+ 0.01887909322977066,
+ -0.024533003568649292,
+ 0.010412299074232578,
+ 0.06500142812728882,
+ -0.0033068018965423107,
+ 0.02275923453271389,
+ -0.015065746381878853,
+ 0.04360884055495262,
+ -0.03517736867070198,
+ 0.04801822081208229,
+ 0.017483439296483994,
+ 0.05515894293785095,
+ -0.007642668206244707,
+ -0.02623232640326023,
+ -0.03543122112751007,
+ 0.005373998545110226,
+ 0.05774468928575516,
+ 0.057655103504657745,
+ -0.006916411686688662,
+ -0.025125904008746147,
+ 0.014523887075483799,
+ 0.047840870916843414,
+ 0.041752833873033524,
+ -0.05463254079222679,
+ -0.04603331908583641,
+ -0.05931013822555542,
+ -0.017529448494315147,
+ 0.04465707764029503,
+ 0.007474655285477638,
+ 0.04130326956510544,
+ -0.014252222143113613,
+ 0.016677316278219223,
+ 0.022487139329314232,
+ 0.05952167883515358,
+ -0.025188753381371498,
+ 0.026227282360196114,
+ 0.031549081206321716,
+ -0.02521906979382038,
+ 0.006111061200499535,
+ -0.04445211589336395,
+ -0.02436392940580845,
+ 0.04455659165978432,
+ -0.035868655890226364,
+ -0.04646185040473938,
+ -0.014829814434051514,
+ -0.02052983082830906,
+ 0.0055905357003211975,
+ 0.001855365582741797,
+ -0.016729608178138733,
+ -0.016442464664578438,
+ 0.0031240310054272413,
+ -0.052341900765895844,
+ -0.015990499407052994,
+ -0.005529104731976986,
+ -0.05664985626935959,
+ -0.018000207841396332,
+ -0.04118764027953148,
+ 0.01296955905854702,
+ 0.05520010367035866,
+ 0.026995711028575897,
+ 0.008093229494988918,
+ 0.025989025831222534,
+ 0.02598777785897255,
+ 0.05454247072339058,
+ 0.019502250477671623,
+ -0.0396692119538784,
+ -0.015202668495476246,
+ -0.043279342353343964,
+ 0.03479119390249252,
+ -0.04527628794312477,
+ -0.0015821259003132582,
+ -0.001871214248239994,
+ 0.051266662776470184,
+ 0.023558322340250015,
+ -0.020165296271443367,
+ 0.008847435005009174,
+ 0.037150684744119644,
+ -0.006770801264792681,
+ 0.0832037627696991,
+ -0.04809615761041641,
+ -0.021654605865478516,
+ 0.017111821100115776,
+ 0.042106740176677704,
+ -0.035456083714962006,
+ -0.01806110329926014,
+ 0.0165155827999115,
+ 0.03694506734609604,
+ 0.012623626738786697,
+ -0.0479796938598156,
+ -0.01895057037472725,
+ -0.04791400581598282,
+ -0.0337347611784935,
+ -0.00847657397389412,
+ -0.05360022932291031,
+ -0.020295923575758934,
+ -0.0300320852547884,
+ -0.01689167506992817,
+ 0.04649040475487709,
+ -0.06523764878511429,
+ 0.01974581368267536,
+ -0.034228187054395676,
+ 0.008117208257317543,
+ 0.04221359267830849,
+ 0.040214963257312775,
+ 0.026584835723042488,
+ -0.007779886480420828,
+ -0.005736801773309708,
+ -0.0201547984033823,
+ 0.019367819651961327,
+ 0.019438503310084343,
+ -0.03607821464538574,
+ -0.0325576551258564,
+ 0.0008062406559474766,
+ -0.009360134601593018,
+ 0.02285570651292801,
+ 0.016653956845402718,
+ 0.01248457096517086,
+ 0.012649046257138252,
+ -0.02408074215054512,
+ 0.054557740688323975,
+ -0.02330772392451763,
+ 0.014066768810153008,
+ 0.0014612992526963353,
+ 0.022946948185563087,
+ 0.006449670530855656,
+ -0.06500640511512756,
+ -0.05211060494184494,
+ -0.03639901801943779,
+ 0.04975694417953491,
+ 0.024779444560408592,
+ -0.036700621247291565,
+ 0.000875841302331537,
+ -0.021154142916202545,
+ -0.011476676911115646,
+ 0.01859707199037075,
+ -0.041168566793203354,
+ 0.004474070854485035,
+ -0.04498206824064255,
+ -0.032610490918159485,
+ -0.01176445558667183,
+ 0.023726413026452065,
+ -0.008335272781550884,
+ 0.03725259751081467,
+ 0.016432689502835274,
+ 0.017060747370123863,
+ -0.011069034226238728,
+ 0.021587492898106575,
+ -0.005168224219232798,
+ 0.010186281986534595,
+ -0.012589122168719769,
+ 0.017911307513713837,
+ -0.019396739080548286,
+ 0.020756693556904793,
+ 0.011587392538785934,
+ -0.008377622812986374,
+ -0.009590052999556065,
+ -0.036625538021326065,
+ -0.02330899052321911,
+ -0.012045773677527905,
+ 0.0413825698196888,
+ -0.0019527990370988846,
+ -0.020873816683888435,
+ 0.014968154020607471,
+ -0.03645126521587372,
+ 0.03940156474709511,
+ 0.007773702964186668,
+ -0.059047192335128784,
+ 0.015064846724271774,
+ -0.013533253222703934,
+ 0.006838950328528881,
+ 0.01479379739612341,
+ 0.01780756562948227,
+ -0.020653406158089638,
+ 0.01194703858345747,
+ 0.020565936341881752,
+ -0.02525860071182251,
+ -0.05902281776070595,
+ -0.019252192229032516,
+ -0.01173371635377407,
+ 0.023214135318994522,
+ -0.016369560733437538,
+ 0.004617268685251474,
+ 0.033142343163490295,
+ 0.0378185510635376,
+ 0.017517006024718285,
+ 0.02327578328549862,
+ -0.018034812062978745,
+ 0.02320043370127678,
+ 0.045719392597675323,
+ -0.00275593064725399,
+ -0.0011035329662263393,
+ -0.010116618126630783,
+ 0.07023153454065323,
+ -0.0021964169573038816,
+ 0.02564835734665394,
+ -0.02490389347076416,
+ -0.032808322459459305,
+ -0.016007013618946075,
+ 0.01718156598508358,
+ 0.0506831631064415,
+ -0.06287461519241333,
+ 0.006847928743809462,
+ 0.03756793960928917,
+ 0.0021272965241223574,
+ -0.07415736466646194,
+ -0.013933155685663223,
+ -0.06067856028676033,
+ -0.04178066924214363,
+ 0.012133668176829815,
+ -0.006318623665720224,
+ -0.02393217571079731,
+ 0.07017601281404495,
+ -0.023373859003186226,
+ 0.007427913136780262,
+ 0.016532592475414276,
+ 0.055086709558963776,
+ -0.03637049347162247,
+ -0.04970236122608185,
+ -0.002158180344849825,
+ 0.011295094154775143,
+ -0.01066037267446518,
+ 0.017707275226712227,
+ 0.014132059179246426,
+ 0.02742573991417885,
+ 0.01421886682510376,
+ 0.004902857821434736,
+ 0.008742204867303371,
+ -0.009799433872103691,
+ 0.015595711767673492,
+ -0.047036945819854736,
+ 0.01952502503991127,
+ 0.03231792151927948,
+ -0.004971708171069622,
+ -0.03846670687198639,
+ -0.004967805929481983,
+ 0.05509384721517563,
+ -0.036376550793647766,
+ -0.02642141282558441,
+ 0.0123558659106493,
+ 0.005152835510671139,
+ 0.056073445826768875,
+ 0.027080649510025978,
+ 0.027631772682070732,
+ 0.048138946294784546,
+ -0.0025295978412032127,
+ -0.06499685347080231,
+ -0.020412907004356384,
+ -0.026351867243647575,
+ -0.039807919412851334,
+ 0.021429188549518585,
+ -0.0336359478533268,
+ 0.03859623894095421,
+ 0.002181579591706395,
+ -0.026472369208931923,
+ -0.03903269022703171,
+ -0.04129071533679962,
+ -0.029639294371008873,
+ -0.051180627197027206,
+ -0.0025085671804845333,
+ -0.03959193453192711,
+ 0.02936726063489914,
+ -0.011056952178478241,
+ -0.018849100917577744,
+ 0.048608243465423584,
+ -0.004126954358071089,
+ -0.047918058931827545,
+ -0.011086659505963326,
+ -0.02288651280105114,
+ 0.027981499210000038,
+ -0.041671738028526306,
+ 0.0009494168334640563,
+ 0.002010507043451071,
+ -0.010240737348794937,
+ -0.014394578523933887,
+ 0.014910243451595306,
+ 0.026874326169490814,
+ 0.0062706200405955315,
+ -0.03375938907265663,
+ -0.06499370187520981,
+ -0.024024726822972298,
+ -0.03534166142344475,
+ 0.02664712816476822,
+ 0.01614595577120781,
+ 0.06994540244340897,
+ 0.04546000808477402,
+ -0.05747450888156891,
+ -0.0537356436252594,
+ -0.0025898453313857317,
+ 0.0177296232432127,
+ 0.040813300758600235,
+ 0.02244442142546177,
+ 0.03664938732981682,
+ 0.02485172636806965,
+ 0.021681008860468864,
+ 0.030123446136713028,
+ -0.04293845221400261,
+ -0.0027580498717725277,
+ -0.03339323401451111,
+ -0.01824469305574894,
+ 0.03042185679078102,
+ -0.03630618378520012,
+ 0.0424363948404789,
+ 0.024158509448170662,
+ 0.053861163556575775,
+ -0.005262990947812796,
+ 0.030166491866111755,
+ 0.0043996418826282024,
+ -0.00015913433162495494,
+ -0.06197434663772583,
+ 0.026378974318504333,
+ -0.025490351021289825,
+ -0.011013045907020569,
+ 0.04668790474534035,
+ -0.004451760556548834,
+ 0.015869364142417908,
+ 0.018305497244000435,
+ -0.02970142848789692,
+ -0.031923577189445496,
+ -0.03763769567012787,
+ 0.04817777872085571,
+ 0.03685698285698891,
+ 0.028817862272262573,
+ -0.02119080349802971,
+ 0.009463709779083729,
+ 0.03122728504240513,
+ 0.010759728960692883,
+ -0.04213874042034149,
+ -0.010765520855784416,
+ 0.006512054242193699,
+ 0.0010088291019201279,
+ 0.011855440214276314,
+ 0.03158966451883316,
+ -0.03897679224610329,
+ 0.011807850562036037,
+ -0.024881448596715927,
+ 0.04326508194208145,
+ -0.021913522854447365,
+ 0.006321598310023546,
+ -0.018968775868415833,
+ -0.0210884939879179,
+ -0.03845687955617905,
+ 0.03029424510896206,
+ 0.007845963351428509,
+ 0.05363703519105911,
+ 0.04089144989848137,
+ -0.005213279277086258,
+ 0.0078122238628566265,
+ -0.03918507322669029,
+ -0.028955550864338875,
+ 0.05279293656349182,
+ 0.01764778420329094,
+ 0.017631033435463905,
+ -0.017406368628144264,
+ -0.026883592829108238,
+ 0.058915045112371445,
+ 0.004581992514431477,
+ 0.03342510759830475,
+ 0.0010508190607652068,
+ -0.010454186238348484,
+ -0.02055901288986206,
+ -0.03609667345881462,
+ -0.01797252707183361,
+ -0.003862053854390979,
+ 0.011742964386940002,
+ 0.0063950056210160255,
+ -0.011330435052514076,
+ -0.030107587575912476,
+ 0.034675173461437225,
+ 0.018918002024292946,
+ -0.03137718886137009,
+ -0.0355849452316761,
+ 0.01653927005827427,
+ -0.036125995218753815,
+ 0.04798669368028641,
+ -0.060212090611457825,
+ -0.031371425837278366,
+ -0.04846205934882164,
+ 0.012842458672821522,
+ -0.018125712871551514,
+ 0.006929065100848675,
+ 0.0037817037664353848,
+ 0.012825202196836472,
+ -0.034750405699014664,
+ 0.042365532368421555,
+ 0.03755393624305725,
+ -0.004872753284871578,
+ 0.001039015711285174,
+ 0.019190330058336258,
+ -0.015612006187438965,
+ -0.01797090843319893,
+ 0.007818024605512619,
+ -0.053999148309230804,
+ 0.02322675846517086,
+ 0.02783169224858284,
+ 0.0009725038544274867,
+ 0.02784453146159649,
+ -0.008754008449614048,
+ -0.023232847452163696,
+ -0.020641328766942024,
+ -0.02216341346502304,
+ -0.007685513701289892,
+ -0.008407103829085827,
+ 0.006099897902458906,
+ -0.02349197119474411,
+ -0.013877450488507748,
+ 0.08851771801710129,
+ -0.022351127117872238,
+ -0.01708231307566166,
+ -0.005673834588378668,
+ 0.04240942746400833,
+ 0.038873039186000824,
+ -0.02219207212328911,
+ 0.03222227841615677,
+ -0.020418033003807068,
+ -0.03377582132816315,
+ 0.02511352300643921,
+ 0.028608642518520355,
+ -0.051078613847494125,
+ 0.061507321894168854,
+ 0.005996344145387411,
+ 0.01909792795777321,
+ 0.02881663665175438,
+ 0.025501452386379242,
+ -0.002208553720265627,
+ -0.031192362308502197,
+ 0.009186259470880032,
+ 0.052962157875299454,
+ -0.04179609566926956,
+ 0.016803817823529243,
+ -0.057858023792505264,
+ -0.035267606377601624,
+ 0.036276254802942276,
+ -0.021989721804857254,
+ -0.0321507565677166,
+ 0.019191769883036613,
+ 0.039777643978595734,
+ -0.0031662434339523315,
+ 0.018030280247330666,
+ -0.010963697917759418,
+ -0.028909683227539062,
+ 0.04240647703409195,
+ -0.0047376761212944984,
+ -0.05088339373469353,
+ 0.06254982203245163,
+ -0.05349881574511528,
+ 0.01786353439092636,
+ 0.03439322113990784,
+ -0.022931024432182312,
+ 0.05573752894997597,
+ -0.025004087015986443,
+ 0.02628128044307232,
+ -0.03127956762909889,
+ 0.02297876589000225,
+ 0.002168593229725957,
+ -0.033282168209552765,
+ -0.0339161679148674,
+ 0.04735356196761131,
+ 0.03214119002223015,
+ 0.01681734248995781,
+ 0.03459779545664787,
+ 0.018111176788806915,
+ 0.034125205129384995,
+ 0.00413436209782958,
+ -0.030537543818354607,
+ -0.009395353496074677,
+ 0.026448797434568405,
+ -0.0005122807924635708,
+ -0.01068615261465311,
+ -0.005634923465549946,
+ 0.06972319632768631,
+ 0.026585634797811508,
+ -0.03712192550301552,
+ -0.0046284687705338,
+ 0.01796017773449421,
+ 0.06569729745388031,
+ -0.03572508320212364,
+ -0.0018606220837682486,
+ -0.012824264355003834,
+ 0.020121490582823753,
+ -0.036875635385513306,
+ -0.024250464513897896,
+ -0.030999312177300453,
+ 0.031805042177438736,
+ -0.03652548789978027,
+ -0.0067516532726585865,
+ 0.056635551154613495,
+ 0.006289470475167036,
+ -0.0191222932189703,
+ -0.019455306231975555,
+ -0.03700770437717438,
+ 0.0022283876314759254,
+ 0.017115235328674316,
+ -0.009190731681883335,
+ 0.024754300713539124,
+ -0.015842393040657043,
+ -0.041629061102867126,
+ -0.037973228842020035,
+ -0.04367559030652046,
+ 0.05963156744837761,
+ -0.06885320693254471,
+ 0.022315585985779762,
+ 0.023387029767036438,
+ -0.030196160078048706,
+ 0.032081905752420425,
+ 0.006974242627620697,
+ 0.0700346827507019,
+ 0.016542762517929077,
+ 0.016135798767209053,
+ 0.04729026183485985,
+ -0.008689078502357006,
+ -0.00984620675444603,
+ -0.03602338582277298,
+ 0.0394238606095314,
+ 0.0001279467687709257,
+ -0.01866074465215206,
+ 0.02853294275701046,
+ 0.01621515117585659,
+ -0.02722356840968132,
+ -0.013496341183781624,
+ 0.009781003929674625,
+ 0.01671942137181759,
+ 0.059200137853622437,
+ -0.045584749430418015,
+ 0.013221204280853271,
+ -0.04564014449715614,
+ 0.04314253479242325,
+ -0.005876834504306316,
+ -0.0074445209465920925,
+ 0.0016801361925899982,
+ -0.013416251167654991,
+ -0.03672681748867035,
+ 0.018078478053212166,
+ -0.01523362286388874,
+ 0.028299208730459213,
+ 0.026166409254074097,
+ 0.007042955607175827,
+ -0.04015996307134628,
+ 0.0010727872140705585,
+ -0.040677759796381,
+ 0.022412078455090523,
+ -0.03553687781095505,
+ 0.002308034570887685,
+ -0.0008447699365206063,
+ 0.04756293073296547,
+ -0.008674928918480873,
+ -0.001582630560733378,
+ -0.028162214905023575,
+ 0.034250810742378235,
+ -0.028929658234119415,
+ 0.02139946073293686,
+ 0.041981291025877,
+ -0.028271101415157318,
+ 0.016045158728957176,
+ -0.015237582847476006,
+ 0.041561026126146317,
+ 0.018242044374346733,
+ -0.0010118637001141906,
+ -0.041706789284944534,
+ 0.044553421437740326,
+ -0.012433742173016071,
+ 0.0028574515599757433,
+ 0.04387294128537178,
+ 0.0329708456993103,
+ -0.03987952321767807,
+ 0.010082106105983257,
+ 0.04925484210252762,
+ 0.07165532559156418,
+ -0.0043486482463777065,
+ -0.040214769542217255,
+ 0.025079192593693733,
+ -0.022617045789957047,
+ 0.03226373344659805,
+ 0.023140760138630867,
+ 0.039198730140924454,
+ -0.03604189679026604,
+ -0.03833604231476784,
+ 0.037420861423015594,
+ -0.05259586498141289,
+ -0.014602611772716045,
+ -0.011839642189443111,
+ -0.0019898831378668547,
+ 0.02048194594681263,
+ 0.02290831319987774,
+ 0.009846166707575321,
+ 0.029309405013918877,
+ -0.03132780268788338,
+ 0.01196348387748003,
+ -0.03476468473672867,
+ 0.017891207709908485,
+ -0.012093998491764069,
+ -0.04889311268925667,
+ 0.022037364542484283,
+ -0.036828868091106415,
+ -0.03166498243808746,
+ 0.05113424360752106,
+ 0.0037225105334073305,
+ -0.024320438504219055,
+ 0.05734077841043472,
+ 0.024418100714683533,
+ 0.04222729057073593,
+ 0.005660811439156532,
+ -0.0015303159598261118,
+ 0.01564941555261612,
+ 0.01720276288688183,
+ 0.036064568907022476,
+ 0.011880486272275448,
+ 0.005269729066640139,
+ 0.019973179325461388,
+ 0.11796209216117859,
+ -0.011423386633396149,
+ 0.02770427241921425,
+ -0.03028806485235691,
+ 0.028214525431394577,
+ 0.06458497792482376,
+ 0.0036400954704731703,
+ 0.020350441336631775,
+ -0.012076164595782757,
+ 0.04840916767716408,
+ 0.07551703602075577,
+ 0.03141813352704048,
+ 0.041468195617198944,
+ 0.008067361079156399,
+ -0.043159034103155136,
+ 0.030025076121091843,
+ 0.027553409337997437,
+ -0.03357034921646118,
+ -0.04749473184347153,
+ -0.023782849311828613,
+ 0.009829884395003319,
+ 0.019902514293789864,
+ -0.020567450672388077,
+ 0.00707509508356452,
+ 0.037776246666908264,
+ 0.01968185044825077,
+ 0.003077802248299122,
+ -0.04541405290365219,
+ -0.0005477833328768611,
+ 0.04938692972064018,
+ 0.014448881149291992,
+ 0.04298634082078934,
+ -0.052622582763433456,
+ -0.012987294234335423,
+ -0.017875658348202705,
+ -0.05048677697777748,
+ 0.014453436248004436,
+ 0.045293260365724564,
+ -0.003481828374788165,
+ -0.00841698981821537,
+ 0.015582534484565258,
+ 0.04926538094878197,
+ -0.02792881242930889,
+ 0.004221750423312187,
+ 0.04975368455052376,
+ 0.0011076077353209257,
+ 0.00932308565825224,
+ -0.025741636753082275,
+ 0.02436871826648712,
+ 0.026582662016153336,
+ 0.027237821370363235,
+ -0.003454032586887479,
+ -0.02998754009604454,
+ 0.04261031001806259,
+ -0.020338615402579308,
+ -0.0034757035318762064,
+ 0.03293853625655174,
+ 0.017479224130511284,
+ -0.004163028206676245,
+ -0.025723891332745552,
+ -0.03190845996141434,
+ 0.030286863446235657,
+ 0.02967004105448723,
+ 0.05491545796394348,
+ -0.06663131713867188,
+ -0.06911858171224594,
+ 0.026215843856334686,
+ 0.02306574396789074,
+ 0.027937546372413635,
+ -0.01491303090006113,
+ 0.032326120883226395,
+ -0.039488546550273895,
+ -0.002373166847974062,
+ 0.003379598492756486,
+ -0.005229242146015167,
+ -0.027237575501203537,
+ -0.008283481001853943,
+ 0.003511203685775399,
+ -0.023031452670693398,
+ -0.012688965536653996,
+ -0.004786597564816475,
+ 0.012631857767701149,
+ -0.01571495458483696,
+ -0.017840562388300896,
+ 0.02987404726445675,
+ -0.016948778182268143,
+ -0.021009113639593124,
+ 0.019202902913093567,
+ -0.0068177576176822186,
+ -0.03634059429168701,
+ -0.048686716705560684,
+ -0.0009184505906887352,
+ -0.008908199146389961,
+ 0.025377478450536728,
+ -0.04217507317662239,
+ 0.029787577688694,
+ 0.015939772129058838,
+ 0.01820206642150879,
+ -0.009157600812613964,
+ 0.03650521859526634,
+ 0.03712477907538414,
+ 0.07001078873872757,
+ 0.003438391024246812,
+ 0.01743343658745289,
+ -0.03104430064558983,
+ -0.05015125870704651,
+ 0.02723521925508976,
+ -0.01835300587117672,
+ 0.03559057414531708,
+ -0.029887929558753967,
+ 0.04290785640478134,
+ 0.018348155543208122,
+ 0.017238670960068703,
+ 0.03365543484687805,
+ 0.003242567414417863,
+ 0.015491815283894539,
+ -0.01587258093059063,
+ -0.03865831345319748,
+ 0.019878830760717392,
+ 0.06886977702379227,
+ 0.005738141946494579,
+ -0.002046016277745366,
+ 0.03686349838972092,
+ 0.01805647276341915,
+ -0.0057465685531497,
+ 0.015761375427246094,
+ 0.014737879857420921,
+ -0.008064516820013523,
+ -0.045308709144592285,
+ -0.026169421151280403,
+ 0.02271377295255661,
+ -0.0033386473078280687,
+ -0.03903569281101227,
+ -0.05350226163864136,
+ -0.02428816817700863,
+ 0.038438063114881516,
+ 0.06820207089185715,
+ -0.009536964818835258,
+ -0.010201461613178253,
+ 0.026066185906529427,
+ -0.06996528059244156,
+ -0.018415531143546104,
+ -0.02254313975572586,
+ -0.045946262776851654,
+ 0.01919437013566494,
+ -0.0033008968457579613,
+ -0.015646405518054962,
+ 0.03164587914943695,
+ 0.03804118558764458,
+ 0.028002427890896797,
+ 0.007000003941357136,
+ -0.01030210591852665,
+ -0.01899794116616249,
+ 0.01530375238507986,
+ 0.005181475542485714,
+ 0.018112966790795326,
+ 0.052141718566417694,
+ -0.013095319271087646,
+ 0.004625051748007536,
+ 0.01991475746035576,
+ 0.026282992213964462,
+ 0.017773423343896866,
+ -0.043193113058805466,
+ -0.0004982617683708668,
+ -0.058369990438222885,
+ -0.053474556654691696,
+ -0.056592658162117004,
+ -0.04483556002378464,
+ 0.015000899322330952,
+ -0.013813231140375137,
+ 0.009133127517998219,
+ -0.0008316689054481685,
+ -0.03985271975398064,
+ -0.009893741458654404,
+ 0.03324472904205322,
+ 0.018297433853149414,
+ -0.009792327880859375,
+ -0.045606739819049835,
+ -0.009558561258018017,
+ 0.0521492063999176,
+ 0.030695781111717224,
+ 0.012731743976473808,
+ -0.018894417211413383,
+ -0.0009353134082630277,
+ 0.03091578185558319,
+ -0.01870468445122242,
+ -0.03777693212032318,
+ 0.04161347448825836,
+ 0.024907158687710762,
+ -0.03560548275709152,
+ 0.03629418462514877,
+ 0.011816619895398617,
+ -0.041870467364788055,
+ -0.021533949300646782,
+ -0.0013687838800251484,
+ 0.011840137653052807,
+ 0.028973504900932312,
+ 0.006075030658394098,
+ 0.010218358598649502,
+ -0.00717976875603199,
+ 0.019145475700497627,
+ -0.009786246344447136,
+ -0.0015522097237408161,
+ 0.01888095773756504,
+ -0.0667111724615097,
+ -0.0021740496158599854,
+ -0.014083672314882278,
+ 0.05413685739040375,
+ -0.002548150485381484,
+ -0.017075005918741226,
+ -0.02480500377714634,
+ -0.033397264778614044,
+ 0.038017090409994125,
+ 0.01899118348956108,
+ 0.034838270395994186,
+ 0.03312445804476738,
+ -0.0032618714030832052,
+ -0.0025390980299562216,
+ 0.0013416367582976818,
+ -0.025394197553396225,
+ -0.0017937736120074987,
+ 0.012352990917861462,
+ 0.00011750891280826181,
+ -0.028166264295578003,
+ -0.044746361672878265,
+ -0.020947443321347237,
+ -0.011038880795240402,
+ 0.008696573786437511,
+ -0.037024639546871185,
+ -0.03823044151067734,
+ 0.02309495210647583,
+ 0.006559938658028841,
+ -0.028654741123318672,
+ 0.020334767177700996,
+ 0.017888249829411507,
+ -0.016491999849677086,
+ 0.001588210929185152,
+ 0.0584186352789402,
+ -0.02937909960746765,
+ 0.006470422260463238,
+ 0.017811061814427376,
+ -0.012277420610189438,
+ 0.05231226235628128,
+ -0.029822666198015213,
+ 0.00612006988376379,
+ 0.06361209601163864,
+ 0.023174695670604706,
+ 0.022729696705937386,
+ -0.026237862184643745,
+ 0.007975582033395767,
+ -0.0338936373591423,
+ 0.02897641994059086,
+ -0.036642905324697495,
+ -0.019797466695308685,
+ 0.03611040115356445,
+ 0.024851901456713676,
+ 0.019366025924682617,
+ -0.03371749073266983,
+ 0.03482850268483162,
+ -0.002896050224080682,
+ -0.01171152200549841,
+ -0.004530704580247402,
+ -0.006347808986902237,
+ 0.04473191127181053,
+ -0.0266600139439106,
+ -0.03965930640697479,
+ -0.0215714480727911,
+ 0.029908381402492523,
+ 0.006655621808022261,
+ 0.0498318187892437,
+ 0.010434562340378761,
+ 0.039523083716630936,
+ -0.011847570538520813,
+ -0.011880774050951004,
+ -0.04177793115377426,
+ -0.04401281103491783,
+ 0.04687357693910599,
+ 0.02031930722296238,
+ 0.03183356299996376,
+ -0.021965568885207176,
+ -0.0029072677716612816,
+ 0.04317833110690117,
+ 0.03313190117478371,
+ -0.038264065980911255,
+ -0.012788742780685425,
+ -0.011508814990520477,
+ 0.03975296765565872,
+ -0.010370629839599133,
+ 0.004071866162121296,
+ 0.03090120293200016,
+ 0.050059616565704346,
+ -0.012987805530428886,
+ -0.015933122485876083,
+ -0.056250978261232376,
+ -0.0027893006335943937,
+ -0.019153883680701256,
+ -0.0496102012693882,
+ 0.03510470315814018,
+ -0.012083667330443859,
+ 0.04007614403963089,
+ -0.03251294419169426,
+ 0.01628280058503151,
+ -0.034797318279743195,
+ -0.03376937285065651,
+ -0.04467538371682167,
+ -0.03143265098333359,
+ -0.018236109986901283,
+ 0.043751705437898636,
+ 0.034650303423404694,
+ -0.03764117509126663,
+ 0.006402295548468828,
+ -0.05497357249259949,
+ -0.01441817544400692,
+ -0.00047259824350476265,
+ 0.04961751028895378,
+ 0.0814298689365387,
+ 0.0044378722086548805,
+ -0.057371772825717926,
+ -0.027731839567422867,
+ 0.029612785205245018,
+ 0.0603141151368618,
+ 0.015963004902005196,
+ -0.026588471606373787,
+ -0.031132761389017105,
+ 0.006481925956904888,
+ -0.04879101365804672,
+ -0.024503028020262718,
+ -0.03183089569211006,
+ -0.04524398222565651,
+ -0.0524555929005146,
+ -0.019169479608535767,
+ 0.023717660456895828,
+ -0.0024877088144421577,
+ -0.039920009672641754,
+ -0.021579299122095108,
+ 0.022028395906090736,
+ 0.02119077742099762,
+ 0.02779645472764969,
+ -0.019251255318522453,
+ 0.005475660786032677,
+ 0.014101501554250717,
+ -0.009786540642380714,
+ 0.026064300909638405,
+ -0.03428436443209648,
+ -0.06302846968173981,
+ -0.04705403745174408,
+ -0.009122544899582863,
+ 0.028599688783288002,
+ -0.03546217828989029,
+ 0.02090013027191162,
+ -0.013645217753946781,
+ 0.012871388345956802,
+ 0.06388923525810242,
+ 0.0393972173333168,
+ -0.03325172886252403,
+ 0.02147791162133217,
+ -0.03870197758078575,
+ 0.02538560889661312,
+ 0.015387286432087421
+ ],
+ "text": "Yoga for Mental Wellness The benefits of yoga for mental health are vast. This study shows how practicing yoga can reduce stress, anxiety, and improve overall well-being through breathing techniques and meditation."
+}
diff --git a/oak-search-elastic/src/test/resources/inferenceUsingConfig/queries/a_beginner_guide_to_data_manipulation_in_python.json b/oak-search-elastic/src/test/resources/inferenceUsingConfig/queries/a_beginner_guide_to_data_manipulation_in_python.json
new file mode 100644
index 0000000000..d0782794d4
--- /dev/null
+++ b/oak-search-elastic/src/test/resources/inferenceUsingConfig/queries/a_beginner_guide_to_data_manipulation_in_python.json
@@ -0,0 +1,1040 @@
+{
+ "object": "list",
+ "data": [
+ {
+ "object": "embedding",
+ "embedding": [
+ 0.017071176,
+ -0.029778784,
+ 0.005795979,
+ -0.006171367,
+ -0.031608548,
+ 0.023849612,
+ -0.027471699,
+ -0.039960563,
+ -0.060349558,
+ -1.3516062E-4,
+ 0.034692958,
+ -0.03091059,
+ 0.030295152,
+ 0.02166451,
+ 0.023252796,
+ 0.012960172,
+ 0.009781238,
+ -0.011354545,
+ 0.034855332,
+ -0.029914746,
+ 0.014321433,
+ -0.03804331,
+ -0.0072760954,
+ 0.032035716,
+ -0.03198769,
+ -0.01193682,
+ -0.028151527,
+ -0.015397255,
+ -0.0685307,
+ 0.01188367,
+ 0.02601414,
+ -0.025861882,
+ 0.014161941,
+ -0.031283565,
+ 0.04623378,
+ 0.0037829475,
+ -0.027000254,
+ -0.055207185,
+ 0.028407825,
+ 0.003534767,
+ -0.01267326,
+ 0.044307195,
+ -0.021235052,
+ 0.05504601,
+ 0.0121600395,
+ 0.01980917,
+ -0.013769113,
+ 0.021557534,
+ -0.020358302,
+ -0.025417749,
+ 0.041289337,
+ -0.015265342,
+ 0.033450585,
+ 0.038499825,
+ -0.031763192,
+ 0.021276915,
+ 0.013575723,
+ 0.015106397,
+ -0.0346885,
+ -0.013311921,
+ 0.026043242,
+ -0.0050180512,
+ -0.0053724004,
+ -0.0070083933,
+ 0.03829171,
+ -0.05028227,
+ -0.0011828474,
+ 0.025280187,
+ 0.0028818322,
+ 0.024516221,
+ -0.020283353,
+ -0.043311168,
+ 0.040678922,
+ 0.05122021,
+ 0.033659633,
+ -0.016423687,
+ -0.027884485,
+ 0.022629391,
+ 0.031556513,
+ 0.024870526,
+ -0.035926837,
+ -0.0076517886,
+ -0.011356047,
+ -0.013727169,
+ 0.0010092275,
+ -0.024199225,
+ -0.010540861,
+ -0.0037903385,
+ 0.03681307,
+ -7.9091557E-4,
+ 0.028128391,
+ -0.03544994,
+ 0.008774077,
+ 0.004603179,
+ -0.03787352,
+ -0.015881129,
+ -0.021258144,
+ -0.005117375,
+ -0.011453226,
+ -0.014893126,
+ -0.028578503,
+ -0.06035009,
+ -0.04368418,
+ 0.051941108,
+ -0.021609934,
+ -0.0514945,
+ -0.022379175,
+ 0.0013541128,
+ -0.03499152,
+ -0.030095126,
+ -0.021883529,
+ -0.025996424,
+ -0.029248368,
+ -0.022122199,
+ -0.019643089,
+ 0.05189314,
+ 0.030150706,
+ -0.055989143,
+ 0.020240277,
+ 0.03378501,
+ 0.03820909,
+ -0.0029407463,
+ -0.015945343,
+ -0.008375164,
+ -0.03294703,
+ 0.011952227,
+ -0.0097966,
+ -0.020957695,
+ 0.036809087,
+ 0.06567855,
+ 0.008150675,
+ -0.036477152,
+ 0.02442884,
+ 0.0057380213,
+ 0.048884925,
+ 0.08029381,
+ -0.042019963,
+ -0.047818862,
+ -0.0043861363,
+ 0.011782369,
+ -0.04072415,
+ -0.03939282,
+ 0.04415353,
+ 0.023972193,
+ 0.01846804,
+ -0.028625442,
+ -0.017156778,
+ -0.019806633,
+ -0.087923475,
+ -0.05562889,
+ -0.047921237,
+ -0.021489372,
+ -0.040631812,
+ 0.005688095,
+ 0.03896248,
+ -0.03761468,
+ 0.0050721327,
+ -0.030895174,
+ -0.0067289425,
+ 0.0015949196,
+ 0.013237975,
+ 0.014097197,
+ 0.0046646106,
+ 0.063977815,
+ 0.03294465,
+ -0.0025841764,
+ 0.033699036,
+ 0.0038010401,
+ 0.025296597,
+ 0.011702247,
+ -0.009543705,
+ 0.021533886,
+ -0.01473401,
+ 0.008077386,
+ 0.029878996,
+ -0.0141558265,
+ 0.04948739,
+ -0.035266563,
+ 0.037325017,
+ 0.021572318,
+ 0.004194931,
+ -1.4937324E-4,
+ -0.037369546,
+ -0.02440755,
+ -0.04328252,
+ 0.038004007,
+ 0.048558034,
+ -0.03993425,
+ -0.0054775695,
+ -0.062725,
+ -0.014155701,
+ -0.037786067,
+ -0.034792703,
+ 0.032175694,
+ -0.016536528,
+ -0.029058043,
+ -0.0059018037,
+ -0.008505584,
+ -0.01722823,
+ 0.042982657,
+ 0.039963037,
+ -0.0013315724,
+ -0.036116038,
+ -0.024497595,
+ -0.017073633,
+ 0.04807145,
+ 0.012231074,
+ 0.03961387,
+ -0.07830001,
+ 0.028109219,
+ 0.03625077,
+ -0.0065792426,
+ 0.022567855,
+ -0.012636492,
+ -0.010271949,
+ 0.0236033,
+ 0.027886836,
+ 0.011846279,
+ 0.0012332122,
+ -0.0071306857,
+ -0.066285335,
+ 0.007894073,
+ 0.043336052,
+ -0.017888999,
+ 0.010622046,
+ -0.010138214,
+ -0.017753119,
+ 0.03408772,
+ 0.031302676,
+ 0.0015529407,
+ 0.028739173,
+ 0.03635227,
+ -0.034117065,
+ -0.024072202,
+ -0.008968471,
+ -0.04598891,
+ 0.037509296,
+ -0.0621676,
+ 0.039144732,
+ 0.029730724,
+ 0.00870556,
+ 0.046465885,
+ 0.013592537,
+ -0.013509971,
+ 0.027084138,
+ 0.04315327,
+ 0.031967245,
+ 0.027197093,
+ 0.017342603,
+ 0.043892566,
+ 0.0036043157,
+ -0.006115979,
+ -0.018038196,
+ -0.015244436,
+ -0.022670442,
+ -0.007478198,
+ 0.036059912,
+ -0.01158977,
+ -0.0032750305,
+ 0.027943926,
+ 0.026193773,
+ -0.06693457,
+ -0.01157642,
+ 0.0076924944,
+ -0.015508768,
+ -0.024730977,
+ 0.01838084,
+ -0.005188448,
+ 0.06543828,
+ -0.029770067,
+ 0.015760452,
+ 0.043638658,
+ 0.0142427,
+ -0.050165746,
+ -0.0029081907,
+ -0.0035732356,
+ -0.053413656,
+ -0.006609703,
+ -0.0038473518,
+ 0.0030384574,
+ 0.021276956,
+ 0.042662602,
+ 0.034207284,
+ 0.04163301,
+ -0.033391498,
+ 0.024184031,
+ -2.4205288E-5,
+ 0.018954355,
+ 0.044020288,
+ 0.018235797,
+ -6.0187547E-5,
+ -0.013935861,
+ 0.08153687,
+ -0.009167368,
+ -0.023604231,
+ 0.034752958,
+ -0.04713846,
+ 0.010203857,
+ 0.031586163,
+ -0.011340168,
+ 0.06548139,
+ -0.0024367422,
+ -0.047949784,
+ -0.031682163,
+ -0.0079360865,
+ -0.027677227,
+ 0.015449409,
+ -0.049029633,
+ 0.032734934,
+ -0.0071184374,
+ -0.014273429,
+ -0.043835666,
+ -0.049451955,
+ -0.020033173,
+ -0.027171219,
+ -2.3063718E-4,
+ -0.026342653,
+ 0.0161911,
+ 0.027025726,
+ -0.0068859593,
+ 0.041257747,
+ -0.009133007,
+ -0.038593866,
+ -0.010867861,
+ -0.043008927,
+ 0.011808341,
+ -0.02083458,
+ 0.01163081,
+ -0.0056589097,
+ -0.039186954,
+ -0.05921683,
+ -0.018198838,
+ 0.044725038,
+ 0.030056842,
+ 0.005816412,
+ -0.0114885075,
+ -0.021402555,
+ -0.005299011,
+ 0.03395016,
+ 0.011069755,
+ 0.03728839,
+ 0.025235116,
+ 0.0050131604,
+ -0.03705952,
+ 0.016275346,
+ 0.03190031,
+ 0.055026505,
+ 0.010789491,
+ 0.034958806,
+ 0.025190612,
+ 0.046475697,
+ 0.014780986,
+ 0.018156687,
+ -0.07416904,
+ -0.037767515,
+ -0.012500201,
+ 0.03224213,
+ -0.048106145,
+ 0.009017145,
+ 0.05437965,
+ 0.07354786,
+ -0.017710218,
+ 0.05203235,
+ -0.010284547,
+ -0.033599675,
+ -0.0670495,
+ 7.066586E-4,
+ -0.013633895,
+ 0.0061872634,
+ 0.0082585905,
+ -0.017966503,
+ 0.018784715,
+ -0.010595975,
+ -0.027546132,
+ -0.04281158,
+ -0.00611182,
+ 0.04097851,
+ 0.05770127,
+ 0.03156053,
+ -0.0022292046,
+ 0.031587657,
+ 0.041763905,
+ -0.007041228,
+ -0.02271761,
+ -0.025769792,
+ 0.0086720595,
+ -0.0042227744,
+ -0.026751816,
+ -0.015801575,
+ -0.049552992,
+ -0.02693154,
+ -0.06354534,
+ 0.040137462,
+ -0.039449118,
+ -0.011401451,
+ -0.013346719,
+ 0.024573093,
+ -0.027755985,
+ 0.04098838,
+ 0.03293614,
+ 0.052254643,
+ 0.05260614,
+ 0.019699877,
+ 3.0132494E-4,
+ -0.03588823,
+ -0.0147722475,
+ 0.04647149,
+ 0.05357719,
+ 0.009729171,
+ -0.018883498,
+ -0.030750636,
+ 0.012038908,
+ 0.025398362,
+ 0.0064122826,
+ -0.035858255,
+ 0.017816547,
+ 0.008194801,
+ -0.008232994,
+ -0.04572939,
+ -0.005400539,
+ -0.013162114,
+ 0.0022326529,
+ -0.013374395,
+ -0.025772022,
+ 0.034528922,
+ -0.014303558,
+ -0.0045412695,
+ -0.03051481,
+ -0.0069821426,
+ -0.04850284,
+ 0.05215424,
+ -0.036036175,
+ -0.010553233,
+ -0.024130795,
+ 0.0391718,
+ -0.029228983,
+ 0.027656844,
+ 0.010294394,
+ 0.033603873,
+ -0.009336453,
+ 0.033665396,
+ 0.04293462,
+ -0.008331505,
+ -0.028116947,
+ 0.013011769,
+ -0.035406105,
+ -0.0074188546,
+ -0.013112233,
+ -0.016755097,
+ 0.04732318,
+ 0.049039043,
+ -0.032938994,
+ 0.042251095,
+ -0.023833059,
+ -0.049292468,
+ -0.007913048,
+ -0.0225519,
+ 0.058245603,
+ -0.0013871775,
+ 0.004242212,
+ -0.015703203,
+ -0.04286776,
+ 0.017307652,
+ -0.056145933,
+ -0.014512839,
+ -0.0051792497,
+ 0.03008354,
+ 0.01893574,
+ -0.021401852,
+ 0.030651515,
+ 0.001519773,
+ -0.039288186,
+ 0.043037657,
+ -0.0063755643,
+ -0.045748476,
+ 0.009349934,
+ 0.037898928,
+ -0.0035978348,
+ 0.019486923,
+ 0.009084811,
+ -0.029891131,
+ -0.013950705,
+ 0.040280715,
+ 0.010204689,
+ -0.053740613,
+ 0.005761359,
+ -0.04023717,
+ 0.005269718,
+ 0.06287761,
+ 0.012483299,
+ -0.040969692,
+ 0.023426566,
+ 0.049468677,
+ 0.025896756,
+ 0.03623033,
+ -0.04420023,
+ -0.014361569,
+ 0.028071152,
+ -0.03961718,
+ -0.010116183,
+ 0.044026025,
+ -0.023922756,
+ 0.015783194,
+ 0.043658514,
+ -0.04574085,
+ 0.023328632,
+ -0.036748018,
+ 0.0024259225,
+ -0.022739228,
+ 0.04270546,
+ -0.03976341,
+ 0.0030309034,
+ -0.042409983,
+ 0.023779685,
+ 0.045953766,
+ 0.0035741946,
+ 0.06172329,
+ 0.020942885,
+ 0.018815668,
+ 0.002611944,
+ -0.013529834,
+ -0.0035121616,
+ 0.009208865,
+ -0.042507928,
+ -0.024845943,
+ 0.0024091997,
+ 0.022494191,
+ 0.03293236,
+ -0.0032488606,
+ -0.03973362,
+ -0.023299772,
+ 0.038303256,
+ -0.04069816,
+ 0.01898582,
+ -0.009630444,
+ -0.016950874,
+ -0.051366705,
+ -0.0011361453,
+ -0.00520503,
+ 0.04628131,
+ -0.0016069483,
+ 0.027816968,
+ 0.022289682,
+ 0.013110441,
+ -0.017948713,
+ -0.035742603,
+ -0.015835265,
+ 0.012781291,
+ 9.145471E-4,
+ -0.038148556,
+ -0.035634007,
+ 0.001165842,
+ -0.051454835,
+ 0.0063861157,
+ -0.03858706,
+ 0.060389947,
+ -0.04003696,
+ 0.010094225,
+ 0.0019259519,
+ -0.015732829,
+ 0.024424803,
+ 0.06876799,
+ 0.021107815,
+ -0.006169656,
+ -0.024113353,
+ 0.034941036,
+ -0.030061271,
+ 0.03209907,
+ -0.035412576,
+ 0.035322726,
+ -0.020285983,
+ -0.015036478,
+ 0.051395353,
+ 0.0019949703,
+ -0.038762532,
+ 0.042202428,
+ 0.012429357,
+ 0.0231507,
+ 0.042288058,
+ -0.043324683,
+ -0.014321845,
+ -0.038201384,
+ 0.04411651,
+ -0.011499363,
+ -0.0011086359,
+ -0.0017081433,
+ 0.0049578995,
+ -0.029837498,
+ 0.03107285,
+ 0.03947973,
+ 0.02946071,
+ 0.052505106,
+ -0.0056140795,
+ -7.8788557E-4,
+ 0.03611609,
+ -0.032468162,
+ 0.021311602,
+ -0.01755309,
+ -0.062145866,
+ -0.01713011,
+ 0.01530961,
+ -0.05847239,
+ 0.024427207,
+ -0.05572876,
+ 0.029832887,
+ 0.032288484,
+ 0.067211464,
+ 0.036228374,
+ 0.032497436,
+ 0.023743326,
+ -0.018152919,
+ 0.02363037,
+ 0.036207188,
+ 0.023939049,
+ -0.040141124,
+ 0.044435635,
+ -0.0097237155,
+ 0.011934228,
+ 0.0042011444,
+ 0.02160478,
+ -0.021829419,
+ 0.044592254,
+ 0.06426234,
+ 0.035477694,
+ -0.0070520733,
+ -0.022447918,
+ 0.031076195,
+ -0.027826944,
+ 0.04607834,
+ 0.036913052,
+ 0.027433876,
+ 0.034127843,
+ -0.037169673,
+ 0.051410012,
+ -0.020893252,
+ -0.03524651,
+ -0.0102548795,
+ -0.04045241,
+ 0.038298834,
+ 0.028730791,
+ 0.03087666,
+ 0.057435855,
+ -0.04822581,
+ 0.018290827,
+ -0.05721407,
+ 2.2388266E-4,
+ -0.04328051,
+ -0.014399321,
+ 0.017069554,
+ -0.027348367,
+ -0.042819243,
+ 0.047329646,
+ -0.02026097,
+ 0.010805734,
+ 0.025928484,
+ 0.038546316,
+ 0.03388986,
+ 0.041131854,
+ 0.023852542,
+ -0.034244485,
+ 0.033818375,
+ 0.0032745888,
+ 0.0034216174,
+ -0.042203613,
+ 0.021717357,
+ 0.08977713,
+ -0.015046532,
+ 0.017135035,
+ -0.058895033,
+ 0.00379158,
+ 0.04193104,
+ -0.025243774,
+ 0.026058909,
+ -0.0054111695,
+ 0.03315517,
+ 0.06519038,
+ 0.03531922,
+ 0.0034658131,
+ 0.03558073,
+ -0.014172857,
+ 0.038123693,
+ 0.031243082,
+ -0.027238706,
+ -0.048685398,
+ -0.020012598,
+ 0.039264724,
+ -0.029690884,
+ -0.1012613,
+ 0.009717828,
+ 0.020731622,
+ -7.277269E-4,
+ -0.0047343783,
+ -0.059146963,
+ 0.030248191,
+ 0.033860065,
+ -0.001172883,
+ 0.038972795,
+ -0.028742323,
+ 0.0044028144,
+ 0.025507994,
+ -0.008971904,
+ -0.028014716,
+ 0.027351445,
+ 0.022422643,
+ -0.013493538,
+ 0.009958706,
+ 0.0020596825,
+ -0.05377877,
+ -0.038316928,
+ 0.03649911,
+ -0.01148695,
+ -0.0052680895,
+ -0.026613293,
+ -0.003618334,
+ 0.03726566,
+ -0.0018019046,
+ 0.0016647432,
+ -0.044597358,
+ 0.031882677,
+ 1.841388E-4,
+ 0.018014738,
+ 0.028330013,
+ 0.0030122031,
+ 0.003247139,
+ -0.03580505,
+ 0.0029498006,
+ 0.021444475,
+ 0.004901921,
+ 0.056175765,
+ -0.058119573,
+ -0.017174141,
+ 0.016899366,
+ 0.024362944,
+ 0.03788246,
+ -0.021013733,
+ -0.0126804095,
+ -0.047337875,
+ 0.027093563,
+ 0.0046318723,
+ -0.049408548,
+ -0.033643764,
+ -0.010133648,
+ -0.014457212,
+ 0.023643292,
+ -0.01472291,
+ -0.03889335,
+ 0.040239006,
+ -0.016758712,
+ 0.0028885135,
+ 0.04148387,
+ -0.047823094,
+ -0.036306888,
+ 0.014922291,
+ 0.028846556,
+ -0.018073991,
+ -0.018908141,
+ -0.0021085953,
+ -0.0075525087,
+ 0.013559787,
+ -0.0025059013,
+ 0.029808598,
+ -0.02127446,
+ 0.041603275,
+ 0.00614088,
+ 0.047407117,
+ 0.035658635,
+ 0.008785723,
+ -0.011026571,
+ -0.01658068,
+ -0.015214422,
+ -0.028847193,
+ 0.01517462,
+ 0.004247325,
+ 0.03586765,
+ -0.015745515,
+ 0.015027826,
+ 0.011356842,
+ -0.007915095,
+ 0.034484107,
+ -0.032371435,
+ -0.009056431,
+ -0.004493028,
+ -0.0596749,
+ -8.5783575E-4,
+ 0.027174769,
+ 0.045395292,
+ 0.04142905,
+ 0.03647844,
+ 0.024472332,
+ -0.0037653125,
+ 0.0383382,
+ 0.0054513174,
+ -0.0039946474,
+ -0.0340064,
+ 8.060293E-4,
+ 0.023366755,
+ -0.036315966,
+ -0.02101422,
+ 0.012212287,
+ -0.04009388,
+ 0.031355944,
+ 0.021028781,
+ -0.016732529,
+ -0.03390831,
+ -0.0027794205,
+ -0.0458126,
+ -0.025767386,
+ -0.02546014,
+ -0.026577296,
+ 0.036503647,
+ 0.04295404,
+ 0.00842526,
+ 0.004480031,
+ 0.049154222,
+ 0.044307664,
+ 0.00563,
+ -0.05366493,
+ 0.012118256,
+ 0.027420945,
+ 0.032391064,
+ 0.040513802,
+ 0.06648985,
+ -0.08051554,
+ 0.029721357,
+ 0.012828343,
+ 0.0035151385,
+ 0.025055477,
+ -0.022446334,
+ 0.013084881,
+ -0.031222135,
+ -0.027148949,
+ -0.032230526,
+ -0.0471445,
+ -0.016280115,
+ -0.0029980822,
+ -0.001208389,
+ -0.0035670137,
+ -0.028226541,
+ -0.01568404,
+ 0.029313803,
+ 0.0028405911,
+ 0.007731816,
+ -0.06695659,
+ 0.024084374,
+ 0.015841685,
+ 0.04051202,
+ 0.045493234,
+ 0.015539255,
+ -0.008428886,
+ 0.031097671,
+ -0.018781636,
+ -0.017701715,
+ 0.03965556,
+ 0.02565239,
+ -0.057421196,
+ 0.037530165,
+ 0.0016547972,
+ -0.0015425521,
+ -0.0053838436,
+ -0.049610868,
+ -0.029759781,
+ 0.023697961,
+ 0.03328936,
+ -0.013707172,
+ -0.0074984147,
+ -0.0024778515,
+ 0.010546468,
+ 0.0012398458,
+ 0.038276814,
+ -0.060011856,
+ -0.057693306,
+ -0.04487683,
+ 0.023349509,
+ 0.007997978,
+ 0.02161334,
+ -0.008003266,
+ -0.011312592,
+ 0.028070185,
+ -0.012081299,
+ 0.009240637,
+ 0.06472152,
+ -0.007837418,
+ -0.02923207,
+ 0.029447917,
+ -0.052164476,
+ 0.026520424,
+ 0.01226482,
+ -0.018150106,
+ -0.030760696,
+ -0.033903923,
+ -0.029646462,
+ -0.007659373,
+ 0.03658612,
+ -0.023046156,
+ -0.027703322,
+ 0.057132572,
+ 0.03630893,
+ -0.018375164,
+ -0.023075057,
+ 0.040430054,
+ -0.022248264,
+ 0.023167314,
+ 0.025546,
+ 0.015654327,
+ -0.0034331041,
+ 0.04925954,
+ -0.022727976,
+ 0.031461317,
+ -0.057064928,
+ 0.07870135,
+ 0.0754531,
+ -0.046133537,
+ 0.00312595,
+ -0.060861293,
+ 0.0040811496,
+ -0.016920088,
+ 0.03996504,
+ 0.012388646,
+ -0.03371794,
+ 0.02878373,
+ 0.02905903,
+ 0.01794541,
+ -0.044855665,
+ 0.0038768505,
+ 0.015025285,
+ -0.037688315,
+ -0.037106022,
+ 0.049637903,
+ 0.038185373,
+ -0.08401473,
+ -0.019555341,
+ 0.004690724,
+ 0.0514431,
+ 0.028979924,
+ 0.03399595,
+ -0.0065987166,
+ 0.028970404,
+ -0.028692657,
+ -0.03121318,
+ -0.04699589,
+ -0.032636438,
+ 0.044060327,
+ -0.0076443767,
+ 0.06085082,
+ -0.01610683,
+ -0.0035068165,
+ 0.030169137,
+ 0.017414149,
+ -0.008687064,
+ 0.0096966345,
+ -0.06299991,
+ 0.0030397119,
+ -0.020902375,
+ 0.016506214,
+ 0.02490363,
+ 0.029279929,
+ -0.005575851,
+ -0.039795954,
+ -0.034507018,
+ 0.012980028,
+ -0.025570286,
+ -0.020744698,
+ 0.016078603,
+ -0.011192832,
+ 0.018529795,
+ -0.02452597,
+ -0.018344251,
+ -0.027595496,
+ -0.016324915,
+ -0.0432966,
+ -0.01651364,
+ -0.013107549,
+ 0.031159712,
+ -5.4289645E-5,
+ -0.020773554,
+ -0.009309288,
+ -0.029706396,
+ -0.0103084175,
+ -0.010127176,
+ 0.029158082,
+ 0.030865483,
+ 0.04239416,
+ -0.03712124,
+ -4.7989783E-4,
+ 0.019058805,
+ 0.015214347,
+ 0.019867247,
+ 0.009349276,
+ -0.029419994,
+ 0.040375486,
+ -0.056984205,
+ -0.031584915,
+ -0.040504552,
+ -0.033619378,
+ 0.004985112,
+ 0.018697398,
+ -0.021668348,
+ 0.014751646,
+ -0.04645506,
+ -0.02188044,
+ -0.0016693051,
+ 0.016224863,
+ 0.028737267,
+ -0.03809803,
+ 0.006264514,
+ 0.054148324,
+ 0.020083493,
+ 0.0018875598,
+ -0.02272106,
+ -0.033240892,
+ -0.04188007,
+ 0.04825111,
+ -0.005134109,
+ -0.040551823,
+ 0.024398109,
+ -0.012880422,
+ 0.027062124,
+ 0.011956714,
+ 0.01656575,
+ -0.013212088,
+ 0.021190777,
+ -0.050954,
+ 0.021164205,
+ 0.015198764
+ ],
+ "index": 0
+ }
+ ],
+ "model": "text-embedding-ada-002",
+ "usage": {
+ "prompt_tokens": 8,
+ "total_tokens": 8
+ }
+}
diff --git a/oak-search-elastic/src/test/resources/inferenceUsingConfig/queries/delayed/farming_practices.json b/oak-search-elastic/src/test/resources/inferenceUsingConfig/queries/delayed/farming_practices.json
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/oak-search-elastic/src/test/resources/inferenceUsingConfig/queries/faulty/machine_learning.json b/oak-search-elastic/src/test/resources/inferenceUsingConfig/queries/faulty/machine_learning.json
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/oak-search-elastic/src/test/resources/inferenceUsingConfig/queries/how_to_improve_mental_health_through_exercises.json b/oak-search-elastic/src/test/resources/inferenceUsingConfig/queries/how_to_improve_mental_health_through_exercises.json
new file mode 100644
index 0000000000..d2d441fbdb
--- /dev/null
+++ b/oak-search-elastic/src/test/resources/inferenceUsingConfig/queries/how_to_improve_mental_health_through_exercises.json
@@ -0,0 +1,1040 @@
+{
+ "object": "list",
+ "data": [
+ {
+ "object": "embedding",
+ "embedding": [
+ 0.008791974,
+ -0.020489981,
+ -0.006109515,
+ -0.010150691,
+ -0.029784309,
+ 0.028036697,
+ -0.03321247,
+ -0.06306187,
+ -0.033246584,
+ 0.023309032,
+ 0.035946686,
+ -0.027055321,
+ 0.0037507145,
+ 0.025860885,
+ 0.005988632,
+ -0.0053239455,
+ -0.0021588963,
+ 0.002038145,
+ 0.0032711213,
+ -0.021997746,
+ 0.008805694,
+ -0.05099283,
+ -0.074675016,
+ 0.026647415,
+ -0.010399935,
+ -0.021634595,
+ 0.010822639,
+ -0.02675293,
+ -0.05583242,
+ 0.020044345,
+ 0.005307174,
+ 0.015082918,
+ 0.015273552,
+ -0.016820217,
+ 0.04440529,
+ -0.03145251,
+ -0.069805734,
+ -0.011966522,
+ 0.042115577,
+ -0.005777869,
+ 0.009869407,
+ 0.0033836449,
+ -0.023613675,
+ 0.035310354,
+ 0.0059937458,
+ 0.0050135055,
+ 0.0024007068,
+ -0.024514848,
+ 0.011281172,
+ 0.008885264,
+ 0.04735981,
+ -0.044603877,
+ 0.035909675,
+ -0.0010534887,
+ -0.014289671,
+ -0.011795701,
+ -0.02074479,
+ 0.0059901867,
+ -0.022259349,
+ 0.0053339275,
+ 0.067212574,
+ 2.3768295E-4,
+ 0.01536068,
+ -0.036402002,
+ 0.042486724,
+ -0.032283403,
+ 0.023528174,
+ 0.039581116,
+ 0.020169223,
+ 0.0193515,
+ -0.046768293,
+ -0.008174283,
+ 0.04452365,
+ 0.04170522,
+ 0.05510561,
+ -0.023828976,
+ -0.04410403,
+ 0.035948757,
+ 0.06037456,
+ 0.030900566,
+ -0.064985245,
+ -0.051713478,
+ -0.021933733,
+ -0.0034563746,
+ 0.01779784,
+ -0.009347321,
+ 0.013947952,
+ -0.007680176,
+ 0.027225768,
+ 0.026796885,
+ 0.042828426,
+ -0.04291601,
+ 0.029390087,
+ 0.018424265,
+ -0.044475935,
+ -0.016905107,
+ -0.02696418,
+ 0.0042048637,
+ 0.009411209,
+ -0.03615929,
+ -0.016609939,
+ -0.050064813,
+ -0.015450258,
+ 0.014976232,
+ 0.01642369,
+ -0.0353047,
+ -0.045071065,
+ 0.014201129,
+ -0.03488337,
+ -0.019168945,
+ -0.0226955,
+ -0.022659188,
+ -0.0041926834,
+ -0.038176626,
+ -0.02498535,
+ 0.07614312,
+ 0.016893968,
+ -0.025653524,
+ -0.0031740963,
+ 0.013855222,
+ 0.042274226,
+ -0.0024477432,
+ -0.03932104,
+ -0.027399546,
+ -0.028609134,
+ 0.02595129,
+ -0.015184694,
+ -0.03448136,
+ 0.023683472,
+ 0.06047654,
+ 0.016532285,
+ -0.0012751991,
+ -0.010896997,
+ 0.041037317,
+ 0.015390917,
+ 0.081507206,
+ -0.032052502,
+ -0.02507307,
+ 0.019050347,
+ 0.011754883,
+ -0.024662692,
+ -0.019182665,
+ 0.034329776,
+ 0.030535325,
+ -0.0014921051,
+ -0.023151005,
+ -0.003243456,
+ -0.019786667,
+ -0.04384263,
+ -0.026921617,
+ -0.021046286,
+ -0.006472778,
+ -0.051263034,
+ 0.0047784424,
+ 0.051492076,
+ -0.055823665,
+ 0.023534967,
+ -0.013584758,
+ -6.3772924E-4,
+ 0.023799403,
+ 0.049370367,
+ 6.277785E-4,
+ -0.019596234,
+ -0.0059799,
+ 0.02374992,
+ 0.0056805783,
+ 0.013539096,
+ -0.01883056,
+ -0.01031713,
+ -0.002328003,
+ 0.0017835693,
+ 0.022781773,
+ 0.012541879,
+ 0.024696764,
+ 0.03972792,
+ -0.036585134,
+ 0.052970853,
+ -0.0134137375,
+ 0.0052768076,
+ 0.009275857,
+ 0.022994028,
+ 0.015647976,
+ -0.0720839,
+ -0.047516298,
+ -0.028340325,
+ 0.035123162,
+ 0.031995956,
+ -0.0162596,
+ 0.01998774,
+ -0.026541062,
+ -0.025574053,
+ -0.0032374715,
+ -0.032779846,
+ 0.04175821,
+ -0.029031858,
+ -0.009450186,
+ -0.007628682,
+ 0.018638568,
+ -0.0126417205,
+ 0.024982423,
+ 0.024224982,
+ 0.011128776,
+ -0.02426576,
+ -0.019390695,
+ -0.0053160354,
+ 0.030604942,
+ -0.016191563,
+ 0.030114003,
+ -0.028261343,
+ 0.030527117,
+ 0.034362275,
+ 0.018518114,
+ 0.009448469,
+ -0.008374522,
+ 0.004367683,
+ -0.015032612,
+ 0.03825785,
+ 0.024833003,
+ -0.0019436746,
+ 2.0262563E-4,
+ -0.047916275,
+ 0.016247576,
+ 0.04992816,
+ -0.023203641,
+ -0.0021196175,
+ 0.011654708,
+ 0.0023584308,
+ 0.04952982,
+ 0.0484708,
+ 0.0044480003,
+ 0.03738888,
+ 0.0018073089,
+ -0.021269495,
+ -0.034785878,
+ -0.037018854,
+ -0.015703415,
+ 0.022863211,
+ -0.037012797,
+ 0.018785026,
+ 0.052857954,
+ 0.016684813,
+ 0.03428784,
+ 0.028746642,
+ 0.002028749,
+ 0.019600587,
+ 0.03129237,
+ 0.011375476,
+ 0.027077328,
+ 0.0043374123,
+ 0.061540566,
+ 0.014242471,
+ 0.0039174384,
+ -0.034763835,
+ -0.029321669,
+ -0.039328933,
+ -0.01617928,
+ 0.029727729,
+ -0.039578177,
+ -0.0073208753,
+ 0.02455698,
+ -0.013575832,
+ -0.048174635,
+ -0.021557081,
+ -0.031870503,
+ -0.040104415,
+ 0.018649926,
+ -0.0111118015,
+ -0.017005535,
+ 0.06820292,
+ -0.013784774,
+ -0.022746745,
+ 0.04196167,
+ 0.011810581,
+ -0.056189604,
+ -0.040334817,
+ -0.016202914,
+ -0.012315125,
+ -0.01624927,
+ 0.009567149,
+ 0.01039412,
+ 0.021788355,
+ 0.025469735,
+ 0.030350802,
+ 0.010736244,
+ -0.00894181,
+ 0.016194478,
+ -0.03991276,
+ 0.021712365,
+ 0.024323618,
+ 0.034303524,
+ -0.034279276,
+ 0.0016536439,
+ 0.072219186,
+ 0.0018692845,
+ -0.022547811,
+ 0.015087279,
+ -0.029623756,
+ 0.040393148,
+ 0.044510912,
+ 0.016077772,
+ 0.053433992,
+ -0.0054602996,
+ -0.061305292,
+ -0.027901417,
+ -0.006007213,
+ -0.010692706,
+ 0.004259153,
+ -0.052878913,
+ 0.0475609,
+ -0.009792758,
+ -0.0465982,
+ -0.038523514,
+ -0.03138151,
+ -0.030177163,
+ -0.04859151,
+ -0.02367991,
+ -0.008677814,
+ 0.010740065,
+ 0.013829138,
+ 0.0011740891,
+ 0.048488755,
+ -0.012027482,
+ -0.030320926,
+ -0.024481352,
+ -0.032106776,
+ 0.027714938,
+ -0.037666675,
+ -0.010310525,
+ 0.00624347,
+ -0.017080331,
+ 7.9669955E-4,
+ -0.02046935,
+ 0.045973662,
+ 0.046992466,
+ 4.3230312E-4,
+ -0.051024828,
+ -0.04456168,
+ -0.014340668,
+ 0.025845373,
+ 0.018636495,
+ 0.03079257,
+ -0.003106307,
+ -0.052140094,
+ -0.036021497,
+ 0.0016439345,
+ 0.030586233,
+ 0.05052733,
+ 0.0268064,
+ 0.053255934,
+ 0.04262585,
+ 0.009213787,
+ 0.01623468,
+ -0.021512192,
+ -0.031599164,
+ -0.022916947,
+ 0.0010834191,
+ 0.02827584,
+ -0.022769453,
+ 0.0031896795,
+ 0.034510367,
+ 0.03755849,
+ -0.010526193,
+ 0.04570885,
+ -0.019928485,
+ -0.0033158674,
+ -0.050185356,
+ 0.022194033,
+ -0.019976662,
+ 0.01222649,
+ 0.034038346,
+ 0.014936569,
+ 0.012874515,
+ 0.011168895,
+ -0.043482397,
+ -0.026372908,
+ -0.010657216,
+ 0.04703466,
+ 0.033987127,
+ 0.05656789,
+ -0.018709736,
+ 0.010878205,
+ 0.012705952,
+ 0.008988192,
+ -0.055969935,
+ -0.02839404,
+ 0.006675203,
+ 0.002385832,
+ -0.032912638,
+ -0.003548869,
+ -0.049352024,
+ -3.475197E-4,
+ -0.052206207,
+ 0.011245735,
+ -0.016282937,
+ -0.011088703,
+ -0.012727609,
+ 0.018004984,
+ -0.024871042,
+ 0.029132517,
+ 0.030390518,
+ 0.04900132,
+ 0.04937226,
+ 0.013916274,
+ 0.040464282,
+ -0.054889955,
+ -0.018845465,
+ 0.06252982,
+ 0.03736596,
+ 0.009140178,
+ -0.04488719,
+ -0.022511143,
+ 0.012471885,
+ 0.032103628,
+ 0.028569987,
+ -0.010650039,
+ -0.016660076,
+ -0.020453656,
+ -0.002681251,
+ -0.030840697,
+ 0.004563057,
+ -0.0012923272,
+ -0.014019754,
+ -0.023882538,
+ -0.030166676,
+ 0.067963675,
+ 0.006103078,
+ -0.020308768,
+ -0.029588448,
+ -0.0018788881,
+ -0.045838352,
+ 0.041935556,
+ -0.06195981,
+ -0.016271336,
+ -0.06927429,
+ 0.021592602,
+ -0.062572666,
+ 0.035018336,
+ -0.0016177696,
+ 0.021469912,
+ -2.8912455E-4,
+ 0.046724617,
+ 0.05339773,
+ -8.4831513E-4,
+ -0.013603981,
+ 0.006607924,
+ -0.019353716,
+ -0.03941395,
+ -0.038734943,
+ -0.057580832,
+ 0.003067046,
+ 0.024029588,
+ 0.0026879597,
+ 0.033110917,
+ -0.024502497,
+ -0.053072315,
+ -0.0026362848,
+ -0.030075002,
+ 0.03114447,
+ -0.019234858,
+ -0.006515288,
+ -0.038085587,
+ -0.013315483,
+ 0.07257636,
+ -0.022797355,
+ -0.034652587,
+ 0.012745878,
+ 0.038243875,
+ 0.007007587,
+ -0.029775035,
+ 0.013175475,
+ -0.010875487,
+ -0.029875811,
+ 0.02742259,
+ 0.017148513,
+ -0.023375127,
+ 0.041487325,
+ 0.037117295,
+ 0.02882925,
+ 0.0055122487,
+ 0.0012857217,
+ -0.024027012,
+ -0.04029625,
+ 0.030413589,
+ 0.017916936,
+ -0.042570982,
+ 0.017820856,
+ -0.05363002,
+ -0.0031435746,
+ 0.024058236,
+ -0.012294997,
+ -0.026553836,
+ 0.01663599,
+ 0.022758342,
+ 0.019439407,
+ 0.030416144,
+ -0.042200528,
+ -0.0028704447,
+ 0.008383269,
+ -0.03086362,
+ -0.023299607,
+ 0.070627205,
+ -0.072902985,
+ 0.04013922,
+ 0.039933514,
+ -0.030706577,
+ 0.026639672,
+ -0.012940224,
+ 0.016234182,
+ -0.03770437,
+ 0.03877243,
+ 0.0065015065,
+ -0.02962163,
+ -0.027938263,
+ 0.044711746,
+ 0.05719798,
+ 0.012950469,
+ 0.06597556,
+ 0.03132726,
+ 0.018974353,
+ -0.00863759,
+ -0.04323257,
+ -0.0076715467,
+ 0.017571265,
+ -0.026711185,
+ -0.021895168,
+ -0.012324943,
+ 0.045913767,
+ 0.027342869,
+ -0.009904538,
+ -0.025081566,
+ -0.019519202,
+ 0.027874554,
+ -0.05316689,
+ 0.017171022,
+ -0.0370025,
+ 0.013340026,
+ -0.048722874,
+ -0.019769331,
+ -0.017992351,
+ 0.035232402,
+ -0.008356192,
+ -6.303094E-4,
+ 0.039403837,
+ -0.012279933,
+ -0.016418857,
+ -0.026213804,
+ -0.015545696,
+ 0.014333667,
+ 0.030096682,
+ -0.041010857,
+ 0.0024596052,
+ -0.016626459,
+ -0.030368662,
+ -0.014830753,
+ -0.03735439,
+ 0.08232554,
+ -0.06620281,
+ 0.0052337237,
+ 0.015562228,
+ -0.026194882,
+ 0.01627169,
+ 0.03422113,
+ 0.051935196,
+ 0.0016815835,
+ 0.012635843,
+ 0.04335976,
+ -0.008597403,
+ 0.007937417,
+ -0.0031021922,
+ 0.017573396,
+ -0.010262426,
+ -0.03068737,
+ 0.043924045,
+ 0.0037113123,
+ -0.048986822,
+ 0.008481841,
+ 0.03829618,
+ 0.018404802,
+ 0.061726216,
+ -0.05852695,
+ 0.00950976,
+ -0.025378892,
+ 0.047224194,
+ -0.0034189222,
+ -0.01765655,
+ -0.0024020902,
+ -0.030426588,
+ -0.026945923,
+ 0.021899166,
+ 0.020996701,
+ -0.0010057492,
+ 0.05940011,
+ 0.00679684,
+ -0.038986232,
+ 0.028413946,
+ -0.04071312,
+ 0.03963622,
+ -0.01753257,
+ -0.062235046,
+ -0.031313546,
+ 0.02457589,
+ -0.015824532,
+ 0.033721432,
+ -0.033357292,
+ 0.037354067,
+ -0.013316352,
+ 0.042799808,
+ 0.033023264,
+ 0.016211387,
+ 0.027200786,
+ -0.0018146092,
+ 0.038455293,
+ 0.02964363,
+ 0.027492277,
+ -0.034134917,
+ 0.042724624,
+ -0.0044298116,
+ 0.015902713,
+ 0.039874323,
+ 0.06305593,
+ -0.026311724,
+ 0.014591425,
+ 0.056645103,
+ 0.05804906,
+ -4.0614707E-4,
+ -0.061733678,
+ 0.032622997,
+ -0.052896257,
+ 0.056456406,
+ 0.041786317,
+ 0.0282993,
+ -0.01133002,
+ -0.056631893,
+ 0.013361009,
+ -0.051777307,
+ -0.0024761688,
+ 0.00303365,
+ -0.025833514,
+ 0.038050886,
+ 0.02218812,
+ 0.0238029,
+ 0.017834334,
+ -0.03369342,
+ 0.018681979,
+ -0.024656111,
+ 0.031562097,
+ -0.030606376,
+ -0.036541227,
+ 0.02118682,
+ -0.036223505,
+ -0.057840172,
+ 0.04030942,
+ -0.017304301,
+ 0.0037812213,
+ 0.02830858,
+ 0.029897913,
+ 0.0281261,
+ 0.03577344,
+ 0.018700227,
+ 0.0034423952,
+ 0.04075284,
+ 0.015016383,
+ 0.012836431,
+ -0.028510187,
+ 0.04360941,
+ 0.1130788,
+ -0.042146347,
+ 0.0017350221,
+ -0.043751694,
+ 0.046800476,
+ 0.06699841,
+ -0.034765717,
+ 0.018320907,
+ 5.520122E-4,
+ 0.04316879,
+ 0.06338583,
+ 0.024317287,
+ 0.047024645,
+ 0.0016942362,
+ -0.039957054,
+ 0.03032354,
+ 0.03475805,
+ -0.046967965,
+ -0.042768665,
+ -0.003791403,
+ 0.0085400585,
+ 0.0025602973,
+ -0.0159308,
+ -0.004886532,
+ 0.042952027,
+ 0.029238433,
+ -0.020295613,
+ -0.06508047,
+ 0.032613214,
+ 0.019570095,
+ -0.008201718,
+ 0.055164963,
+ -0.043703,
+ -0.010233816,
+ 0.01319152,
+ 0.0010902684,
+ -0.019518254,
+ 0.006812636,
+ 0.009620317,
+ -0.033292573,
+ 0.016966624,
+ 0.022288254,
+ -0.05395861,
+ -0.01771854,
+ 0.04414851,
+ -0.018334074,
+ -0.00396292,
+ -0.0328988,
+ 0.014508503,
+ 0.02538327,
+ 0.016333042,
+ -0.016232047,
+ -0.03946759,
+ 0.026616463,
+ 0.0072747488,
+ -0.0055048442,
+ 0.014927596,
+ 0.02018946,
+ 0.0064342376,
+ -0.02738622,
+ -0.033899214,
+ 0.025721433,
+ 0.030206606,
+ 0.07113682,
+ -0.05102437,
+ -0.057398133,
+ -0.003964815,
+ 0.019796615,
+ 0.04743337,
+ -0.0105565535,
+ -6.176127E-4,
+ -0.038208064,
+ -0.00457108,
+ 0.004003056,
+ -0.02080226,
+ -0.0406123,
+ -0.024164671,
+ 0.0073457872,
+ -0.025048997,
+ 6.5515994E-4,
+ -0.030880153,
+ 0.023714792,
+ -0.018393496,
+ -0.011894504,
+ 0.05771002,
+ -0.05338687,
+ -0.028928192,
+ 0.026299957,
+ 0.011941384,
+ -0.027905079,
+ -0.056444895,
+ 0.0073522236,
+ -0.022841705,
+ 0.025099723,
+ -0.047591627,
+ -0.0041215615,
+ 0.023068339,
+ 0.023447461,
+ -0.0038869013,
+ 0.039125033,
+ 0.0358867,
+ 0.02496525,
+ 0.009795922,
+ 0.005433927,
+ -0.033647202,
+ -0.049425583,
+ 0.029620066,
+ 0.0114834625,
+ 0.03167972,
+ 0.012265288,
+ 0.024452107,
+ 0.017048497,
+ -0.02192642,
+ 0.029680489,
+ -0.02245774,
+ 0.0059080287,
+ 0.0063766995,
+ -0.03216846,
+ -0.012526187,
+ 0.048805296,
+ 0.015055892,
+ 0.018139923,
+ 0.02543095,
+ 0.02408323,
+ -0.0077630067,
+ -0.0014285829,
+ 0.019430911,
+ -0.016324015,
+ -0.019515784,
+ -0.016461689,
+ 0.03262005,
+ -0.019097295,
+ -0.039592262,
+ -0.022648077,
+ -0.021244014,
+ 0.037458498,
+ 0.048461646,
+ -0.009286371,
+ -0.014575859,
+ 0.024168907,
+ -0.059034772,
+ -0.034955565,
+ -0.010783838,
+ -0.059116654,
+ 0.019573307,
+ 0.011574301,
+ -0.016301792,
+ 0.0023241448,
+ 0.05011626,
+ 0.025213832,
+ 0.006971758,
+ -0.041885205,
+ -0.01541208,
+ 0.014232182,
+ 0.027422674,
+ 0.027725372,
+ 0.051532555,
+ -0.042544108,
+ 0.0146422805,
+ 0.004530809,
+ 0.0069977664,
+ 0.024105547,
+ -0.02740375,
+ 0.002920723,
+ -0.030319434,
+ -0.04491359,
+ -0.05910998,
+ -0.05865079,
+ -0.0017673058,
+ -0.017101279,
+ 0.034360692,
+ 4.1014765E-4,
+ -0.027847322,
+ -0.027747761,
+ 0.036597636,
+ 0.04466573,
+ -0.036249675,
+ -0.045582876,
+ 0.017026497,
+ 0.025126584,
+ 0.06679925,
+ 0.03655107,
+ -0.014254856,
+ 0.014195823,
+ 0.007329351,
+ -0.01561042,
+ -0.029928358,
+ 0.059006978,
+ 0.01783699,
+ -0.05051433,
+ 0.042937387,
+ 0.02242243,
+ -0.037253894,
+ -0.016605929,
+ -0.04203374,
+ -0.035089105,
+ 0.033985045,
+ 0.026920252,
+ 0.029900432,
+ 0.008967043,
+ 0.007381151,
+ -0.0053459276,
+ -0.02332961,
+ 0.032974876,
+ -0.06801033,
+ -0.050056353,
+ -0.04295855,
+ 0.027365154,
+ -0.0015844033,
+ 0.014423883,
+ -0.027253618,
+ -0.02750069,
+ 0.029770242,
+ -0.0051452676,
+ 0.017944258,
+ 0.05506703,
+ -0.045788854,
+ -0.024738597,
+ 0.0073821144,
+ -0.032981426,
+ 0.0067078285,
+ 0.032980997,
+ -0.0054706708,
+ -0.013988192,
+ -0.035809465,
+ -0.032564666,
+ 0.0056076017,
+ 0.035588387,
+ -0.04393891,
+ -0.03864434,
+ 0.034813333,
+ 0.001891479,
+ -0.044719495,
+ 0.018452032,
+ 0.03515679,
+ -0.01625695,
+ 0.01527736,
+ 0.05715868,
+ -0.025703877,
+ -0.008141671,
+ 0.02350637,
+ -0.025745137,
+ 0.014802653,
+ -0.040206183,
+ 0.016157178,
+ 0.07428786,
+ 0.00249178,
+ 0.040452734,
+ -0.025529675,
+ 0.003585987,
+ -0.002709985,
+ 0.04622477,
+ -0.017676812,
+ -0.03254516,
+ 0.019917153,
+ 0.03728412,
+ 0.016521329,
+ -0.028999014,
+ 0.02723169,
+ 0.0052528256,
+ -0.0060054166,
+ -0.009442965,
+ 0.014014034,
+ 0.016912183,
+ -0.048996154,
+ -0.026500238,
+ -0.012093608,
+ 0.03644763,
+ 0.01805405,
+ 0.05928369,
+ 0.0052780206,
+ 0.03177189,
+ -0.0016853149,
+ 0.0010709488,
+ -0.031750146,
+ -0.059383947,
+ 0.014420429,
+ 0.019723393,
+ 0.07844462,
+ -0.011759435,
+ -0.011710102,
+ 0.035668455,
+ 0.008575965,
+ -0.043439887,
+ -0.0076605887,
+ -0.043047585,
+ 0.025906775,
+ 7.777709E-5,
+ 0.015006735,
+ 0.04497493,
+ 0.054323427,
+ 0.0026083002,
+ -0.018126741,
+ -0.07818099,
+ 0.02221695,
+ -0.024682606,
+ -0.052327257,
+ 0.031014968,
+ -0.010519556,
+ 0.043063097,
+ -0.0129735,
+ 0.018994965,
+ -0.03834188,
+ -0.013971099,
+ -0.027168399,
+ -0.022565715,
+ -0.012569273,
+ 0.03010629,
+ 0.019745708,
+ -0.034951594,
+ 0.034294844,
+ -0.041847035,
+ -0.0143534355,
+ -0.022042178,
+ 0.06156818,
+ 0.041980445,
+ 0.025736118,
+ -0.04083261,
+ -0.011739585,
+ 0.022959001,
+ 0.03346018,
+ 0.016974367,
+ 0.0047478396,
+ -0.033702344,
+ -0.008114252,
+ -0.056355365,
+ -0.03468709,
+ -0.0099324025,
+ -0.049907703,
+ -0.054466248,
+ 0.010150463,
+ 0.026502138,
+ 0.008007151,
+ -0.011395014,
+ -0.028379679,
+ 0.025266703,
+ 0.039900746,
+ 0.023514649,
+ 0.017225208,
+ 0.0054761483,
+ 0.047004484,
+ 0.003701584,
+ 0.024029542,
+ -0.02839561,
+ -0.06623226,
+ -0.040648274,
+ 3.388841E-4,
+ 0.018779594,
+ -0.022885226,
+ 0.03625913,
+ -0.018531349,
+ 0.01719647,
+ 0.019804744,
+ 0.03528235,
+ -0.01045835,
+ 0.0372355,
+ -0.020883968,
+ 0.026988843,
+ 0.029256586
+ ],
+ "index": 0
+ }
+ ],
+ "model": "text-embedding-ada-002",
+ "usage": {
+ "prompt_tokens": 8,
+ "total_tokens": 8
+ }
+}
diff --git a/oak-search-elastic/src/test/resources/inferenceUsingConfig/queries/nutritional_advice_for_a_healthier_lifestyle.json b/oak-search-elastic/src/test/resources/inferenceUsingConfig/queries/nutritional_advice_for_a_healthier_lifestyle.json
new file mode 100644
index 0000000000..4d07629757
--- /dev/null
+++ b/oak-search-elastic/src/test/resources/inferenceUsingConfig/queries/nutritional_advice_for_a_healthier_lifestyle.json
@@ -0,0 +1,1040 @@
+{
+ "object": "list",
+ "data": [
+ {
+ "object": "embedding",
+ "embedding": [
+ 4.78786E-4,
+ -0.06083497,
+ 0.014947462,
+ 0.007611407,
+ -0.04607919,
+ 0.03506035,
+ -0.007766019,
+ -0.056302037,
+ -0.023150254,
+ 0.03195408,
+ 0.014685553,
+ -0.020007895,
+ 0.04165633,
+ 0.046636365,
+ 0.010815783,
+ 0.015790498,
+ -0.003831061,
+ 0.019939622,
+ 0.008812917,
+ -0.018298304,
+ 0.06567055,
+ -0.02808864,
+ -0.033690523,
+ 0.023220608,
+ -0.03684785,
+ -0.01489356,
+ -0.041910786,
+ -0.012112828,
+ -0.057692673,
+ 0.013439771,
+ 0.02684908,
+ -0.015085134,
+ 0.036822416,
+ -0.03072622,
+ 0.06034068,
+ -0.031441327,
+ -0.033836685,
+ -0.03936296,
+ 0.01251433,
+ 0.0026795557,
+ -0.028944328,
+ 0.050625544,
+ -0.022935797,
+ 0.05326144,
+ 0.013953505,
+ 0.0027336339,
+ -0.040386513,
+ -0.010568408,
+ 0.010533046,
+ -0.023220845,
+ 0.043267682,
+ -0.046028756,
+ 0.014318696,
+ 0.04387918,
+ -0.038702693,
+ -0.022696897,
+ 0.0047003534,
+ 0.045569196,
+ 0.008037456,
+ -0.013048602,
+ 0.048461962,
+ 0.013554341,
+ 0.034631994,
+ -0.03554489,
+ 0.029026717,
+ -0.033107396,
+ 0.015800903,
+ 0.024218703,
+ 0.017123822,
+ 0.02046034,
+ -0.01736381,
+ -0.023519056,
+ 0.026732156,
+ 0.03547603,
+ 0.02744256,
+ -0.024550984,
+ -0.03928378,
+ 0.023861503,
+ 0.046226677,
+ 0.022138193,
+ -0.043632615,
+ -0.038746286,
+ -0.016209135,
+ -5.943848E-4,
+ -0.01609006,
+ -0.013576568,
+ 0.0071290415,
+ 0.008916142,
+ 0.0063818204,
+ 0.04814148,
+ 0.04948127,
+ 0.003436563,
+ 0.011686312,
+ 0.016673792,
+ -0.02770486,
+ -0.008963311,
+ -0.029701618,
+ -0.019251091,
+ -0.016360631,
+ -0.006186042,
+ 0.003767668,
+ -0.034725975,
+ -0.020427568,
+ 0.01874407,
+ 0.008211471,
+ -0.055790182,
+ -0.0819297,
+ 0.0071045477,
+ -0.044643596,
+ -0.031032665,
+ -0.01654538,
+ -0.02229714,
+ -0.050457805,
+ -0.035318106,
+ -0.054054867,
+ 0.04432085,
+ 0.030776737,
+ -0.027191268,
+ 0.010807828,
+ 0.028232386,
+ 0.034523122,
+ 0.02997594,
+ -0.036545835,
+ 0.0074283937,
+ -0.034564894,
+ 0.036049925,
+ -0.010550053,
+ -0.018900467,
+ 0.026391387,
+ 0.043302715,
+ -7.429532E-4,
+ -0.009905424,
+ -0.0046575577,
+ 0.0017349538,
+ -0.023770966,
+ 0.0714032,
+ -0.03143953,
+ -0.06098564,
+ 6.025742E-4,
+ -0.014524059,
+ -0.030312866,
+ -0.02257179,
+ 0.020751765,
+ 0.041815437,
+ -0.018981094,
+ 0.002003521,
+ -0.033142224,
+ -0.031080617,
+ -0.053843327,
+ -0.028219495,
+ -0.04419741,
+ -0.0110458685,
+ -0.03471364,
+ -0.004558682,
+ 0.047891386,
+ -0.08981699,
+ 0.02131292,
+ -0.03871923,
+ -0.011221928,
+ 0.032924425,
+ 0.04149489,
+ 0.032836836,
+ -0.019894786,
+ 0.028042793,
+ -0.03374101,
+ 0.0010283503,
+ 0.021668717,
+ -0.01041109,
+ -0.013767505,
+ 0.013525539,
+ -0.0142650055,
+ 0.007296078,
+ 0.055253334,
+ 0.009136362,
+ 0.03653272,
+ 0.0018739541,
+ 0.068702556,
+ -0.02904734,
+ 0.039900437,
+ 0.0027161965,
+ 1.7077723E-4,
+ 0.025925025,
+ -0.035791587,
+ -0.021814037,
+ -0.018051282,
+ 0.028601216,
+ 0.0319843,
+ -0.025087655,
+ 0.020870944,
+ -0.05051315,
+ -0.02315419,
+ -0.014114493,
+ -0.052199796,
+ 0.058758646,
+ -0.032659825,
+ -0.008236866,
+ -0.00627123,
+ -0.009430996,
+ -0.019031912,
+ 0.031033272,
+ 0.047580034,
+ 0.024128439,
+ 9.350256E-4,
+ -0.019530287,
+ 0.019341229,
+ 0.029694347,
+ 0.0067804684,
+ -0.010416509,
+ -0.066293746,
+ 0.030792115,
+ 0.0175943,
+ -0.0014485627,
+ 0.018345077,
+ -0.037053794,
+ -0.04135242,
+ 0.032351103,
+ 0.018686216,
+ 0.004307253,
+ 0.01606825,
+ 0.010449602,
+ -0.06815836,
+ -0.022342376,
+ 0.047482476,
+ -0.027997896,
+ -0.012841919,
+ -0.01745058,
+ -0.014677299,
+ 0.030964788,
+ 0.013372548,
+ -0.021125281,
+ 0.019799631,
+ 0.019015837,
+ -0.027910754,
+ -0.032843906,
+ -0.0071195783,
+ -0.033488464,
+ 0.02849781,
+ -0.07441036,
+ 0.022326753,
+ 0.07025292,
+ 0.0045267227,
+ 0.004520019,
+ -0.0028613298,
+ -0.0045444136,
+ 0.030837998,
+ 0.013926765,
+ 0.014392683,
+ 0.02315743,
+ 0.021928066,
+ 0.040121086,
+ 0.023841847,
+ -0.003131614,
+ -0.005407646,
+ -2.6792238E-4,
+ -0.032050263,
+ -0.004489247,
+ 0.052065123,
+ -0.016724303,
+ -0.0040239696,
+ 0.032456037,
+ 0.009219617,
+ -0.06274731,
+ -0.018256024,
+ -0.018227998,
+ -0.048276156,
+ 0.0088953795,
+ -2.1788072E-4,
+ -0.002815001,
+ 0.06556571,
+ -0.030503966,
+ 1.5263847E-4,
+ 0.0070123933,
+ 0.03308733,
+ -0.047466073,
+ -0.05533519,
+ -0.032449856,
+ -0.01774054,
+ -0.013188819,
+ 0.02170958,
+ 0.024354348,
+ 0.039181262,
+ 0.008291247,
+ 0.0034606175,
+ 0.016999243,
+ -0.013691225,
+ 0.004459982,
+ 0.0057809097,
+ 0.02456838,
+ 0.036007103,
+ 0.03532738,
+ -0.009042315,
+ -0.0026770458,
+ 0.07718905,
+ -0.019217737,
+ -7.4910244E-4,
+ 0.06516078,
+ -0.016863445,
+ 0.03479914,
+ 0.03039673,
+ -0.005684045,
+ 0.053362653,
+ -0.010641142,
+ -0.07855759,
+ -0.055035144,
+ -0.012539449,
+ -8.6310325E-4,
+ 0.04625114,
+ -0.06778749,
+ 0.05959191,
+ -0.007998537,
+ 0.0035333543,
+ -0.02060259,
+ -0.04278232,
+ -0.034549225,
+ -0.07367521,
+ 0.006143997,
+ -0.032584924,
+ 0.002427511,
+ 0.02278313,
+ -0.008905944,
+ 0.04582995,
+ 0.00266892,
+ -0.05785542,
+ -0.025982164,
+ -0.02024693,
+ -0.0054197344,
+ -0.027278153,
+ -0.01758977,
+ -0.009415818,
+ -0.016979879,
+ -0.024511268,
+ -0.0075444602,
+ 0.03837344,
+ 0.020495187,
+ 0.0073158257,
+ -0.0076442924,
+ -0.025383024,
+ -0.01693708,
+ 0.014447244,
+ -0.0017863568,
+ 0.04802762,
+ 0.0138894655,
+ -0.015680384,
+ -0.02290481,
+ -0.006765225,
+ 0.04733217,
+ 0.033140842,
+ 0.011222377,
+ 0.03483814,
+ 0.049456894,
+ 0.009537123,
+ -0.015991105,
+ 0.016145416,
+ -0.012501448,
+ -0.03879024,
+ -0.034491017,
+ 0.015165446,
+ -0.04479018,
+ 0.008296933,
+ 0.017637862,
+ 0.031763706,
+ -0.00448389,
+ 0.05014153,
+ -9.709225E-4,
+ 5.106908E-4,
+ -0.04075475,
+ 0.02443232,
+ -0.035628475,
+ -0.0044173216,
+ -0.0032353261,
+ -0.0027315144,
+ 0.024764644,
+ 0.021693628,
+ -0.032483436,
+ -0.02947653,
+ -0.044796713,
+ 0.02412553,
+ 0.042474635,
+ 0.023174768,
+ -0.02262092,
+ 0.01904119,
+ 0.019999515,
+ 0.01564394,
+ -0.02403147,
+ -0.019652445,
+ 0.021310309,
+ 0.0045950934,
+ -0.01472335,
+ -0.0013760976,
+ -0.04469188,
+ -0.010073975,
+ -0.051603023,
+ 0.03444244,
+ -0.019057253,
+ 0.0038666101,
+ 0.0012555001,
+ 0.022729939,
+ -0.029239757,
+ 0.0118668,
+ 0.0039233346,
+ 0.020431304,
+ 0.05042117,
+ 0.03201849,
+ 0.02574993,
+ -0.051427215,
+ -0.055466615,
+ 0.07189229,
+ 0.060573272,
+ 0.050999086,
+ -0.045861285,
+ -0.0112660825,
+ 0.033754896,
+ 0.009641808,
+ 0.03770429,
+ -0.009834023,
+ -0.0014063233,
+ -0.01954548,
+ -0.01290099,
+ -0.048646256,
+ -0.02464642,
+ -0.008127035,
+ -0.015632937,
+ -0.010674254,
+ -0.036776386,
+ 0.016372368,
+ -2.2629551E-4,
+ 0.019061942,
+ -0.033802312,
+ 0.019018497,
+ -0.012469509,
+ 0.024570173,
+ -0.055570893,
+ -0.0368927,
+ -0.041142367,
+ 0.008365219,
+ -0.036677506,
+ 0.027517395,
+ -3.550447E-4,
+ 0.029001644,
+ -0.004190192,
+ 0.034055214,
+ 0.038833685,
+ -0.010086325,
+ 0.004516224,
+ 0.007931035,
+ -0.029621642,
+ -0.02772885,
+ -0.02456322,
+ -0.052876048,
+ 0.0011424996,
+ 0.018264158,
+ -0.025943957,
+ 0.06555641,
+ -0.023199752,
+ -0.038346842,
+ -0.040212963,
+ -0.018886724,
+ 0.037693836,
+ -0.04645219,
+ 0.036073826,
+ -0.04010883,
+ -0.020375488,
+ 0.060192935,
+ -0.043011628,
+ -0.009102075,
+ -0.014691425,
+ 0.053363997,
+ 0.025075525,
+ -0.040784433,
+ 0.04029924,
+ -0.01613193,
+ -0.014367019,
+ 0.020353,
+ 0.013165177,
+ -0.014735668,
+ 0.010295265,
+ 0.043656003,
+ 0.015763221,
+ -0.0021745213,
+ 0.014485763,
+ -0.022276709,
+ 0.028671639,
+ 0.033791438,
+ 0.020456519,
+ -0.05029072,
+ 0.0181394,
+ -0.047825802,
+ -0.0121668065,
+ 0.021449506,
+ -0.0027170214,
+ -0.046575498,
+ 0.033822708,
+ 0.059220374,
+ 0.015319739,
+ 0.025176318,
+ -0.038238235,
+ 0.0027109117,
+ -0.010134932,
+ -0.069325656,
+ -0.04305428,
+ 0.076333344,
+ -0.027032137,
+ 0.021485271,
+ 0.027882239,
+ -0.026090384,
+ 0.04732416,
+ -0.006485993,
+ 0.016534902,
+ -0.02599114,
+ 0.03915356,
+ -0.0035937678,
+ -0.022920197,
+ -0.029933013,
+ 0.0381691,
+ 0.029437946,
+ 0.0059461007,
+ 0.050638378,
+ 0.026781503,
+ 0.013856752,
+ 0.013301755,
+ -0.03661476,
+ -0.013183233,
+ -0.002226935,
+ -0.0057021924,
+ -0.029928949,
+ -0.008856062,
+ 0.043401394,
+ 0.034884393,
+ -0.0561832,
+ -0.02607823,
+ -0.01539559,
+ 0.011294364,
+ -0.05702274,
+ 0.022470575,
+ 0.012153083,
+ 0.036527533,
+ -0.04719663,
+ -0.02903925,
+ -0.004254957,
+ 0.06314714,
+ 0.006120009,
+ 0.0233965,
+ 0.018854178,
+ 0.0055364007,
+ -0.04178384,
+ -0.02824294,
+ -0.010984895,
+ 0.069205806,
+ 0.02371309,
+ -0.033981863,
+ 0.011849826,
+ -0.026884254,
+ -0.06832241,
+ -0.03505537,
+ -0.019646661,
+ 0.056039907,
+ -0.06583896,
+ 0.034440767,
+ 0.0075519443,
+ -0.015477319,
+ 0.027246796,
+ 0.016094556,
+ 0.045453455,
+ 7.5814215E-4,
+ 0.014179548,
+ 0.036091007,
+ 0.00392299,
+ 0.015705813,
+ -0.012500863,
+ 0.03336486,
+ -0.0025329664,
+ -0.04012361,
+ 0.059739634,
+ 0.017014699,
+ -0.022577405,
+ 0.022301547,
+ 0.00406782,
+ 0.020350846,
+ 0.05802601,
+ -0.062044088,
+ 0.012179106,
+ -0.055789925,
+ 0.050854422,
+ -0.006362484,
+ -1.3509826E-4,
+ 0.01331581,
+ 0.005119299,
+ -0.04541923,
+ -0.0057160314,
+ 0.023001106,
+ 0.014566152,
+ 0.024883028,
+ 0.001469293,
+ -0.03788436,
+ 0.026394445,
+ -0.022521835,
+ 0.02805266,
+ -0.02814972,
+ -0.031058827,
+ -0.008845369,
+ 0.019863732,
+ -0.03669152,
+ -0.019991027,
+ -0.050844304,
+ 0.024668334,
+ 0.0014716587,
+ 0.009346138,
+ 0.024022244,
+ 0.015048349,
+ 0.013021373,
+ -0.013278019,
+ 0.04344976,
+ 0.046401642,
+ 0.024364138,
+ -0.050191704,
+ 0.041343145,
+ -0.020625107,
+ -0.027655425,
+ 0.041799292,
+ 0.053211946,
+ -0.0433646,
+ 0.020412745,
+ 0.03229677,
+ 0.04963084,
+ -0.008002896,
+ -0.025596552,
+ 0.02902719,
+ -0.053550433,
+ 0.0375315,
+ 0.040491503,
+ 0.02174216,
+ 0.005839671,
+ -0.02959926,
+ 0.043727692,
+ -0.038235996,
+ -0.006324533,
+ 0.0049092066,
+ -0.007740403,
+ 0.038815673,
+ 0.03321758,
+ 0.037273914,
+ 0.035918266,
+ -0.055118408,
+ 0.021496914,
+ -0.014163075,
+ 0.01259608,
+ -0.02074756,
+ -0.05191964,
+ 0.04200913,
+ -0.026537908,
+ -0.030019945,
+ 0.03561418,
+ -0.018646553,
+ 0.0057792407,
+ 0.020456044,
+ 0.039696332,
+ 0.019453552,
+ 0.030485692,
+ -0.0017833284,
+ 0.003371287,
+ 0.051462527,
+ -0.001657045,
+ -0.012948217,
+ 0.005179428,
+ 0.010790264,
+ 0.11532751,
+ -0.011574364,
+ 0.019790886,
+ -0.02393027,
+ 0.0030114695,
+ 0.03016453,
+ -0.01552154,
+ 0.027171515,
+ -0.02708827,
+ 0.031931005,
+ 0.07132223,
+ 0.02531718,
+ 0.037963394,
+ 0.02272496,
+ -0.03960704,
+ 0.057504907,
+ 0.041044425,
+ -0.032697015,
+ -0.033205092,
+ -0.021027237,
+ 0.028086495,
+ -0.03900287,
+ -0.017706124,
+ 0.020992778,
+ 0.04401,
+ 0.012377106,
+ -0.008293973,
+ -0.03369699,
+ 0.033647314,
+ 0.04675039,
+ -0.024159843,
+ 0.026716629,
+ -0.03607053,
+ 0.025422636,
+ 0.00888721,
+ -0.035719674,
+ -0.015272929,
+ 0.016504603,
+ 0.026320139,
+ -0.033134054,
+ 3.4183025E-4,
+ 0.045547474,
+ -0.038087852,
+ -0.02207355,
+ 0.028236236,
+ -0.015319146,
+ -0.005442447,
+ -0.046937253,
+ 0.002216528,
+ 0.0029536826,
+ 0.011263845,
+ 0.0075144307,
+ -0.010780875,
+ 0.02450244,
+ -0.011964763,
+ 0.0047028055,
+ -0.0012915843,
+ 0.0021235703,
+ 0.0023555052,
+ -0.026568644,
+ -0.016729042,
+ 0.028533304,
+ 0.008433275,
+ 0.06529685,
+ -0.05059315,
+ -0.043250747,
+ 0.030030767,
+ 0.00954402,
+ 0.04441544,
+ -0.038692087,
+ -0.028223114,
+ -0.018916383,
+ -0.008283882,
+ 0.035180014,
+ -0.010314352,
+ -0.010707979,
+ -6.4313796E-4,
+ 0.0026690168,
+ 0.0070307152,
+ 3.9520572E-4,
+ -0.018433928,
+ 0.029977057,
+ -0.033702336,
+ -0.004939839,
+ 0.03515644,
+ -0.026812237,
+ -0.03895843,
+ 0.030920565,
+ -0.019732544,
+ -0.028753854,
+ -0.044275448,
+ 0.0061560883,
+ 0.013339171,
+ 0.030061224,
+ -0.025727138,
+ 0.019274872,
+ -0.012649168,
+ 0.037525184,
+ 0.024284873,
+ 0.06905098,
+ 0.014280417,
+ 0.038233295,
+ 0.016678493,
+ -0.014175096,
+ -0.008923829,
+ -0.039758697,
+ -0.011825702,
+ 0.025101079,
+ 0.05234601,
+ 0.016740596,
+ 0.0143579645,
+ 0.03911855,
+ 0.004029702,
+ 0.023658073,
+ -0.022746412,
+ 0.011921462,
+ 0.0273606,
+ -0.031756587,
+ -0.007839297,
+ 0.029083723,
+ 0.007874376,
+ 0.045690704,
+ 0.03500288,
+ 0.013949982,
+ -0.022072252,
+ 0.02945624,
+ 0.0067021237,
+ -0.020384993,
+ -0.038246494,
+ -0.019031089,
+ 0.020831857,
+ -0.009154281,
+ -0.039409906,
+ -0.0034379982,
+ -0.015128988,
+ 0.02474187,
+ 0.03411702,
+ 0.04470475,
+ -0.02327381,
+ 0.021336436,
... 2321 lines suppressed ...