in rally-custom/custom_tracks/elasticsearch/dense_vector/track.py [0:0]
def __init__(self, track, params, **kwargs):
# choose a suitable index: if there is only one defined for this track
# choose that one, but let the user always override index
if len(track.indices) == 1:
default_index = track.indices[0].name
else:
default_index = "_all"
self._index_name = params.get("index", default_index)
self._cache = params.get("cache", False)
self._exact_scan = params.get("exact", False)
self._params = params
self._queries = []
cwd = os.path.dirname(__file__)
with open(os.path.join(cwd, "queries.json"), "r") as file:
for line in file:
self._queries.append(json.loads(line))
self._iters = 0
self.infinite = True
self._vector_field = "vector"