org.activemath.omdocjdom.index.queries
Class AbstractAMIndexQuery
java.lang.Object
org.activemath.omdocjdom.index.queries.AbstractAMIndexQuery
- All Implemented Interfaces:
- IndexConstants
- Direct Known Subclasses:
- AMIndexQueryList, IdAMIndexQuery, ItemTypeQuery, MDAttributeAMIndexQuery, PhraseAMIndexQuery, PlainTextAMIndexQuery
public abstract class AbstractAMIndexQuery
- extends Object
- implements IndexConstants
|
Field Summary |
protected static boolean |
DEBUG
|
protected static org.apache.commons.logging.Log |
log
|
log
protected static final org.apache.commons.logging.Log log
DEBUG
protected static final boolean DEBUG
AbstractAMIndexQuery
public AbstractAMIndexQuery(List languages)
asLuceneQuery
public org.apache.lucene.search.Query asLuceneQuery()
feedVariationAlongLanguages
public void feedVariationAlongLanguages(float startBoost,
org.apache.lucene.search.BooleanQuery bQ,
org.apache.lucene.search.BooleanClause.Occur occurenceReq)
- Calls
createQueryForVariation(String, String) for each
field and language where a text can occur decreasing progessively
the boosting. The first round is the list of titles, successively
in each language, the second orund is the list of texts, successively
in each language.
- Parameters:
startBoost - the first boost factor, that for the match for
the title in the first language, that will decrease progressivelybQ - the query to be fed with the variationsoccurenceReq - the requirement to occur
createQueryForVariation
protected abstract org.apache.lucene.search.Query createQueryForVariation(String field,
String lang)
- Creates a query for this field and language.
- Parameters:
field - the field name this should apply tolang - the language (added to the field name if non-null)
- Returns:
- the query that will be composed with others with varying fields and languages
toString
public String toString()
- Overrides:
toString in class Object