Class: Pinecone::Client

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/pinecone/client.rb

Instance Method Summary collapse

Instance Method Details

#configure_index(index_name, body) ⇒ Object



21
22
23
# File 'lib/pinecone/client.rb', line 21

def configure_index(index_name, body)
  Pinecone::Index.new.configure(index_name, body)
end

#create_collection(body) ⇒ Object



33
34
35
# File 'lib/pinecone/client.rb', line 33

def create_collection(body)
  Pinecone::Collection.new.create(body)
end

#create_index(body) ⇒ Object



13
14
15
# File 'lib/pinecone/client.rb', line 13

def create_index(body)
  Pinecone::Index.new.create(body)
end

#delete_collection(collection_name) ⇒ Object



37
38
39
# File 'lib/pinecone/client.rb', line 37

def delete_collection(collection_name)
  Pinecone::Collection.new.delete(collection_name)
end

#delete_index(index_name) ⇒ Object



17
18
19
# File 'lib/pinecone/client.rb', line 17

def delete_index(index_name)
  Pinecone::Index.new.delete(index_name)
end

#describe_collection(collection_name) ⇒ Object



29
30
31
# File 'lib/pinecone/client.rb', line 29

def describe_collection(collection_name)
  Pinecone::Collection.new.describe(collection_name)
end

#describe_index(index_name) ⇒ Object



9
10
11
# File 'lib/pinecone/client.rb', line 9

def describe_index(index_name)
  Pinecone::Index.new.describe(index_name)
end

#index(index_name) ⇒ Object

This is a very confusing naming convention Pinecone’s reference now delineates between ‘control plane’ and ‘data plane’ which we’ll reflect eventually



43
44
45
# File 'lib/pinecone/client.rb', line 43

def index(index_name)
  Pinecone::Vector.new(index_name)
end

#list_collectionsObject



25
26
27
# File 'lib/pinecone/client.rb', line 25

def list_collections
  Pinecone::Collection.new.list
end

#list_indexesObject



5
6
7
# File 'lib/pinecone/client.rb', line 5

def list_indexes
  Pinecone::Index.new.list
end