{
  "swagger": "2.0",
  "schemes": [
    "https"
  ],
  "host": "azure.local",
  "info": {
    "description": "Client that can be used to query an Azure Search index and upload, merge, or delete documents.",
    "title": "SearchIndexClient",
    "version": "2015-02-28",
    "x-apisguru-categories": [
      "cloud"
    ],
    "x-logo": {
      "url": "https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png"
    },
    "x-origin": [
      {
        "format": "swagger",
        "url": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/search/data-plane/Microsoft.Azure.Search.Data/preview/2015-02-28/searchindex.json",
        "version": "2.0"
      }
    ],
    "x-preferred": false,
    "x-providerName": "azure.com",
    "x-serviceName": "search-searchindex",
    "x-tags": [
      "Azure",
      "Microsoft"
    ]
  },
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "parameters": {
    "ApiVersionParameter": {
      "description": "Client Api Version.",
      "in": "query",
      "name": "api-version",
      "required": true,
      "type": "string"
    }
  },
  "paths": {
    "/docs/$count": {
      "get": {
        "description": "Queries the number of documents in the Azure Search index.",
        "externalDocs": {
          "url": "https://msdn.microsoft.com/library/azure/dn798924.aspx"
        },
        "operationId": "Documents_Count",
        "parameters": [
          {
            "description": "Tracking ID sent with the request to help with debugging.",
            "format": "uuid",
            "in": "header",
            "name": "client-request-id",
            "required": false,
            "type": "string",
            "x-ms-client-request-id": true,
            "x-ms-parameter-grouping": {
              "name": "search-request-options"
            }
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        },
        "tags": [
          "Documents"
        ],
        "x-ms-request-id": "request-id"
      }
    }
  },
  "definitions": {
    "DocumentIndexResult": {
      "description": "Response containing the status of operations for all documents in the indexing request.",
      "properties": {
        "value": {
          "description": "Gets the list of status information for each document in the indexing request.",
          "items": {
            "$ref": "#/definitions/IndexingResult"
          },
          "readOnly": true,
          "type": "array"
        }
      },
      "x-ms-external": true
    },
    "IndexActionType": {
      "description": "Specifies the operation to perform on a document in an indexing batch.",
      "enum": [
        "upload",
        "merge",
        "mergeOrUpload",
        "delete"
      ],
      "type": "string",
      "x-ms-enum": {
        "name": "IndexActionType"
      }
    },
    "IndexingResult": {
      "description": "Status of an indexing operation for a single document.",
      "properties": {
        "errorMessage": {
          "description": "Gets the error message explaining why the indexing operation failed for the document identified by Key; null if Succeeded is true.",
          "readOnly": true,
          "type": "string"
        },
        "key": {
          "description": "Gets the key of a document that was in the indexing request.",
          "readOnly": true,
          "type": "string"
        }
      },
      "x-ms-external": true
    },
    "QueryType": {
      "description": "Specifies the syntax of the search query. The default is 'simple'. Use 'full' if your query uses the Lucene query syntax.",
      "enum": [
        "simple",
        "full"
      ],
      "type": "string",
      "x-ms-enum": {
        "name": "QueryType"
      }
    },
    "SearchMode": {
      "description": "Specifies whether any or all of the search terms must be matched in order to count the document as a match.",
      "enum": [
        "any",
        "all"
      ],
      "type": "string",
      "x-ms-enum": {
        "name": "SearchMode"
      }
    },
    "SearchParameters": {
      "description": "Parameters for filtering, sorting, faceting, paging, and other search query behaviors.",
      "properties": {
        "filter": {
          "description": "Gets or sets the OData $filter expression to apply to the search query.",
          "externalDocs": {
            "url": "https://msdn.microsoft.com/library/azure/dn798921.aspx"
          },
          "type": "string"
        },
        "highlightFields": {
          "description": "Gets or sets the list of field names to use for hit highlights. Only searchable fields can be used for hit highlighting.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "highlightPostTag": {
          "description": "Gets or sets a string tag that is appended to hit highlights. Must be set with HighlightPreTag. Default is &lt;/em&gt;.",
          "type": "string"
        },
        "highlightPreTag": {
          "description": "Gets or sets a string tag that is prepended to hit highlights. Must be set with HighlightPostTag. Default is &lt;em&gt;.",
          "type": "string"
        },
        "includeTotalResultCount": {
          "description": "Gets or sets a value that specifies whether to fetch the total count of results. Default is false. Setting this value to true may have a performance impact. Note that the count returned is an approximation.",
          "type": "boolean"
        },
        "minimumCoverage": {
          "description": "Gets or sets a number between 0 and 100 indicating the percentage of the index that must be covered by a search query in order for the query to be reported as a success. This parameter can be useful for ensuring search availability even for services with only one replica. The default is 100.",
          "format": "double",
          "type": "number"
        },
        "orderBy": {
          "description": "Gets or sets the list of OData $orderby expressions by which to sort the results. Each expression can be either a field name or a call to the geo.distance() function. Each expression can be followed by asc to indicate ascending, and desc to indicate descending. The default is ascending order. Ties will be broken by the match scores of documents. If no OrderBy is specified, the default sort order is descending by document match score. There can be at most 32 Orderby clauses.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "queryType": {
          "$ref": "#/definitions/QueryType",
          "description": "Gets or sets a value that specifies the syntax of the search query. The default is 'simple'. Use 'full' if your query uses the Lucene query syntax."
        },
        "scoringParameters": {
          "description": "Gets or sets the list of parameter values to be used in scoring functions (for example, referencePointParameter) using the format name:value. For example, if the scoring profile defines a function with a parameter called 'mylocation' the parameter string would be \"mylocation:-122.2,44.8\"(without the quotes).",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "scoringProfile": {
          "description": "Gets or sets the name of a scoring profile to evaluate match scores for matching documents in order to sort the results.",
          "type": "string"
        },
        "searchFields": {
          "description": "Gets or sets the list of field names to include in the full-text search.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "searchMode": {
          "$ref": "#/definitions/SearchMode",
          "description": "Gets or sets a value that specifies whether any or all of the search terms must be matched in order to count the document as a match."
        },
        "select": {
          "description": "Gets or sets the list of fields to retrieve. If unspecified, all fields marked as retrievable in the schema are included.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "skip": {
          "description": "Gets or sets the number of search results to skip. This value cannot be greater than 100,000. If you need to scan documents in sequence, but cannot use Skip due to this limitation, consider using OrderBy on a totally-ordered key and Filter with a range query instead.",
          "format": "int32",
          "type": "integer"
        },
        "top": {
          "description": "Gets or sets the number of search results to retrieve. This can be used in conjunction with Skip to implement client-side paging of search results. If results are truncated due to server-side paging, the response will include a continuation token that can be passed to ContinueSearch to retrieve the next page of results. See DocumentSearchResponse.ContinuationToken for more information.",
          "externalDocs": {
            "url": "https://msdn.microsoft.com/en-us/library/azure/dn798927.aspx"
          },
          "format": "int32",
          "type": "integer"
        }
      },
      "x-ms-external": true
    },
    "SuggestParameters": {
      "description": "Parameters for filtering, sorting, fuzzy matching, and other suggestions query behaviors.",
      "properties": {
        "filter": {
          "description": "Gets or sets the OData $filter expression to apply to the suggestions query.",
          "externalDocs": {
            "url": "https://msdn.microsoft.com/library/azure/dn798921.aspx"
          },
          "type": "string"
        },
        "highlightPostTag": {
          "description": "Gets or sets a string tag that is appended to hit highlights. Must be set with HighlightPreTag. If omitted, hit highlighting of suggestions is disabled.",
          "type": "string"
        },
        "highlightPreTag": {
          "description": "Gets or sets a string tag that is prepended to hit highlights. Must be set with HighlightPostTag. If omitted, hit highlighting of suggestions is disabled.",
          "type": "string"
        },
        "minimumCoverage": {
          "description": "Gets or sets a number between 0 and 100 indicating the percentage of the index that must be covered by a suggestion query in order for the query to be reported as a success. This parameter can be useful for ensuring search availability even for services with only one replica. The default is 80.",
          "format": "double",
          "type": "number"
        },
        "orderBy": {
          "description": "Gets or sets the list of OData $orderby expressions by which to sort the results. Each expression can be either a field name or a call to the geo.distance() function. Each expression can be followed by asc to indicate ascending, and desc to indicate descending. The default is ascending order. Ties will be broken by the match scores of documents. If no OrderBy is specified, the default sort order is descending by document match score. There can be at most 32 Orderby clauses.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "searchFields": {
          "description": "Gets or sets the list of field names to consider when querying for suggestions.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "select": {
          "description": "Gets or sets the list of fields to retrieve. If unspecified, all fields marked as retrievable in the schema are included.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "top": {
          "description": "Gets or sets the number of suggestions to retrieve. This must be a value between 1 and 100. The default is to 5.",
          "format": "int32",
          "type": "integer"
        },
        "useFuzzyMatching": {
          "description": "Gets or sets a value indicating whether to use fuzzy matching for the suggestion query. Default is false. when set to true, the query will find suggestions even if there's a substituted or missing character in the search text. While this provides a better experience in some scenarios it comes at a performance cost as fuzzy suggestion searches are slower and consume more resources.",
          "type": "boolean"
        }
      },
      "x-ms-external": true
    }
  }
}