modified autocomplete and add filter documents