Class PureWeightedItem

java.lang.Object
com.yahoo.prelude.query.Item
com.yahoo.prelude.query.PureWeightedItem
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
PureWeightedInteger, PureWeightedString

public abstract class PureWeightedItem extends Item
A word item which only consists of a value and weight, and gets other properties such as the index to query from ther parent item. It's more efficient to use pure items where possible instead of TermItem children (WordItem, IntItem) which may carry many auxiliary properties.
Author:
baldersheim
  • Constructor Details

    • PureWeightedItem

      public PureWeightedItem(int weight)
  • Method Details

    • setIndexName

      public void setIndexName(String index)
      Ignored.
      Specified by:
      setIndexName in class Item
    • getName

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

      public int encode(ByteBuffer buffer)
      Specified by:
      encode 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
    • disclose

      public void disclose(Discloser discloser)
      Overrides:
      disclose in class Item