Method: Langchain::Vectorsearch::Milvus#remove_texts

Defined in:
lib/langchain/vectorsearch/milvus.rb

#remove_texts(ids:) ⇒ Boolean

Deletes a list of texts in the index

Parameters:

  • ids (Array<Integer>)

    The ids of texts to delete

Returns:

  • (Boolean)

    The response from the server

Raises:

  • (ArgumentError)


41
42
43
44
45
46
47
48
# File 'lib/langchain/vectorsearch/milvus.rb', line 41

def remove_texts(ids:)
  raise ArgumentError, "ids must be an array" unless ids.is_a?(Array)

  client.entities.delete(
    collection_name: index_name,
    filter: "id in #{ids}"
  )
end