second-state/smart-contract-search-engine

Change the way we store player_addrs and winner_addrs

tpmccallum opened this issue · 1 comments

If we store the player_addrs and winner_addrs in a list (or as Elasticsearch calls it an ES Array) then we can dynamically ask the list if it contains a certain value (an address).
At present the way we store multiple values means that we have to create an ES query that explicitly asks every item (in the field with multiple values) if it contains the address in question. Whilst this is acceptable when there are only 50 or 100 players/winners, it will not be an ideal solution if the numbers increase into many hundreds or thousands.

Once the data structure is changed to use an internal list, the frontend code can be adjusted to suit the new data structure.

I will update the necessary code and then also document how to interact with an internal list so that others who are querying the API can use the new and improved solution.

This is now achieved in the harvester and indexed data.