I am planning to maintain search history of users by indexing each search text as a document in elastic search. I thought of using a Prefix query to get list of Suggestions for the users. along with the prefix query i have used an Multimatch query to get the terms that match in the middle of the text as well.
the pseudo query looks like below :
{
"query" : {
bool : {
should : {
"Prefix query"{
}
"multimatch query"{
}
}
}
}
}
Before that I would like to know how good is it use Prefix Query for sugestions.
I am maintaining an Index for each day and would like to query the history of last 30 days.
will it be an performance issue ? want to clear this before I start implementing it.and are there any alternative's for prefix query in this kind of a scenario.
I have already implemented suggestions with Completion suggester but my requirement is to provide user with suggestions based on history and with a support of matching the terms in the middle of the text as well.