Defining IDs and routing keys for documents in custom workloads in Rally

Hi,

It seems that there was a way to create a custom track with an index operation to load documents in ES with custom IDs and routing keys, as described in the following post:

As this is not valid for rally's current version, how can we perform this operation now?

Best regards,
Luis

Hi,

can you please share what you've attempted exactly and the error message that you got?

Daniel

I was trying to load a file like this:

{ “index” : { “_index” : “test”, “_type” : “type1”, “_id” : “1”, “_routing : 2 } }
{“firstname”:“first_name1”,“lastname”:“last_name1”,“client”:100,“customerID”:2}
{ “index” : { “_index” : “test”, “_type” : “type1”, “_id” : “2”, “_routing : 2 } }
{“firstname”:“first_name2”,“lastname”:“last_name2”,“client”:100,“customerID”:2}
{ “index” : { “_index” : “test”, “_type” : “type1”, “_id” : “3”, “_routing : 2 } }
{“firstname”:“first_name3”,“lastname”:“last_name3”,“client”:200,“customerID”:2}

Based on this post (How to index routing id based document in rally), I was trying to use the same approach, with "operation-type": "index". Got a message that this is an invalid operation.

Just realized that there is a property for documents called includes-action-and-meta-data. That solved the problem.

Sorry I didn't check that before.

Regards,
Luis

Hi,

no worries and glad that it's resolved now. :slight_smile: Thanks for following up.

Daniel

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