alagodasii commented on code in PR #1646:
URL: https://github.com/apache/jackrabbit-oak/pull/1646#discussion_r1721305732
##########
oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/index/ElasticIndexHelper.java:
##########
@@ -283,20 +278,13 @@ private static void mapIndexRules(@NotNull
TypeMapping.Builder builder,
ElasticPropertyDefinition pd = (ElasticPropertyDefinition)
propertyDefinition;
int denseVectorSize = pd.getSimilaritySearchDenseVectorSize();
- Reader eknnConfig = new StringReader(
- "{" +
- " \"type\":
\"elastiknn_dense_float_vector\"," +
- " \"elastiknn\": {" +
- " \"dims\": " + denseVectorSize + "," +
- " \"model\": \"lsh\"," +
- " \"similarity\": \"" +
pd.getSimilaritySearchParameters().getIndexTimeSimilarityFunction() + "\"," +
- " \"L\": " +
pd.getSimilaritySearchParameters().getL() + "," +
- " \"k\": " +
pd.getSimilaritySearchParameters().getK() + "," +
- " \"w\": " +
pd.getSimilaritySearchParameters().getW() +
- " }" +
- "}");
+ DenseVectorProperty denseVectorProperty = new
DenseVectorProperty.Builder()
+ .index(true)
+ .dims(denseVectorSize)
+ .similarity("l2_norm")
Review Comment:
It's changed now. Currently only few properties are provided (k, candidates,
similarityMethod, similarity), because I couldn't find any use case where kin
queries were customised in existing code.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]