Package com.yahoo.prelude.querytransform
Class QueryRewrite
java.lang.Object
com.yahoo.prelude.querytransform.QueryRewrite
- Author:
- baldersheim
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcollapseSingleComposites(Query query) Collapses all single-childCompositeItems into their parent item.static voidoptimizeAndNot(Query query) Optimize multiple NotItems under and or by collapsing them in to one and leaving the positive ones behind in its place and moving itself with the original and as its positive item and the union of all the negative items of all the original NotItems as its negative items.static voidoptimizeByRestrict(Query query) Optimizes the given query tree based on itsModel.getRestrict()parameter, if any.static voidrewriteSddocname(Query query) Replaces andSimpleIndexedItemsearching in theHit.SDDOCNAME_FIELDwith an item appropriate for the search node.
-
Constructor Details
-
QueryRewrite
public QueryRewrite()
-
-
Method Details
-
optimizeAndNot
Optimize multiple NotItems under and or by collapsing them in to one and leaving the positive ones behind in its place and moving itself with the original and as its positive item and the union of all the negative items of all the original NotItems as its negative items. -
optimizeByRestrict
Optimizes the given query tree based on itsModel.getRestrict()parameter, if any. -
collapseSingleComposites
Collapses all single-childCompositeItems into their parent item. -
rewriteSddocname
Replaces andSimpleIndexedItemsearching in theHit.SDDOCNAME_FIELDwith an item appropriate for the search node.
-