---
schema_version: "1"
id: 7b88bc7cb9fd191062751ebaf97bf6247213485e2db4941e3b311a1249e5d07a
title: CommerceSearchSettings Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_ConnectAPI_CommerceSearchSettings_static_methods.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ConnectAPI_CommerceSearchSettings_static_methods.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 07b0b118e5a435b0ffb0abd00d8076a32776371daf19dbdd8d3711096f6745c3
description: Get indexes. Get index logs. Create an index of a product catalog.These methods are for CommerceSearchSettings. All methods are static.Create an index of a product catalog.Get a Commerce search index.Get Commerce search indexes.Get Commerce search index logs.
---
# CommerceSearchSettings Class

Get indexes. Get index logs. Create an index of a product catalog.

## Namespace

[ConnectApi](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_classes_connect_api.htm "The ConnectApi namespace (also called Connect in Apex) provides classes for accessing the same data available in Connect REST API. Use Connect in Apex to create custom experiences in Salesforce.")

## CommerceSearchSettings Methods

These methods are for CommerceSearchSettings. All methods are static.

- **[createCommerceSearchIndex(webstoreId, indexBuildType)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ConnectAPI_CommerceSearchSettings_static_methods.htm#apex_ConnectAPI_CommerceSearchSettings_postCommerceSearchIndex_2)**  
    Create an index of a product catalog.
- **[getCommerceSearchIndex(webstoreId, indexId)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ConnectAPI_CommerceSearchSettings_static_methods.htm#apex_ConnectAPI_CommerceSearchSettings_getSingleCommerceSearchIndex_1)**  
    Get a Commerce search index.
- **[getCommerceSearchIndexes(webstoreId)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ConnectAPI_CommerceSearchSettings_static_methods.htm#apex_ConnectAPI_CommerceSearchSettings_getCommerceSearchIndexes_1)**  
    Get Commerce search indexes.
- **[getCommerceSearchIndexLogs(webstoreId)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ConnectAPI_CommerceSearchSettings_static_methods.htm#apex_ConnectAPI_CommerceSearchSettings_getCommerceSearchIndexLogs_1)**  
    Get Commerce search index logs.

### createCommerceSearchIndex(webstoreId, indexBuildType)

Create an index of a product catalog.

#### API Version

57.0

#### Requires Chatter

Yes

#### Signature

public static ConnectApi.CommerceSearchIndex createCommerceSearchIndex(String webstoreId, String indexBuildType)

#### Parameters

webstoreId

Type: String

ID of the webstore.

**indexBuildType**

Type: [ConnectApi.CommerceSearchIndexBuildType](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/connectAPI_enums.htm#CommerceSearchIndexBuildTypeEnum)

Build type of the index. Values are:

- Full
- Incremental

#### Return Value

Type: [ConnectApi.CommerceSearchIndex](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_output_commerce_search_index_output.htm "Index information.")

#### Usage

This method creates a live index that replaces the current live index. Any indexes that are in progress are removed when you manually create an index with this method.

### getCommerceSearchIndex(webstoreId, indexId)

Get a Commerce search index.

#### API Version

52.0

#### Requires Chatter

Yes

#### Signature

public static ConnectApi.CommerceSearchIndex getSingleCommerceSearchIndex(String webstoreId, String indexId)

#### Parameters

webstoreId

Type: String

ID of the webstore.

indexId

Type: String

ID of the index.

#### Return Value

Type: [ConnectApi.CommerceSearchIndex](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_output_commerce_search_index_output.htm "Index information.")

### getCommerceSearchIndexes(webstoreId)

Get Commerce search indexes.

#### API Version

52.0

#### Requires Chatter

Yes

#### Signature

public static ConnectApi.CommerceSearchIndexCollection getCommerceSearchIndexes(String webstoreId)

#### Parameters

webstoreId

Type: String

ID of the webstore.

#### Return Value

Type: [ConnectApi.CommerceSearchIndexCollection](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_output_commerce_search_index_collection_output.htm "Collection of indexes.")

### getCommerceSearchIndexLogs(webstoreId)

Get Commerce search index logs.

#### API Version

57.0

#### Requires Chatter

No

#### Signature

public static ConnectApi.CommerceSearchIndexLogCollection getCommerceSearchIndexLogs(String webstoreId)

#### Parameters

webstoreId

Type: String

ID of the webstore.

#### Return Value

Type: [ConnectApi.CommerceSearchIndexLogCollection](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_output_commerce_search_index_log_collection.htm "Collection of search index logs for a webstore.")