Class AzureCognitiveSearchMemoryRecord
- java.lang.Object
-
- com.microsoft.semantickernel.connectors.memory.azurecognitivesearch.AzureCognitiveSearchMemoryRecord
-
public final class AzureCognitiveSearchMemoryRecord extends Object
Azure Cognitive Search record and index definition. Note: once defined, index cannot be modified.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AzureCognitiveSearchMemoryRecordfromMemoryRecord(MemoryRecord record)StringgetAdditionalMetadata()Additional metadata.StringgetDescription()Optional description of the content, e.g.List<Float>getEmbedding()Embedding vector.StringgetExternalSourceName()Name of the external source, in cases where the content and the Id are referenced to external information.StringgetId()Record ID.StringgetText()Content is stored here.booleanisReference()Whether the record references external information.MemoryRecordtoMemoryRecord()MemoryRecordtoMemoryRecord(boolean withEmbeddings)MemoryRecordMetadatatoMemoryRecordMetadata()
-
-
-
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,
nullif 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,
nullif 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,
nullif not set.
-
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,
nullif not set.
-
isReference
public boolean isReference()
Whether the record references external information.- Returns:
trueif the record references external information,falseotherwise.
-
toMemoryRecordMetadata
public MemoryRecordMetadata toMemoryRecordMetadata()
-
fromMemoryRecord
public static AzureCognitiveSearchMemoryRecord fromMemoryRecord(MemoryRecord record)
-
toMemoryRecord
public MemoryRecord toMemoryRecord()
-
toMemoryRecord
public MemoryRecord toMemoryRecord(boolean withEmbeddings)
-
-