---
schema_version: "1"
id: 631a87c88396755a5802da11e552f756ba2ace7dcc96ad85a119560bf6f5cfd9
title: SuggestionResults Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_class_Search_SuggestionResults.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Search_SuggestionResults.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 181c9507faa43135f770e421ccde34c60bf19ad190f894fb66f9d99a2d49a957
description: Wraps the results returned by the Search.suggest(​String, String, Search.SuggestionOption) method.Returns a list of SuggestionResult objects from the response to a call to Search.suggest(String, String, Search.SuggestionOption).Indicates whether a call to System.Search.suggest(String, String, Search.SuggestionOption) has more results available than were returned.
---
# SuggestionResults Class

Wraps the results returned by the Search.suggest(​String, String, Search.SuggestionOption) method.

## Namespace

[Search](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_namespace_Search.htm#apex_namespace_Search "The Search namespace provides classes for getting search results and suggestion results.")

## SuggestionResults Methods

The following are methods for SuggestionResults.

- **[getSuggestionResults()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Search_SuggestionResults.htm#apex_Search_SuggestionResults_getSuggestionResults)**  
    Returns a list of SuggestionResult objects from the response to a call to Search.suggest(String, String, Search.SuggestionOption).
- **[hasMoreResults()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Search_SuggestionResults.htm#apex_Search_SuggestionResults_hasMoreResults)**  
    Indicates whether a call to System.Search.suggest(String, String, Search.SuggestionOption) has more results available than were returned.

### getSuggestionResults()

Returns a list of SuggestionResult objects from the response to a call to Search.suggest(String, String, Search.SuggestionOption).

#### Signature

public List<Search.SuggestionResult> getSuggestionResults()

#### Return Value

Type: [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list "Contains methods for the List collection type.")<[SuggestionResult](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Search_SuggestionResult.htm#apex_class_Search_SuggestionResult "A wrapper object that contains an sObject.")\>

### hasMoreResults()

Indicates whether a call to System.Search.suggest(String, String, Search.SuggestionOption) has more results available than were returned.

#### Signature

public Boolean hasMoreResults()

#### Return Value

Type: [Boolean](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_boolean.htm#apex_methods_system_boolean "Contains methods for the Boolean primitive data type.")

#### Usage

If a limit isn’t specified, 5 records are returned in calls to [System.Search.suggest(String, String, Search.SuggestionOption)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_search.htm#apex_System_Search_suggest "Returns a list of records or Salesforce Knowledge articles whose names or titles match the user’s search query string. Use this method to provide users with shortcuts to navigate to relevant records or articles before they perform a search."). If there are more suggested records than the limit specified, a call to hasMoreResults() returns true.