প্রবণতা অনুসন্ধান

ট্রেন্ডিং পান

প্রবণতামূলক অনুসন্ধানগুলি পেতে, ContextualSearchRuntime রানটাইমে getTrendingSearches পদ্ধতিতে কল করুন৷ এই পদ্ধতিতে একটি একক GetTrendingSearchesOptions লাগে যেখানে আপনি প্রত্যাবর্তনের সর্বাধিক সংখ্যক প্রবণতা নির্দিষ্ট করতে পারেন।

ফিরে আসা SearchSuggestions অবজেক্টে কোনো অ্যাক্সেসযোগ্য বৈশিষ্ট্য নেই। এটি প্রবণতা অনুসন্ধানগুলি রেন্ডার করার জন্য প্রয়োজনীয় সমস্ত তথ্য ধারণ করে, কিন্তু অন্যথায় অস্বচ্ছ।

সুইফট সুইফট কনকারেন্সি স্টাইল ব্যবহার করে, অবজেক্টিভ-সি একটি কলব্যাক ফাংশন ব্যবহার করে।

সুইফট

GetTrendingSearchs(অপশন সহ:)

Task {
    let suggestions = try await searchRuntime.getTrendingSearches(
            withOptions: GetTrendingSearchesOptions())
}

উদ্দেশ্য-C

GetTrendingSearchesWithOptions

  [searchRuntime
      getTrendingSearchesWithOptions:
            [[GetTrendingSearchesOptions alloc] init]
                             completionHandler:^(SearchSuggestions *_Nullable suggestions,
                                                 NSError *_Nullable error) {
                              // error will be not null if there is an error.
                              // On success, suggestions will be non null.
                            }];

প্রদর্শন

ট্রেন্ডিং সার্চ চিপ প্রদর্শন করতে, সার্চ সাজেশনের মতোই ব্যবহার করুন।

পরবর্তী: অনুসন্ধান ফলাফল প্রদর্শন করুন