Skip to main content

QueryMilvus

Description

Queries a given collection in a Milvus database using vectors. Results of query are added to current record under the results record path for each vector searched.

Tags

chatbot, embeddings, gen ai, genai, generative ai, llm, metadata, milvus, publish, query, search, text, vector

Properties

In the list below required Properties are shown with an asterisk (*). Other properties are considered optional. The table also indicates any default values, and whether a property supports the NiFi Expression Language.

Display NameAPI NameDefault ValueAllowable ValuesDescription
Milvus Connection Service *Milvus Connection ServiceController Service:
MilvusConnectionService

Implementations:
StandardMilvusConnectionService
Connection Service for accessing Milvus Database
Collection Name *Collection NameThe name of the Milvus collection name to use

Supports Expression Language, using FlowFile attributes and Environment variables.
Results Record Path *Results Record PathSpecifies where in the record to place the results.

Supports Expression Language, using FlowFile attributes and Environment variables.
Record Reader *Record ReaderController Service:
RecordReaderFactory

Implementations:
AvroReader
CEFReader
CSVReader
ExcelReader
GrokReader
JsonPathReader
JsonTreeReader
ReaderLookup
ScriptedReader
Syslog5424Reader
SyslogReader
WindowsEventLogReader
XMLReader
YamlTreeReader
The Record Reader to use for reading the FlowFile
Record Writer *Record WriterController Service:
RecordSetWriterFactory

Implementations:
AvroRecordSetWriter
CSVRecordSetWriter
FreeFormTextRecordSetWriter
JsonRecordSetWriter
RecordSetWriterLookup
ScriptedRecordSetWriter
XMLRecordSetWriter
The Record Writer to use for writing the results
Vector Record Path *Vector Record Path/embeddingsThe path to the vector field in the record

Supports Expression Language, using FlowFile attributes and Environment variables.
Vector Field Name *Vector Field NamevectorThe name of the field in Milvus to use for storing the vectors.

This property is only considered if:
  • the property Vector Record Path has a value specified
Sparse Vector Indices PathSparse Vector Indices PathIf, Sparse Vectors are to be provided, this RecordPath points to the indices of the sparse data to use.

Supports Expression Language, using FlowFile attributes and Environment variables.
Sparse Vector Values Path *Sparse Vector Values PathIf, Sparse Vectors are to be provided, this RecordPath points to the values of the sparse data to use.

Supports Expression Language, using FlowFile attributes and Environment variables.

This property is only considered if:
  • the property Sparse Vector Indices Path has a value specified
Sparse Vector Field Name *Sparse Vector Field Namesparse_vectorsThe name of the field to use for storing the sparse vectors.

This property is only considered if:
  • the property Sparse Vector Values Path has a value specified
Output Search Fields *Output Search Fieldsvector, textComma separated list of additional fields to return from a search against the Milvus database. Milvus will return the score and id fields by default.
Maximum Results *Maximum Results10The maximum number of results to return (i.e., Top K)
PartitionPartitionPartition of the vector database that you want to perform operations in. If the database has only one partition leave empty.
Reranking Smoothing Parameter *Reranking Smoothing Parameter60Smoothing Parameter of the Reciprocal Rank Fusion (RRFRanker) during Hybrid Search

This property is only considered if:
  • the property Sparse Vector Field Name has a value specified
Max Query Batch Size *Max Query Batch Size10This is the number of vectors that are contained in a single request to Milvus during a query.Milvus is unable to support batch queries of more then 10 vectors at a time.

Dynamic Properties

This component does not support dynamic properties.

Relationships

NameDescription
failureFlowFiles that cannot be sent to Milvus, and for which a retry is not expected to be successful, are routed to this relationship
retryFlowFiles that fail to be sent to Milvus, but for which a retry may help, are routed to this relationship
successFlowFiles that are successfully sent to Milvus are routed to this relationship

Reads Attributes

This processor does not read attributes.

Writes Attributes

This processor does not write attributes.

State Management

This component does not store state.

Restricted

This component is not restricted.

Input Requirement

This component requires an incoming relationship.

System Resource Considerations

This component does not specify system resource considerations.

See Also

UpsertMilvus