Skip to content

ehc0825/elastiknnQueryBuild

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

elastiknnQueryBuild

elastiknnQueryBuild

Java RestHighLevelClient QueryBuilder

For ElastiKnn(https://elastiknn.com/)

use in gradle

add build.gradle

  1. repositories
repositories {
	...
	maven { url 'https://jitpack.io' }
}
  1. dependencies
dependencies {
	...
	implementation 'com.github.ehc0825:elastiknnQueryBuild:7.10.2-oss'
	...
}

support

elasticsearch oss 7.5.2

use this

KnnQueryBuilder(String fieldName, SimilarityType similarityType, String[] value)
KnnQueryBuilder(String fieldName, SimilarityType similarityType, String[] value,int candidates)
KnnQueryBuilder(String fieldName, SimilarityType similarityType, String[] value,int candidates,int probes)

[value]

fieldName : field Name type elastiknn_dense_float_vector
similarityType: similarity Type cosine, l2, permutation_lsh, exact
value: vector
candidates: int candidates (default 50)
probes: int probes (default 2)