Skip to content

Commit 9eb821b

Browse files
added distincts tests in yaml file
1 parent 0adffbf commit 9eb821b

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.code-samples.meilisearch.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1704,3 +1704,29 @@ create_snapshot_1: |-
17041704
.create_snapshot()
17051705
.await
17061706
.unwrap();
1707+
search_parameter_reference_distinct_1: |-
1708+
let res = client
1709+
.index("INDEX_NAME")
1710+
.search()
1711+
.with_query("QUERY TERMS")
1712+
.with_distinct("ATTRIBUTE_A")
1713+
.execute()
1714+
.await
1715+
.unwrap();
1716+
distinct_attribute_guide_filterable_1: |-
1717+
let task: TaskInfo = client
1718+
.index("products")
1719+
.settings()
1720+
.set_filterable_attributes(["product_id", "sku", "url"])
1721+
.execute()
1722+
.await
1723+
.unwrap();
1724+
distinct_attribute_guide_distinct_parameter_1: |-
1725+
let res = client
1726+
.index("products")
1727+
.search()
1728+
.with_query("white shirt")
1729+
.with_distinct("sku")
1730+
.execute()
1731+
.await
1732+
.unwrap();

0 commit comments

Comments
 (0)