All Products
Search
Document Center

Suggest

Last Updated: Sep 09, 2021

Overview

This topic describes the Suggest class and its methods. This class is used to set the parameters of drop-down suggestions.

Classes required for implementing drop-down suggestions

To use code to implement drop-down suggestions, you need to use multiple classes, such as Suggest, SearchParams, Config, and SearcherClient that depends on another two classes. For more information, see the demo code for implementing drop-down suggestions in standard applications.

Constructor (1)

This constructor requires you to set a name for the drop-down suggestion to be created.
Suggest(String suggestName)

Parameter description

Parameter

Type

Description

suggestName

String

The name of the drop-down suggestion to be created.

Constructor (2)

This constructor requires no parameter.
Suggest()

setSuggestName

Method definition

Sets a name for the drop-down suggestion to be created.
Suggest setSuggestName(String suggestName)

Parameter description

Parameter

Type

Description

suggestName

String

The name of the drop-down suggestion to be created.


getSuggestName

Method definition

Obtains the name of the drop-down suggestion that is created by the current Suggest class.
String    getSuggestName()

Return value

  • The name of the drop-down suggestion that is created by the current Suggest class. Type: String.


setQuery

Method definition

This method is provided by the following class:

SearchParams

For more information, see the "SearchParams" topic.


setHits

Method definition

This method is provided by the following class:

Config

For more information, see the "Config" topic.