Lines Matching defs:query
41 * Utility class used to extract the terms used in a query This class will not
43 * caller must pass a rewritten query (see query.rewrite) to obtain a list of
55 * Get the terms from a query and returns a list of DFAs which match a stream
58 * @param query the query to generate matchers for
64 public LineMatcher[] getMatchers(Query query, Map<String, Boolean> fields) {
69 getTerms(query);
83 private void getTerms(Query query) {
84 if (query instanceof BooleanQuery) {
85 getBooleans((BooleanQuery) query);
86 } else if (query instanceof PhraseQuery) {
87 getPhrases((PhraseQuery) query);
88 } else if (query instanceof WildcardQuery) {
89 getWildTerm((WildcardQuery) query);
90 } else if (query instanceof TermQuery) {
91 getTerm((TermQuery) query);
92 } else if (query instanceof PrefixQuery) {
93 getPrefix((PrefixQuery) query);
94 } else if (query instanceof RegexpQuery) {
95 getRegexp((RegexpQuery) query);
99 private void getRegexp(RegexpQuery query) {
100 if (useTerm(query.getField())) {
101 String term = query.toString(query.getField());
107 private void getBooleans(BooleanQuery query) {
108 for (BooleanClause clause : (BooleanQuery) query) {
115 private void getPhrases(PhraseQuery query) {
116 Term[] queryTerms = query.getTerms();
127 private void getTerm(TermQuery query) {
128 Term term = query.getTerm();
139 private void getWildTerm(WildcardQuery query) {
140 Term term = query.getTerm();
147 private void getPrefix(PrefixQuery query) {
148 Term term = query.getPrefix();