org.apache.accumulo.examples.wikisearch.parser
Class FieldIndexQueryReWriter
java.lang.Object
org.apache.accumulo.examples.wikisearch.parser.FieldIndexQueryReWriter
public class FieldIndexQueryReWriter
- extends Object
The server-side field index queries can only support operations on indexed fields. Additionally, queries that have differing ranges (i.e. one range at the
fieldname level and another at the fieldValue level) are not currently supported. This class removes these conflicts from the query as well as sets proper
capitalization configurations etc.
Once the query has been modified, you can pass it to the BooleanLogicIterator on the server-side via the options map.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected static final org.apache.log4j.Logger log
INDEXED_TERMS_LIST
public static final String INDEXED_TERMS_LIST
- See Also:
- Constant Field Values
rangeNodeSet
public static Set<Integer> rangeNodeSet
FieldIndexQueryReWriter
public FieldIndexQueryReWriter()
setLogLevel
public static void setLogLevel(org.apache.log4j.Level lev)
removeNonIndexedTermsAndInvalidRanges
public String removeNonIndexedTermsAndInvalidRanges(String query,
Map<String,String> options)
throws org.apache.commons.jexl2.parser.ParseException,
Exception
- Parameters:
query
- options
-
- Returns:
- String representation of a given query.
- Throws:
org.apache.commons.jexl2.parser.ParseException
Exception
applyNormalizedTerms
public String applyNormalizedTerms(String query,
Map<String,String> options)
throws org.apache.commons.jexl2.parser.ParseException,
Exception
- Parameters:
query
- options
-
- Returns:
- String representation of a given query.
- Throws:
org.apache.commons.jexl2.parser.ParseException
Exception
applyCaseSensitivity
public String applyCaseSensitivity(String query,
boolean fNameUpper,
boolean fValueUpper)
throws org.apache.commons.jexl2.parser.ParseException
- Parameters:
query
- fNameUpper
- fValueUpper
-
- Returns:
- String representation of a given query.
- Throws:
org.apache.commons.jexl2.parser.ParseException
parseIndexedTerms
public com.google.common.collect.Multimap<String,String> parseIndexedTerms(Map<String,String> options)
- Parameters:
options
-
refactorTree
public FieldIndexQueryReWriter.RewriterTreeNode refactorTree(FieldIndexQueryReWriter.RewriterTreeNode root)
- Parameters:
root
-
Copyright © 2012 The Apache Software Foundation. All Rights Reserved.