Class Remap

  • All Implemented Interfaces:
    Query, Serializable

    public class Remap
    extends Object
    implements Query
    A node representing an index remapping.

    A remapping takes results of the underlying Query for an internal index (which must be one of the indices for which the query provides results) and exhibits them as results of an external index. The map provided at construction time under the form of two parallel arrays should remap internal indices to external indices.

    Author:
    Sebastiano Vigna
    See Also:
    RemappingDocumentIterator, Serialized Form
    • Constructor Detail

      • Remap

        public Remap​(Query query,
                     CharSequence[] internalIndex,
                     CharSequence[] externalIndex)
        Creates a new index remapping query node given explicit lists external and internal indices.
        Parameters:
        query - the underlying query.
        internalIndex - the array of internal index names.
        externalIndex - the array of external index names, parallel to internalIndex.
      • Remap

        public Remap​(Query query,
                     Object2ObjectMap<String,​String> indexRemapping)
        Creates a new index remapping query node given an index remapping.
        Parameters:
        query - the underlying query.
        indexRemapping - a map from internal to external indices, which will be copied internally.