Class RegexCompletionQuery


public class RegexCompletionQuery extends CompletionQuery
A CompletionQuery which takes a regular expression as the prefix of the query term.

Example usage of querying a prefix of 'sug' and 'sub' as a regular expression against a suggest field 'suggest_field':

  CompletionQuery query = new RegexCompletionQuery(new Term("suggest_field", "su[g|b]"));
 

See RegExp for the supported regular expression syntax

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