Navigation

Get All User-Defined Analyzers for a Cluster

The Atlas API uses HTTP Digest Authentication. Provide a programmatic API public key and corresponding private key as the username and password when constructing the HTTP request.

For complete documentation on configuring API access for an Atlas project, see Configure Atlas API Access.

Note

Groups and projects are synonymous terms. Your {GROUP-ID} is the same as your project ID. For existing groups, your group/project ID remains the same. The resource and corresponding endpoints use the term groups.

Base URL: https://cloud.mongodb.com/api/atlas/v1.0

Syntax

GET /groups/{GROUP-ID}/clusters/{CLUSTER-NAME}/fts/analyzers

Request Parameters

Request Path Parameters

Path Element Required/Optional Description
GROUP-ID Required The unique identifier for the project that contains the specified cluster.
CLUSTER-NAME Required The name of the cluster containing the collection with one or more Full Text Search indexes.

Request Query Parameters

The following query parameters are optional:

Name Type Description Default
pageNum integer Page number (1-based). 1
itemsPerPage integer Number of items to return per page, up to a maximum of 500. 100
pretty boolean Displays response in a prettyprint format. false
envelope boolean Specifies whether or not to wrap the response in an envelope. false

Request Body Parameters

This endpoint does not use HTTP request body parameters.

Response Elements

The HTTP response returns a JSON document that includes an array of analyzer definitions. An analyzer definition contains some or all of the following elements:

Name Type Description
name string The name of the user-defined analyzer.
baseAnalyzer string The analyzer on which the user-defined analyzer is based.
maxTokenLength integer Longest text unit to analyze. Anything longer will not be included in the index.
stopwords array of strings Array of strings to ignore when creating the index.
ignoreCase boolean Specify whether the index is case-sensitive.
stemExclusionSet array of strings Array of words to exclude from stemming by the language analyzer.

Example

Example Request

curl -i -u "{username}:{apikey}" \
  --digest "https://cloud.mongodb.com/api/atlas/v1.0/groups/{GROUP-ID}/clusters/{CLUSTER-NAME}/fts/analyzers?pretty=true"

Example Response

The following example response contains an array of two analyzer definitions.

[
  {
    "baseAnalyzer" : "lucene.standard",
    "maxTokenLength" : 32,
    "name" : "my_new_analyzer"
  },
  {
    "baseAnalyzer" : "lucene.english",
    "name" : "my_new_analyzer2",
    "stopwords" : [ "first", "second", "third", "etc" ]
  }
]