second-state/smart-contract-search-engine

Update io.py to use config.ini for index=""

tpmccallum opened this issue · 2 comments

This can wait until the new architecture which will see the format of contract name and version change (when the "all" index is in full effect)

Part of this work will be to remove the current convention in the config.ini i.e. index_v1
We need to just have a single value for the index like this

[elasticSearch]
endpoint = search-smart-contract-search-engine-cdul5cxmqop325ularygq62khi.ap-southeast-2.es.amazonaws.com
aws_region = ap-southeast-2
index = cmtmainnet

Notice the addition of the index = cmtmainnet in the elasticSearch area.

The python harvesters will also have to have the following code which parses ABIs the traditional way re-written

esIndex = itemConf[0].split('_')[0]
version = itemConf[0].split('_')[1]

Find this code and update it to read the ABI separately from the ES index (we used to index one type of contract (ABI per index) but now we index everything in one index and label each type of contract accordingly)

This is complete and documented.