Skip to content

Commit

Permalink
docs: manage index
Browse files Browse the repository at this point in the history
  • Loading branch information
faustoq committed Jul 8, 2024
1 parent 693f044 commit 9bb687d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,16 @@ $index = new IndexManager($indexId, $manager);
$index->empty();

// Insert records
$index->insert([ 'id' => 1, 'name' => 'John Doe', 'age' => 20 ]);
$index->insert([
['id' => 1, 'name' => 'John Doe', 'age' => 20 ],
['id' => 2, 'name' => 'Mario Rossi', 'age' => 25 ]
]);

// Update record
$index->update([ 'id' => 1, 'name' => 'Jane Doe', 'age' => 30 ]);
$index->update([[ 'id' => 1, 'name' => 'Jane Doe', 'age' => 30 ]]);

// Delete record
$index->delete([ 'id' => 1 ]);
$index->delete([[ 'id' => 1 ]]);

// Trigger deployment
$index->deploy();
Expand Down

0 comments on commit 9bb687d

Please sign in to comment.