[Change] small internal api refractoring
[Fixed] duplicate documents in index