Following case: 90% of search terms are like:
"beer to be served with meat"
"beer to be served with fish"
"beer to be served with cake"
some searches are like this:
"beer to be served with meat restricted for a BBQ"
"beer to be served with cake restricted for consumption on a wedding"
When restricted occures, the second part of the query should be more relevant
My take on this would be:
Query string pre-processing outside bleve. If restricted (and a couple of other words occur) I split the query in two:
query struct {
main string
boostpart string
}{main:"beer to be served with meat",
boostpart: "for a BBQ"
}
for insert into the bleve index.
If the separating key word doesn't exist, everything simply goes into
{ main: "beer to be served with meat"}
Searching would be: Analyze the input, if a keyword occurs, split the query in two targeting the different fields with different boosting weights.
With this approach, pretty much every pre-processing happens outside bleve. is there a bleve functionality which would help me to achieve something comparable?