Class ContextQuery

  • All Implemented Interfaces:
    Accountable

    public class ContextQuery
    extends CompletionQuery
    implements Accountable
    A CompletionQuery that matches documents specified by a wrapped CompletionQuery supporting boosting and/or filtering by specified contexts.

    Use this query against ContextSuggestField

    Example of using a CompletionQuery with boosted contexts:

      CompletionQuery completionQuery = ...;
      ContextQuery query = new ContextQuery(completionQuery);
      query.addContext("context1", 2);
      query.addContext("context2", 1);
     

    NOTE:

    WARNING: This API is experimental and might change in incompatible ways in the next release.