Hi all, I'm trying to build a (elastic) suggester that uses context in completionqueries to implement authorization for these suggestions. Basically, I only want suggestions from the contexts where the user has rights. (not sure if this is the best way, suggestions (no pun intended) welcome)
What I observe is that if the number of contexts in the query increases, retrieving the suggestions becomes very slow. Typically a user can have up to 1000 access groups (yes it's complex, yes it should be reduced). In a previous project, we used plain Lucene to build a OR query for these access groups and that was still fast. I tried to follow the Elastic source and at some point it leads to code that generates a ContextQuery. So, that leads me to wonder why using these contexts in CompletionQuery makes it so slow. Do you have any hits? Thanks! -Rob