Passing variables form changes to operations

My operation file looks like:

{
    "name": "match-all-query_id",
    "operation-type": "search",
    "body": {
      "query": {
        "match_all": {}
      },
 "_source": false
    }
},

{
    "name": "match-all-query_name_surname",
    "operation-type": "search",
    "body": {
      "query": {
        "match_all": {}
      }.
 "_source": ["name","surname"]
    }
},

and my challenge looks like:

 {
  "name": "Search only",
  "description": "just search",
  "schedule": 
  [

  
     {
      "operation": "match-all-query_id",
      "clients": 4,
      "warmup-iterations": 1000,
      "iterations": 1000,
      "target-throughput": 100
    },

     {
      "operation": "match-all-query_name_surname",
      "clients": 4,
      "warmup-iterations": 1000,
      "iterations": 1000,
      "target-throughput": 100
    }  
  ]
}

It works but I how I can get rid of these duplicate operations
I would love to have something like:


{
    "name": "match-all-query",
    "operation-type": "search",
    "body": {
      "query": {
        "match_all": {}
      },
 "_source": $MYVARIABALE
}

Then I want to use some parameters as below, syntax might be the wrong bot I think ide is clear.

 {
  "name": "Search only",
  "description": "just search",
  "schedule": 
  [
 
     {
      "operation": "match-all-query",
"name":"id_only"
      "clients": 4,
      "warmup-iterations": 1000,
      "iterations": 1000,
      "target-throughput": 100
      "$MYVARIABALE": false
    },

     {
      "operation": "match-all-query",
"name":"multiple fields"
      "clients": 4,
      "warmup-iterations": 1000,
      "iterations": 1000,
      "target-throughput": 100
      "$MYVARIABALE": "["name","sutname"]"
    }  
  ]
}

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