Class SimpleTaggableItem

  • All Implemented Interfaces:
    TaggableItem, java.lang.Cloneable
    Direct Known Subclasses:
    NearestNeighborItem, PredicateQueryItem, SimpleIndexedItem, WeightedSetItem

    public abstract class SimpleTaggableItem
    extends Item
    implements TaggableItem
    Common implementation for Item classes implementing the TaggableItem interface. Note that this file exist in 3 copies that should be kept in sync: These should only have trivial differences. (multiple inheritance or mixins would have been nice).
    • Constructor Detail

      • SimpleTaggableItem

        public SimpleTaggableItem()
    • Method Detail

      • setConnectivity

        public void setConnectivity​(Item item,
                                    double connectivity)
        Description copied from interface: TaggableItem
        Set the connectivity to another term in the same query tree. This is used to influence ranking features taking proximity into account: nativeRank and a subset of the fieldMatch features.

        By default consecutive query terms are 'somewhat' connected, meaning ranking features will be better in documents where the terms are found close to each other. This effect can be increased or decreased by manipulating the connectivity value. Typical use is to increase the connectivity between terms in the query that we believe are semantically connected. E.g in the query 'new york hotel', it is a good idea to increase the connectivity between "new" and "york" to ensure that a document containing "List of hotels in New York" is ranked above one containing "List of new hotels in York".

        Specified by:
        setConnectivity in interface TaggableItem
        item - the item this should be connected to - in practice the next consecutive item in the query
        connectivity - a value between 0 (none) and 1 (maximal), defining the connectivity between this and the argument item. The default connectivity is 0.1.
      • setSignificance

        public void setSignificance​(double significance)
        Description copied from interface: TaggableItem
        Used for setting explicit term significance (in the tf/idf sense) to a single term or phrase, relative to the rest of the query. This influences ranking features which take term significance into account and overrides the default partial corpus based term significance computation happening in the backend.
        Specified by:
        setSignificance in interface TaggableItem