A prefix keyword index is a search index for retrieving text documents by the number of exact and prefix keyword matches with a user-specified query. We use it mostly for entity search, comparable to the search box at wikipedia.org.
This is different to just finding possible continuations of a user-specified query. E.g. a user query of “angela m” should match “Angela Merkel”, but also a query like “m angel”.
Details:
Improve prefix keyword index implementation at https://github.com/bastiscode/search-index
sub_index_by_ids method (currently, a sorted list of allowed ids is checked)Requirements