Class FalseItem

java.lang.Object
com.yahoo.prelude.query.Item
com.yahoo.prelude.query.FalseItem
All Implemented Interfaces:
Cloneable

public class FalseItem extends Item
A query item which never matches. This is sometimes a useful output of query rewriting.
Author:
bratseth
  • Constructor Details

    • FalseItem

      public FalseItem()
  • Method Details

    • setIndexName

      public void setIndexName(String index)
      Description copied from class: Item
      Sets the index name of this item
      Specified by:
      setIndexName in class Item
    • getItemType

      public Item.ItemType getItemType()
      Description copied from class: Item
      Return the enumerated type of this item.
      Specified by:
      getItemType in class Item
    • getName

      public String getName()
      Description copied from class: Item
      Returns the name of this item
      Specified by:
      getName in class Item
    • appendHeadingString

      protected void appendHeadingString(StringBuilder buffer)
      Override to only return "FALSE" rather than "FALSE "
      Overrides:
      appendHeadingString in class Item
    • encode

      public int encode(ByteBuffer buffer)
      Specified by:
      encode in class Item
    • getTermCount

      public int getTermCount()
      Specified by:
      getTermCount in class Item
    • appendBodyString

      protected void appendBodyString(StringBuilder buffer)
      Description copied from class: Item
      Override to append the item body in the canonical query language of this item. An item is usually represented by the string
       ([itemName] [body])
       
      The body must be appended appended by this method.
      Specified by:
      appendBodyString in class Item