public class ExtractorQueryParser
extends org.apache.lucene.queryParser.QueryParser
AND_OPERATOR, jj_nt, OR_OPERATOR, token, token_source
_ESCAPED_CHAR, _NUM_CHAR, _QUOTED_CHAR, _TERM_CHAR, _TERM_START_CHAR, _WHITESPACE, AND, Boost, CARAT, COLON, DEFAULT, EOF, FUZZY_SLOP, LPAREN, MINUS, NOT, NUMBER, OR, PLUS, PREFIXTERM, QUOTED, RangeEx, RANGEEX_END, RANGEEX_GOOP, RANGEEX_QUOTED, RANGEEX_START, RANGEEX_TO, RangeIn, RANGEIN_END, RANGEIN_GOOP, RANGEIN_QUOTED, RANGEIN_START, RANGEIN_TO, RPAREN, STAR, TERM, tokenImage, WILDTERM
Constructor and Description |
---|
ExtractorQueryParser(java.lang.String defaultFieldInQuery,
org.apache.lucene.analysis.Analyzer analyzer,
java.lang.String fieldToExtract)
Constructor for the ExtractorQueryParser object
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getDateStamp()
Gets a datestamp of the current time formatted for display with logs and output.
|
java.lang.String[] |
getExtractedTerms()
Gets the terms extracted from the given field after calling the parse method.
|
protected org.apache.lucene.search.Query |
getFieldQuery(java.lang.String field,
java.lang.String queryText)
Gets the fieldQuery attribute of the ExtractorQueryParser object
|
static void |
setDebug(boolean db)
Sets the debug attribute of the FieldQueryParser object
|
addClause, Clause, Conjunction, disable_tracing, enable_tracing, escape, generateParseException, getAllowLeadingWildcard, getAnalyzer, getBooleanQuery, getBooleanQuery, getDateResolution, getDefaultOperator, getEnablePositionIncrements, getField, getFieldQuery, getFuzzyMinSim, getFuzzyPrefixLength, getFuzzyQuery, getLocale, getLowercaseExpandedTerms, getMultiTermRewriteMethod, getNextToken, getPhraseSlop, getPrefixQuery, getRangeCollator, getRangeQuery, getToken, getWildcardQuery, main, Modifiers, newBooleanClause, newBooleanQuery, newFuzzyQuery, newMatchAllDocsQuery, newMultiPhraseQuery, newPhraseQuery, newPrefixQuery, newRangeQuery, newTermQuery, newWildcardQuery, parse, Query, ReInit, ReInit, setAllowLeadingWildcard, setDateResolution, setDateResolution, setDefaultOperator, setEnablePositionIncrements, setFuzzyMinSim, setFuzzyPrefixLength, setLocale, setLowercaseExpandedTerms, setMultiTermRewriteMethod, setPhraseSlop, setRangeCollator, Term, TopLevelQuery
public ExtractorQueryParser(java.lang.String defaultFieldInQuery, org.apache.lucene.analysis.Analyzer analyzer, java.lang.String fieldToExtract)
defaultFieldInQuery
- The defult field in the query you are parsinganalyzer
- The Analyzer to use when parsing the queryfieldToExtract
- The field you wish to extract the terms fromprotected org.apache.lucene.search.Query getFieldQuery(java.lang.String field, java.lang.String queryText) throws org.apache.lucene.queryParser.ParseException
getFieldQuery
in class org.apache.lucene.queryParser.QueryParser
field
- The field being processedqueryText
- The text in the fieldorg.apache.lucene.queryParser.ParseException
- If errorpublic java.lang.String[] getExtractedTerms()
public static final java.lang.String getDateStamp()
public static void setDebug(boolean db)
db
- The new debug value