Class AzureCognitiveSearchMemoryRecord


  • public final class AzureCognitiveSearchMemoryRecord
    extends Object
    Azure Cognitive Search record and index definition. Note: once defined, index cannot be modified.
    • Constructor Detail

      • AzureCognitiveSearchMemoryRecord

        public AzureCognitiveSearchMemoryRecord​(String id,
                                                String text,
                                                String description,
                                                String additionalMetadata,
                                                List<Float> embedding,
                                                String externalSourceName,
                                                boolean isReference)
    • Method Detail

      • getId

        public String getId()
        Record ID. The record is not filterable to save quota, also SK uses only semantic search.
        Returns:
        Record ID.
      • getText

        public String getText()
        Content is stored here.
        Returns:
        Content is stored here, null if not set.
      • getDescription

        public String getDescription()
        Optional description of the content, e.g. a title. This can be useful when indexing external data without pulling in the entire content.
        Returns:
        Optional description of the content, null if not set.
      • getAdditionalMetadata

        public String getAdditionalMetadata()
        Additional metadata. Currently, this is a String where you could store serialized data as JSON. In future the design might change to allow storing named values and leverage filters.
        Returns:
        Additional metadata, null if not set.
      • getEmbedding

        public List<Float> getEmbedding()
        Embedding vector.
        Returns:
        Embedding vector.
      • getExternalSourceName

        public String getExternalSourceName()
        Name of the external source, in cases where the content and the Id are referenced to external information.
        Returns:
        Name of the external source, in cases where the content and the Id are referenced to external information, null if not set.
      • isReference

        public boolean isReference()
        Whether the record references external information.
        Returns:
        true if the record references external information, false otherwise.
      • toMemoryRecord

        public MemoryRecord toMemoryRecord​(boolean withEmbeddings)