Class QueryRewrite


  • public class QueryRewrite
    extends java.lang.Object
    Author:
    baldersheim
    • Constructor Summary

      Constructors 
      Constructor Description
      QueryRewrite()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void collapseSingleComposites​(Query query)
      Collapses all single-child CompositeItems into their parent item.
      static void optimizeAndNot​(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 void optimizeByRestrict​(Query query)
      Optimizes the given query tree based on its Model.getRestrict() parameter, if any.
      static void rewriteSddocname​(Query query)
      Replaces and SimpleIndexedItem searching in the Hit.SDDOCNAME_FIELD with an item appropriate for the search node.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • QueryRewrite

        public QueryRewrite()
    • Method Detail

      • optimizeAndNot

        public static void optimizeAndNot​(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.
      • optimizeByRestrict

        public static void optimizeByRestrict​(Query query)
        Optimizes the given query tree based on its Model.getRestrict() parameter, if any.
      • collapseSingleComposites

        public static void collapseSingleComposites​(Query query)
        Collapses all single-child CompositeItems into their parent item.