这是我对Elasticsearch的质疑,
GET index101/_search
{
"query": {
"function_score": {
"boost_mode": "replace",
"query": {
"constant_score": {
"filter": {
"terms": {
"fields": ["767","434", "101", "222"]
}
}
}
},
"pqcode_score": {
"descriptors": [
{
"descriptor": "base64string"
}
],
"pqparams": {
"bucket_field": "fields",
"pqcode_field": "fields2",
"distance_function": "similarity",
"model": "random"
}
}
}
}
}
查看了Elasticsearch与Java的文档,但找不到任何可以在Java中解决此查询的内容.
我创建了一个JSON文件,在jsonObject中获得输入查询,然后将其作为参数传递给searchSourceBuilder.query().
How can we go ahead with this query in Java?
Is there any other workaround for this?