Когда я использую клиент высокого уровня elasti c для запроса ES, он автоматически добавляет элементы значения ключа по умолчанию ... Есть ли способ отключить его?
Пример:
Мой предыдущий запрос:
{
"size": 10000,
"query": {
"bool": {
"should": [
{
"match": {
"name": "H2_SOURCE_CollibraControllerIT"
}
},
{
"bool": {
"must": [
{
"match": {
"type": "H2"
}
},
{
"match": {
"userName": ""
}
},
{
"match": {
"password": ""
}
},
{
"match": {
"databaseName": "test"
}
},
{
"match": {
"host": ""
}
},
{
"match": {
"port": ""
}
}
]
}
}
]
}
},
"from": 0
}
Теперь я использую Elasti c Client, чтобы сделать то же самое. Но это результат запроса ... Однако результат поиска всегда остается тем же самым, поскольку все они являются значениями по умолчанию.
{
"from": 0,
"size": 10000,
"timeout": "60s",
"query": {
"bool": {
"should": [
{
"match": {
"name": {
"query": "H2_SOURCE_CollibraControllerIT",
"operator": "OR",
"prefix_length": 0,
"max_expansions": 50,
"fuzzy_transpositions": true,
"lenient": false,
"zero_terms_query": "NONE",
"auto_generate_synonyms_phrase_query": true,
"boost": 1.0
}
}
},
{
"bool": {
"must": [
{
"match": {
"type": {
"query": "H2",
"operator": "OR",
"prefix_length": 0,
"max_expansions": 50,
"fuzzy_transpositions": true,
"lenient": false,
"zero_terms_query": "NONE",
"auto_generate_synonyms_phrase_query": true,
"boost": 1.0
}
}
},
{
"match": {
"userName": {
"query": "",
"operator": "OR",
"prefix_length": 0,
"max_expansions": 50,
"fuzzy_transpositions": true,
"lenient": false,
"zero_terms_query": "NONE",
"auto_generate_synonyms_phrase_query": true,
"boost": 1.0
}
}
},
{
"match": {
"password": {
"query": "",
"operator": "OR",
"prefix_length": 0,
"max_expansions": 50,
"fuzzy_transpositions": true,
"lenient": false,
"zero_terms_query": "NONE",
"auto_generate_synonyms_phrase_query": true,
"boost": 1.0
}
}
},
{
"match": {
"databaseName": {
"query": "test",
"operator": "OR",
"prefix_length": 0,
"max_expansions": 50,
"fuzzy_transpositions": true,
"lenient": false,
"zero_terms_query": "NONE",
"auto_generate_synonyms_phrase_query": true,
"boost": 1.0
}
}
},
{
"match": {
"host": {
"query": "",
"operator": "OR",
"prefix_length": 0,
"max_expansions": 50,
"fuzzy_transpositions": true,
"lenient": false,
"zero_terms_query": "NONE",
"auto_generate_synonyms_phrase_query": true,
"boost": 1.0
}
}
},
{
"match": {
"port": {
"query": "",
"operator": "OR",
"prefix_length": 0,
"max_expansions": 50,
"fuzzy_transpositions": true,
"lenient": false,
"zero_terms_query": "NONE",
"auto_generate_synonyms_phrase_query": true,
"boost": 1.0
}
}
}
],
"adjust_pure_negative": true,
"boost": 1.0
}
}
],
"adjust_pure_negative": true,
"boost": 1.0
}
}
}