We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 050684d commit 5885979Copy full SHA for 5885979
templates/swift/guides/search/searchWithRuleContextBuyer.mustache
@@ -0,0 +1,24 @@
1
+import Foundation
2
+#if os(Linux) // For linux interop
3
+ import FoundationNetworking
4
+#endif
5
+
6
+import Core
7
+{{> snippets/import}}
8
9
+func searchWithRuleContextBuyer() async throws {
10
+ do {
11
+ {{> snippets/init}}
12
13
+ // get the buyer account information
14
+ let buyer = getBuyerAccountId();
15
+ let searchParams = SearchSearchParams.searchSearchParamsObject(
16
+ SearchSearchParamsObject(query: "<YOUR_SEARCH_QUERY>", ruleContexts: [buyer])
17
+ )
18
19
+ let response: SearchResponse<Hit> = {{#dynamicSnippet}}searchWithSearchParams{{/dynamicSnippet}}
20
+ print(response)
21
+ } catch {
22
+ print(error)
23
+ }
24
+}
0 commit comments