Class Document

java.lang.Object
de.cxp.ocs.model.index.Document
Direct Known Subclasses:
Product

public class Document extends Object
A simple 'data record' similar to a row inside a CSV file that contains any data relevant for search. The single field types and conversions are part of the according service configuration.
  • Field Details

  • Constructor Details

    • Document

      public Document()
  • Method Details

    • set

      public Document set(String name, String... values)
    • set

      public Document set(String name, long... values)
    • set

      public Document set(String name, int... values)
    • set

      public Document set(String name, double... values)
    • addPath

      public Document addPath(String name, Category... values)
      Add a hierarchical path for a given field name. This is usable in case you have multiple different category trees.
      Parameters:
      name - field name
      values - single path hierarchy
      Returns:
      the modified document (fluent return)
    • setAttributes

      public Document setAttributes(Attribute... values)
    • addAttribute

      public Document addAttribute(Attribute attr)
    • addCategory

      @Deprecated public Document addCategory(Category... values)
      Deprecated.
      use addPath with a specific name. For legacy usage, use the field name used in the according indexer field configuration.
      Parameters:
      values - single path
      Returns:
      modified document (fluent return)