-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Description
The query conditions -> query execution translation code will take a short cut and construct a NOP (no operation) query which always returns an empty result set. When a query with variables is compiled prior to any data making its way into the indices, the resulting query executor never picks up on the new data because of that optimization.
The solution is to optimize only when the query expression has no varaibles in it. Example problematic code is the AtomTypeCondition convereter in ToQueryMap which has this logic:
public HGQuery<?> getQuery(final HyperGraph graph, HGQueryCondition c)
{
final AtomTypeCondition ac = (AtomTypeCondition)c;
if (!hg.isVar(ac.getTypeReference()) && ac.getTypeHandle() == null &&
graph.getTypeSystem().getTypeHandleIfDefined(ac.getJavaClass()) == null)
return HGQuery.NOP();
return new SearchableBasedQuery(graph.getIndexManager().getIndexByType(),
etc....
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels