private int RegexQueryNrHits(String regex, IRegexCapabilities capability) { RegexQuery query = new RegexQuery(NewTerm(regex)); if (capability != null) query.RegexImplementation = capability; return searcher.Search(query, null, 1000).TotalHits; }
private int RegexQueryNrHits(String regex, IRegexCapabilities capability) { RegexQuery query = new RegexQuery(NewTerm(regex)); if (capability != null) { query.RegexImplementation = capability; } return(searcher.Search(query, null, 1000).TotalHits); }
public RegexTermEnum(IndexReader reader, Term term, IRegexCapabilities regexImpl) { _sField = term.Field; string sText = term.Text; _regexImpl = regexImpl; _regexImpl.Compile(sText); _sPre = _regexImpl.Prefix() ?? ""; SetEnum(reader.Terms(new Term(term.Field, _sPre))); }
public RegexTermEnum(IndexReader reader, Term term, IRegexCapabilities regexImpl) { _sField = term.Field; string sText = term.Text; _regexImpl = regexImpl; _regexImpl.Compile(sText); _sPre = _regexImpl.Prefix() ?? ""; SetEnum(reader.Terms(new Term(term.Field, _sPre))); }