#elasticsearch
Вопрос:
Могли бы мы дать несколько поисковых запросов в одном и том же треке.json Я хочу дать 2 запроса, которые приведены ниже/ Поэтому я добавил его в нескольких местах разными способами, чтобы организовать его . Однако, когда я проверяю .json , я получаю, что ключ операции дублируется или json недействителен. Спасибо.
Ответ №1:
Да см. https://esrally.readthedocs.io/en/stable/track.html#schedule Также в https://discuss.elastic.co/t/esrally-giving-multiple-search-queries-in-the-same-track-json/279184/2
Решение будет
{
"version": 2,
"description": "Tutorial benchmark for Rally Search",
"indices": [
{
"name": "customrecords",
"types": [
"docs"
]
}
],
"schedule": [
{
"operation": {
"operation-type": "cluster-health",
"request-params": {
"wait_for_status": "green"
}
}
},
{
"operation": {
"name": "term-search",
"operation-type": "search",
"body": {
"query": {
"term": {
"body": "Lago"
}
}
}
},
"clients": 4,
"warmup-iterations": 1000,
"iterations": 6000,
"target-throughput": 100
},
{
"operation": {
"name": "match-all-query",
"operation-type": "search",
"body": {
"query": {
"match_all": {}
}
}
},
"clients": 4,
"warmup-iterations": 1000,
"iterations": 6000,
"target-throughput": 100
}
]
}