Skip to content

Commit 303c10a

Browse files
committed
[AUTOMATION POST DEPLOYMENT] Update code samples
1 parent 3060253 commit 303c10a

3 files changed

Lines changed: 27 additions & 2 deletions

File tree

snippets/generated-code-samples/code_samples_get_index_stats_1.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ client.index('movies').getStats()
1010
```
1111

1212
```python Python
13-
client.index('movies').get_stats()
13+
client.index('movies').get_stats(show_internal_database_sizes=True, size_format='human')
1414
```
1515

1616
```php PHP

snippets/generated-code-samples/code_samples_get_indexes_stats_1.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ client.getStats()
1010
```
1111

1212
```python Python
13-
client.get_all_stats()
13+
client.get_all_stats(show_internal_database_sizes=True, size_format='human')
1414
```
1515

1616
```php PHP

snippets/generated-code-samples/code_samples_post_render_template_1.mdx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,31 @@ client.render_template(
4444
)
4545
```
4646

47+
```java Java
48+
Map<String, Boolean> features = new HashMap<>();
49+
features.put("renderRoute", true);
50+
client.experimentalFeatures(features);
51+
52+
Map<String, Object> template = new HashMap<>();
53+
template.put("kind", "inlineDocumentTemplate");
54+
template.put("inline", "Product {{doc.name}} is a {{doc.color}} {{doc.category}}.");
55+
56+
Map<String, Object> product = new HashMap<>();
57+
product.put("name", "Nike Air Max");
58+
product.put("color", "Black");
59+
product.put("category", "Shoes");
60+
61+
Map<String, Object> input = new HashMap<>();
62+
input.put("kind", "inlineDocument");
63+
input.put("inline", product);
64+
65+
RenderTemplateRequest request = new RenderTemplateRequest()
66+
.setTemplate(template)
67+
.setInput(input);
68+
69+
client.renderTemplate(request);
70+
```
71+
4772
```go Go
4873
client.RenderTemplate(&meilisearch.RenderTemplateParams{
4974
Template: meilisearch.Template{

0 commit comments

Comments
 (0)