Open markpapadakis opened 7 years ago
There is a new query rewrites design/impl. replacing whatever we had in the past, and it should be easier to support budget semantics (or, nodes pruning) now.
A brand new query rewrite algorithm has been implemented and is faster, simpler and overall better than the past, current and other abandoned schemes and algorithms. Once it has been properly tested and refactored, it will replace this unoptimised implementation.
It will likely also support budget semantics, because the simpler design makes it possible.
For a simple Trinity::query_rewrite(), with budget set to 250, and a lambda that simply returns an alternative for a sequence of tokens the concatenation of said tokens (i.e from [mac, book] => macbook), for this query
[com plete season steel book edition ps4 game square enix playstation]
the re-written query is wrong, because stopping when budget is depleted apparently breaks the process.We need to either figure out why, or do away with budgets during generation, and then prune the final query after we have constructed it, based on a budget constraint.
For now, budget is not respected until this is fixed.
Private: See Q.cpp