Can't configure multiple indices on which to run a benchmarkin RALLY

Hello,

I try to create a track that works on one index but fails with several indices :

  "meta": {
    "short-description": "...",
    "description" : "..."
  },
  "indices": [
    {
      "name": "sa_2016_01_1",
      "types": [
        {
          "name": "search",
          "mapping": "mappings.json"
        }
      ],
      "auto-managed": false
    },
    {
      "name": "sa_2016_02_1",
      "types": [
        {
          "name": "search",
          "mapping": "mappings.json"
        }
      ],
      "auto-managed": false
    }
  ],
  "operations": [
    {
      "name": "match_all_query_search",
      "operation-type": "search",
      "body": {
        "query": {
          "match_all": {}
        }
      }
    }, 
  ...................

it gives :

2016-12-30 15:08:59,771 rally.driver ERROR Main driver received a fatal exception from a load generator. Shutting down.
2016-12-30 15:08:59,772 root ERROR Cannot run subcommand [race].
Traceback (most recent call last):
File "/home/thomas/Technologies/ESRally/venv/lib/python3.4/site-packages/esrally/rally.py", line 459, in dispatch_sub_command
racecontrol.run(cfg)
File "/home/thomas/Technologies/ESRally/venv/lib/python3.4/site-packages/esrally/racecontrol.py", line 238, in run
raise e
File "/home/thomas/Technologies/ESRally/venv/lib/python3.4/site-packages/esrally/racecontrol.py", line 235, in run
pipeline(cfg)
File "/home/thomas/Technologies/ESRally/venv/lib/python3.4/site-packages/esrally/racecontrol.py", line 48, in call
self.target(cfg)
File "/home/thomas/Technologies/ESRally/venv/lib/python3.4/site-packages/esrally/racecontrol.py", line 183, in benchmark_only
return race(Benchmark(cfg, mechanic.create(cfg, metrics_store, external=True), metrics_store), cfg)
File "/home/thomas/Technologies/ESRally/venv/lib/python3.4/site-packages/esrally/racecontrol.py", line 157, in race
benchmark.run(lap)
File "/home/thomas/Technologies/ESRally/venv/lib/python3.4/site-packages/esrally/racecontrol.py", line 81, in run
raise exceptions.RallyError(result.message, result.cause)
esrally.exceptions.RallyError: ('Fatal error in load generator [0]', InvalidSyntax("'index' is mandatory",))

but if :
"indices": [
{
"name": "sa_2016_01_1",
"types": [
{
"name": "search",
"mapping": "mappings.json"
}
],
"auto-managed": false
}]

Everything works fine.

Hi @Thomas_Louis,

The problem is that Rally cannot derive which index should be targeted by the query, so you need to add the attribute "index": "_all" to the definition of the operation "match_all_query_search" (see docs for more details).

Daniel

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.