Appearance
Search Term Prediction with our Java client
Looking for setup prerequisites, authentication details, and package references? Start with the Java SDK landing page.
Start by making a Searcher instance.
java
Searcher searcher = new Searcher(
"00000000-0000-0000-0000-000000000001",
"your API Key",
"the server URL for the dataset");The following example predicts search terms for the current user input.
java
SearchTermPredictionRequest request = SearchTermPredictionRequest.create(
Language.create("da"),
Currency.create("DKK"),
getUser(),
"Search Overlay",
"sho",
10);
SearchTermPredictionResponse response = searcher.predict(request);Search term prediction is commonly used in search overlays and autocomplete experiences.