no.sesat.search.query.parser.alt
Interface Alternation
- All Known Implementing Classes:
- AbstractAlternation, FullnameAlternation, RotationAlternation
public interface Alternation
An Alternation is a query manipulation occurring on the query object after parsing has finished.
Alernations are cpu expensive as Clauses are immutable and every change during the alternation
results in a new Clause being constructed. A change in a clause deep within the query tree requires every parent
in it's ancestry line back to the query's root clause being reconstructed.
The value of alternation comes into play where the query parser cannot construct such a result, and doing the
manipulation on-the-fly will likely occur multiple times during the request.
It's typical that the alternations do not directly manipulate any clause but constructed an alternative clause to it
and replaces the original clause with an XorClause that contains both the original and the new alternative.
In these cases it is also typical that only one type of XorClause.Hint is used through that alternation process.
- Version:
- $Id: Alternation.java 7225 2009-04-09 00:32:20Z ssmiweve $
alternate
Clause alternate(Clause clause)
- Perform the alternation.
- Parameters:
clause -
- Returns:
Copyright © 2005-2009 Schibsted ASA. All Rights Reserved.