Skip to content

Commit

Permalink
Add more examples to README
Browse files Browse the repository at this point in the history
  • Loading branch information
robottokauf3 committed May 31, 2020
1 parent a12a81f commit fceacf4
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,29 @@ Meilisearch.Index.create("index_name")

# Create Index and set primary key
Meilisearch.Index.create("index_name", primary_key: "key_name")

# Insert documents
documents = [
%{
"id" => 1,
"tagline" => "In space no one can hear you scream",
"title" => "Alien"
},
%{
"id" => 2,
"tagline" => "You'll never go in the water again",
"title" => "Jaws"
},
%{
"id" => 3,
"tagline" => "Be Afraid. Be very afraid.",
"title" => "The Fly"
}
]
Meilisearch.Document.add_or_replace("index_name", documents)

# Search
Meilisearch.Search.search("water")
```

### Available Modules
Expand Down

0 comments on commit fceacf4

Please sign in to comment.