Package it.unimi.di.big.mg4j.query.nodes
Class MultiIndexTermExpander
- java.lang.Object
-
- it.unimi.di.big.mg4j.query.nodes.AbstractTermExpander
-
- it.unimi.di.big.mg4j.query.nodes.MultiIndexTermExpander
-
- All Implemented Interfaces:
QueryTransformer
public class MultiIndexTermExpander extends AbstractTermExpander
A term expander that replaces every term or prefix with a disjunction of queries; each query is made by the same term or prefix preceded by a selection over a different index.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
MultiIndexTermExpander.ExpanderVisitor
-
Constructor Summary
Constructors Constructor Description MultiIndexTermExpander(String... index)
Creates a new multi-index term expander.
-
Method Summary
Modifier and Type Method Description protected Query
expand(Consecutive consecutive)
protected Query
expand(OrderedAnd orderedAnd)
Query
expand(Prefix prefix)
Expands a prefix.Query
expand(Term term)
Expands a single term.protected MultiIndexTermExpander.ExpanderVisitor
expanderVisitor()
Returns a new expander visitor.-
Methods inherited from class it.unimi.di.big.mg4j.query.nodes.AbstractTermExpander
transform
-
-
-
-
Constructor Detail
-
MultiIndexTermExpander
public MultiIndexTermExpander(String... index)
Creates a new multi-index term expander.- Parameters:
index
- a list of index names that will be used to expand the term.
-
-
Method Detail
-
expanderVisitor
protected MultiIndexTermExpander.ExpanderVisitor expanderVisitor()
Description copied from class:AbstractTermExpander
Returns a new expander visitor.- Overrides:
expanderVisitor
in classAbstractTermExpander
- Returns:
- a visitor performing the expansion.
-
expand
protected Query expand(Consecutive consecutive)
-
expand
protected Query expand(OrderedAnd orderedAnd)
-
expand
public Query expand(Term term)
Description copied from class:AbstractTermExpander
Expands a single term.- Specified by:
expand
in classAbstractTermExpander
- Parameters:
term
- a term to be expanded.- Returns:
- the resulting query.
-
expand
public Query expand(Prefix prefix)
Description copied from class:AbstractTermExpander
Expands a prefix.- Specified by:
expand
in classAbstractTermExpander
- Parameters:
prefix
- the prefix to be expanded.- Returns:
- the resulting query.
-
-