# Explained full-text items search

- Operation ID: `SearchFullTextPostWithExplanation`
- HTTP method: `POST`
- Path: `/search/v2/indices/{indexId}/query/explain`
- [Human-readable API reference](https://hub.synerise.com/api-reference/ai-search#tag/Search/operation/SearchFullTextPostWithExplanation)

## Self-contained OpenAPI method

The fenced document below contains this method's documentation and all of its local references. It is self-contained; no category or master specification fetch is required.

```yaml
openapi: 3.0.0
info:
  title: Synerise Public API
  version: 1.9.1
paths:
  /search/v2/indices/{indexId}/query/explain:
    post:
      summary: Explained full-text items search
      description: |
        Retrieves items that match a full-text query from a search index or a suggestion index. The results can be filtered and sorted. The response contains an explanation of the factors that influenced the result.

        ---

        **API consumers:** <span title="Deprecated">AI API key (legacy)</span>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `ITEMS_SEARCH_SEARCH_READ`
      operationId: SearchFullTextPostWithExplanation
      tags:
        - Search
      security:
        - TrackerKey: []
        - JWT: []
      parameters:
        - name: indexId
          in: path
          required: true
          description: ID of the index to be used in the search operation
          schema:
            type: string
      requestBody:
        description: Request for performing full-text search with explanation
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    query:
                      type: string
                      description: Query text to use in the search
                    page:
                      type: integer
                      format: int32
                      description: Page number to return for pagination. The first page has the index `1`.
                    limit:
                      type: integer
                      format: int32
                      example: 10
                      default: 20
                      maximum: 500
                      minimum: 0
                      description: The number of items to return per page
                    sortBy:
                      type: string
                      description: |
                        <span style='color:red'><strong>IMPORTANT:</strong></span> Sorting disables boosting, elastic filters, and promoting search results.

                        Name of the attribute by which the data will be sorted.
                    ordering:
                      type: string
                      default: asc
                      enum:
                        - desc
                        - asc
                      description: Sorting order
                    includeMeta:
                      type: boolean
                      description: |
                        
                        When `true`, pagination metadata is included in the response body.

                        When `false`, the data is included in the response headers:

                        - Link: links to neighbors, first, and last pages in pagination.

                        - X-Pagination-Total-Count: total number of items on all pages

                        - X-Pagination-Total-Pages: total number of pages

                        - X-Pagination-Page: current page

                        - X-Pagination-Limit: maximum number of items on a page

                        - X-Pagination-Sorted-By: parameter that the items were sorted by

                        - X-Pagination-Ordering: sorting direction
                    clientUUID:
                      type: string
                      description: UUID of the profile for which the search is performed
                    personalize:
                      type: boolean
                      description: If set to `false`, the search result is not personalized.
                      default: true
                    correlationId:
                      type: string
                      description: |
                        Correlation ID for pagination. If a search with the ID was performed recently (last 10 minutes), the cached results will be used.

                        Do not send this if sortBy/filters/sorting order, etc. have changed - the cached results may have different order or may match different filters.
                    searchId:
                      type: string
                      deprecated: true
                      description: |
                        **DEPRECATED - use correlationId instead**

                        Search ID for pagination. If a search with the ID was performed recently (last 10 minutes), the cached results will be used.

                        Do not send this if sortBy/filters/sorting order, etc. have changed - the cached results may have different order or may match different filters.
                    sortByMetric:
                      type: string
                      enum:
                        - TransactionsPopularity
                        - PageVisitsPopularity
                      description: |
                        <span style='color:red'><strong>IMPORTANT:</strong></span> Sorting disables boosting, elastic filters, and promoting search results.

                        Name of the metric by which the data will be sorted.
                    sortByGeoPoints:
                      type: string
                      example: 34.052235,-118.243685
                      description: |
                        <span style='color:red'><strong>IMPORTANT:</strong></span> Sorting disables boosting, elastic filters, and promoting search results.

                        Geo-point (`{latitude},{longitude}`) for data sorting. Results are sorted by distance from this point. `ordering: asc` means "closest first".'
                    filterGeoPoints:
                      type: array
                      example:
                        - 34.052235,-118.243685
                        - 15.0,65.0
                      items:
                        type: string
                      description: |
                        The definition of a geographical area to filter by.

                        Given one geo-point, the results will be limited to a radius around a point. To override the default radius (1000 meters), provide the `filterAroundRadius` parameter.
                        **Example input:** `["34.052235,-118.243685"]`

                        Given two geo-points, the results will be limited to a rectangular area.
                        **Example input:** `["50,-100", "25,150"]`

                        Given three or more geo-points, the results will be limited to a polygonal area.
                        **Example input:** `["50,0", "40,20", "-20,10"]`
                    filterAroundRadius:
                      type: integer
                      format: int32
                      example: 2000
                      default: 1000
                      description: Radius in meters to be used when filtering using geo-location. Can only be used when filtering by a single geo-point.
                    filters:
                      type: string
                      description: IQL query string. For details, see the [Help Center](https://help.synerise.com/developers/iql/).
                    facets:
                      type: array
                      description: |
                        A list of attributes for which facets will be returned.
                        - A single `*` value matches all facetable attributes.
                        - A single `auto` value enables automatic facet selection based on the result set — the system picks the most relevant facets using the index's `dynamicFacets` configuration.

                        To determine which groups of facets should be returned, use the `includeFacets` parameter.
                      items:
                        type: string
                    customFilteredFacets:
                      type: object
                      description: |
                        A key-value map that takes attributes as keys and IQL query strings as values.

                        For each key a facet is returned that includes only the items filtered by the provided IQL query string.
                      additionalProperties:
                        type: string
                        description: IQL query string. For details, see the [Help Center](https://help.synerise.com/developers/iql/).
                      example:
                        brand: price > 100
                        price: brand == foo
                    facetsSize:
                      type: integer
                      default: 2000
                      minimum: 1
                      maximum: 10000
                      description: |
                        Determines how many items will be used for facets aggregation.
                    maxValuesPerFacet:
                      type: integer
                      default: 50
                      minimum: 1
                      maximum: 1000
                      description: |
                        Determines how many values will be retrieved per facet.
                    caseSensitiveFacetValues:
                      type: boolean
                      default: false
                      description: |
                        Specifies whether facets aggregation should be case sensitive.
                    includeFacets:
                      type: string
                      default: filtered
                      enum:
                        - all
                        - filtered
                        - unfiltered
                        - none
                      description: |
                        Determines which groups of facets will be returned: both filtered and unfiltered; just filtered; just unfiltered; or no group at at all.

                        To determine which attributes should be returned as facets in each group, use the `facets` and `customFilteredFacets` parameters.
                    facetsOrderBy:
                      type: string
                      enum:
                        - coverage
                        - name
                      description: |
                        Controls the ordering of facets in the response.  
                        When `facets=auto`, the default ordering is by coverage (most relevant facets first).  
                        When facets are specified explicitly, the default ordering is by name.  
                        When two facets have equal coverage, ties are resolved by name.
                    context:
                      type: array
                      description: List of context strings for a search query
                      example:
                        - mobile
                        - listing
                      items:
                        type: string
                    displayAttributes:
                      type: array
                      description: List of ad hoc attributes that will be returned for each found item
                      example:
                        - title
                        - price
                      items:
                        type: string
                    distinctFilter:
                      type: object
                      description: Distinct filters regulate how many items with the same value of a particular attribute can be returned.
                      properties:
                        attribute:
                          type: string
                          description: Name of the attribute to be used for distinct filter
                        maxNumItems:
                          type: integer
                          description: Maximum number of items to be returned per each distinct attribute value
                          minimum: 1
                        levelRangeModifier:
                          type: integer
                          description: Level of the category, if the category attribute was used for distinct filter
                          minimum: 0
                      required:
                        - attribute
                        - maxNumItems
                    ignoreQueryRules:
                      type: boolean
                      description: If set to `true`, query rules are not applied.
                      default: false
                    excludeQueryRules:
                      type: array
                      example:
                        - 2
                        - 5
                      items:
                        type: integer
                      description: List of query rules that will not be applied.
                    params:
                      type: object
                      example:
                        source: mobile
                      description: Extra parameters that will be added to the `item.search` event. The total size must not exceed 500 bytes.
                      additionalProperties: true
                    disableQueryClassification:
                      type: boolean
                      description: If set to `true`, query classification is not applied.
                      default: false
                    disableDynamicReranker:
                      type: boolean
                      description: If set to `true`, q dynamic reranker is not applied.
                      default: false
                  required:
                    - query
                - type: object
                  properties:
                    crossWorkspaceMode:
                      type: object
                      description: Cross-workspace personalization mode. When provided, overrides the index configuration setting.
                      properties:
                        enabled:
                          type: boolean
                          description: Whether cross-workspace personalization is enabled.
                      required:
                        - enabled
      responses:
        "200":
          description: Search result
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    title: Item search
                    properties:
                      data:
                        type: array
                        description: A page of matching items as objects with explanation included. The parameters of each item's object depend on the configuration of displayable attributes.
                        items:
                          type: object
                          properties:
                            _promotedByRules:
                              type: array
                              items:
                                type: integer
                                description: Rule id
                              description: List of applied rules that had an effect in promoting this item. This field exists if and only if the item was promoted.
                            _explanation:
                              type: object
                              description: Explanation of the scoring of this item
                              properties:
                                extendedScoreFactors:
                                  type: object
                                  description: Extended score factors. Only included if it is possible to gather them.
                                  properties:
                                    attributes:
                                      type: object
                                      description: |
                                        Attribute values which influenced the score.  
                                        This object is separated into low/medium/high importance values (corresponding to attribute importance configuration in the search index configuration).  
                                        For each type, `token` is the search query (may be modified by query rules, suggestions, etc.) that matched an attribute or attributes of that importance.  
                                      properties:
                                        low:
                                          description: Low importance attributes score.
                                          allOf:
                                            - type: object
                                              description: Token with its corresponding score.
                                              properties:
                                                token:
                                                  type: string
                                                  description: Token value.
                                                score:
                                                  type: number
                                                  description: Score of the token.
                                        medium:
                                          description: Medium importance attributes score.
                                          allOf:
                                            - type: object
                                              description: Token with its corresponding score.
                                              properties:
                                                token:
                                                  type: string
                                                  description: Token value.
                                                score:
                                                  type: number
                                                  description: Score of the token.
                                        high:
                                          description: High importance attributes score.
                                          allOf:
                                            - type: object
                                              description: Token with its corresponding score.
                                              properties:
                                                token:
                                                  type: string
                                                  description: Token value.
                                                score:
                                                  type: number
                                                  description: Score of the token.
                                    boostFilters:
                                      type: array
                                      description: Matched boost filters.
                                      items:
                                        type: object
                                        properties:
                                          filters:
                                            type: object
                                            description: Filters from query rules.
                                            properties:
                                              textFilters:
                                                type: array
                                                description: Text-type filters
                                                items:
                                                  type: object
                                                  properties:
                                                    attribute:
                                                      type: string
                                                      description: Attribute to be filtered
                                                    mode:
                                                      type: string
                                                      description: |
                                                        Information whether to include or exclude filtered results.

                                                        - `include`: includes filtered results
                                                        - `exclude`: excludes filtered results
                                                      enum:
                                                        - include
                                                        - exclude
                                                      example: include
                                                    values:
                                                      type: array
                                                      description: Values to be used during filtering.
                                                      example:
                                                        - A-Brand
                                                        - B-Brand
                                                      items:
                                                        type: string
                                              rangeFilters:
                                                type: array
                                                description: Range-type filters
                                                items:
                                                  type: object
                                                  properties:
                                                    attribute:
                                                      type: string
                                                      description: Attribute to be filtered
                                                      example: price
                                                    operator:
                                                      type: string
                                                      description: |
                                                        Operator to be used during filtering.

                                                        - `gt`: greater than
                                                        - `gte`: greater or equal
                                                        - `lt`: less than
                                                        - `lte`: less than or equal
                                                        - `eq`/`neq`: equal/not equal
                                                      enum:
                                                        - gt
                                                        - gte
                                                        - lt
                                                        - lte
                                                        - eq
                                                        - neq
                                                    value:
                                                      description: Value to use during filtering
                                                      type: number
                                                      example: 19.99
                                          weight:
                                            type: number
                                            description: Weight of the filter.
                                scoreFactors:
                                  type: object
                                  description: Influence of historical data and behavioral analysis.
                                  properties:
                                    pageVisitsPopularity:
                                      type: number
                                      description: Normalized page views popularity.
                                    transactionsPopularity:
                                      type: number
                                      description: Normalized transactions popularity.
                                    personalization:
                                      type: number
                                      description: Normalized value of personalization coefficient, if applicable.
                                    pageVisitsInfluence:
                                      type: number
                                      description: Page views impact on score.
                                    transactionsInfluence:
                                      type: number
                                      description: Purchases impact on score.
                                    personalizationInfluence:
                                      type: number
                                      description: Personalization impact on score, if applicable.
                                score:
                                  type: number
                                  description: Final score.
                                matchedElasticFilter:
                                  type: boolean
                                  description: Indicates if the item was matched by an elastic filter.
                                sortValue:
                                  oneOf:
                                    - type: string
                                    - type: number
                                  description: Value used to sort the items, if applicable.
                          additionalProperties:
                            description: The names and value types of the item's properties depend on the configuration.
                          example:
                            itemName: TV
                            itemId: 87257843345
                            _promotedByRules:
                              - 475
                              - 477
                      extras:
                        type: object
                        description: Additional information
                        properties:
                          filteredFacets:
                            type: object
                            description: Facet value mappings
                            example:
                              brand:
                                X-brand: 1
                                Y-brand: 3
                              salePrice.value:
                                max: 201.99
                                min: 14.99
                            additionalProperties:
                              description: The type of facet, for example `category`
                              type: object
                              additionalProperties:
                                description: 'The values for keys in this facet type, for example `"Home Appliances>Fridges": 12`'
                                type: integer
                          allFacets:
                            type: object
                            description: Facet value mappings
                            example:
                              brand:
                                X-brand: 1
                                Y-brand: 3
                              salePrice.value:
                                max: 201.99
                                min: 14.99
                            additionalProperties:
                              description: The type of facet, for example `category`
                              type: object
                              additionalProperties:
                                description: 'The values for keys in this facet type, for example `"Home Appliances>Fridges": 12`'
                                type: integer
                          customFilteredFacets:
                            allOf:
                              - type: object
                                description: Facets resulting from the `customFilteredFacets` setting. Only available in `POST` requests.
                              - type: object
                                description: Facet value mappings
                                example:
                                  brand:
                                    X-brand: 1
                                    Y-brand: 3
                                  salePrice.value:
                                    max: 201.99
                                    min: 14.99
                                additionalProperties:
                                  description: The type of facet, for example `category`
                                  type: object
                                  additionalProperties:
                                    description: 'The values for keys in this facet type, for example `"Home Appliances>Fridges": 12`'
                                    type: integer
                          correlationId:
                            type: string
                            description: |
                              This ID is used:
                              - for search result pagination
                              - as `correlationId` of the search event in events such as `items.search.click`

                              Search results are cached for 10 minutes.

                              The cached value will be used if the ID is provided in subsequent calls. This makes search faster and eliminates personalization non-determinism.
                          searchId:
                            type: string
                            deprecated: true
                            description: |
                              **DEPRECATED - use correlationId instead**

                              This ID is used:
                              - for search result pagination
                              - as `searchId` of the search event in events such as `items.search.click`

                              Search results are cached for 10 minutes.

                              The cached value will be used if the ID is provided in subsequent calls. This makes search faster and eliminates personalization non-determinism.
                          facetsOrdering:
                            type: array
                            description: |
                              An ordered list of facet attribute names indicating the display order of facets in the response.
                              When `facets=auto`, facets are ordered by coverage (most relevant first) unless `facetsOrderBy=name` is specified.
                              When facets are specified explicitly, the ordering is by name.
                              Empty when no facets are requested.

                              Matching query rules can override the resulting set and order via two consequences:
                              - `pinFacets` forces specific facets into the response, optionally at a specific 1-based slot.
                                Pinned facets bypass the coverage threshold in `facets=auto`.
                              - `hideFacets` removes specific facets from the response, also stripping them from
                                `customFilteredFacets`. Hide takes precedence over pin and over explicit `facets=[...]`.

                              The corresponding facet values appear in `filteredFacets`, `allFacets`, and `customFilteredFacets`
                              only for attributes present in this list.
                            items:
                              type: string
                            example:
                              - brand
                              - color
                              - size
                              - price
                          suggestions:
                            type: array
                            description: A list of search suggestions
                            items:
                              type: object
                              description: If the query from the request doesn't return any matches (for example due to a spelling error in the query), the AI engine may suggest a similar query and use it instead. This object is included in the response only if that mechanism was triggered.
                              properties:
                                text:
                                  type: string
                                  description: The suggested text query
                                highlighted:
                                  type: string
                                  description: The suggested text query with the HTML emphasis tag added
                                score:
                                  type: number
                                  description: Estimated accuracy of the suggestion. `1.0` means 100%.
                                  format: float
                                  maximum: 1
                          usedSuggestion:
                            type: object
                            description: If the query did not return any matches, the AI engine tries to find an alternative similar query and use it for the search instead. If that happens, the `usedSuggestion` object contains information about that alternative query offered by the AI engine and used in the search.
                            allOf:
                              - type: object
                                description: If the query from the request doesn't return any matches (for example due to a spelling error in the query), the AI engine may suggest a similar query and use it instead. This object is included in the response only if that mechanism was triggered.
                                properties:
                                  text:
                                    type: string
                                    description: The suggested text query
                                  highlighted:
                                    type: string
                                    description: The suggested text query with the HTML emphasis tag added
                                  score:
                                    type: number
                                    description: Estimated accuracy of the suggestion. `1.0` means 100%.
                                    format: float
                                    maximum: 1
                          explanation:
                            allOf:
                              - type: object
                                description: Explanation for performed search.
                                properties:
                                  rulesConsequences:
                                    type: object
                                    description: Applied rules consequences.
                                    properties:
                                      query:
                                        type: object
                                        description: Query changes applied due to query rules.
                                        properties:
                                          originalQuery:
                                            type: string
                                            description: Query before applying query rules.
                                          finalQuery:
                                            type: string
                                            description: Query after applying query rules.
                                          modifications:
                                            type: array
                                            items:
                                              type: object
                                              description: Describes a change in query.
                                              properties:
                                                slice:
                                                  description: Query slice that was modified.
                                                  allOf:
                                                    - type: object
                                                      description: Describes a slice of query.
                                                      properties:
                                                        from:
                                                          type: integer
                                                          description: Number of the first word (zero-indexed, inclusive).
                                                        to:
                                                          type: integer
                                                          description: Number of the last word (zero-indexed, inclusive).
                                                transformedSlice:
                                                  description: Resulting query slice. Not present if the modification only removes words.
                                                  allOf:
                                                    - type: object
                                                      description: Describes a slice of query.
                                                      properties:
                                                        from:
                                                          type: integer
                                                          description: Number of the first word (zero-indexed, inclusive).
                                                        to:
                                                          type: integer
                                                          description: Number of the last word (zero-indexed, inclusive).
                                                ruleId:
                                                  type: integer
                                                  description: Id of the query rule which caused this change.
                                      hiddenHits:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            id:
                                              type: string
                                              description: Hidden item item.
                                            ruleIds:
                                              type: array
                                              description: Ids of query rules which caused the item to be hidden.
                                              items:
                                                type: integer
                                      filters:
                                        type: array
                                        items:
                                          type: object
                                          description: Used filter.
                                          properties:
                                            filters:
                                              type: object
                                              description: Filters from query rules.
                                              properties:
                                                textFilters:
                                                  type: array
                                                  description: Text-type filters
                                                  items:
                                                    type: object
                                                    properties:
                                                      attribute:
                                                        type: string
                                                        description: Attribute to be filtered
                                                      mode:
                                                        type: string
                                                        description: |
                                                          Information whether to include or exclude filtered results.

                                                          - `include`: includes filtered results
                                                          - `exclude`: excludes filtered results
                                                        enum:
                                                          - include
                                                          - exclude
                                                        example: include
                                                      values:
                                                        type: array
                                                        description: Values to be used during filtering.
                                                        example:
                                                          - A-Brand
                                                          - B-Brand
                                                        items:
                                                          type: string
                                                rangeFilters:
                                                  type: array
                                                  description: Range-type filters
                                                  items:
                                                    type: object
                                                    properties:
                                                      attribute:
                                                        type: string
                                                        description: Attribute to be filtered
                                                        example: price
                                                      operator:
                                                        type: string
                                                        description: |
                                                          Operator to be used during filtering.

                                                          - `gt`: greater than
                                                          - `gte`: greater or equal
                                                          - `lt`: less than
                                                          - `lte`: less than or equal
                                                          - `eq`/`neq`: equal/not equal
                                                        enum:
                                                          - gt
                                                          - gte
                                                          - lt
                                                          - lte
                                                          - eq
                                                          - neq
                                                      value:
                                                        description: Value to use during filtering
                                                        type: number
                                                        example: 19.99
                                            ruleId:
                                              type: integer
                                              description: Id of the query rule from which the filter come.
                                      boostFilters:
                                        type: array
                                        items:
                                          type: object
                                          description: Used boost filter.
                                          properties:
                                            filters:
                                              type: object
                                              description: Filters from query rules.
                                              properties:
                                                textFilters:
                                                  type: array
                                                  description: Text-type filters
                                                  items:
                                                    type: object
                                                    properties:
                                                      attribute:
                                                        type: string
                                                        description: Attribute to be filtered
                                                      mode:
                                                        type: string
                                                        description: |
                                                          Information whether to include or exclude filtered results.

                                                          - `include`: includes filtered results
                                                          - `exclude`: excludes filtered results
                                                        enum:
                                                          - include
                                                          - exclude
                                                        example: include
                                                      values:
                                                        type: array
                                                        description: Values to be used during filtering.
                                                        example:
                                                          - A-Brand
                                                          - B-Brand
                                                        items:
                                                          type: string
                                                rangeFilters:
                                                  type: array
                                                  description: Range-type filters
                                                  items:
                                                    type: object
                                                    properties:
                                                      attribute:
                                                        type: string
                                                        description: Attribute to be filtered
                                                        example: price
                                                      operator:
                                                        type: string
                                                        description: |
                                                          Operator to be used during filtering.

                                                          - `gt`: greater than
                                                          - `gte`: greater or equal
                                                          - `lt`: less than
                                                          - `lte`: less than or equal
                                                          - `eq`/`neq`: equal/not equal
                                                        enum:
                                                          - gt
                                                          - gte
                                                          - lt
                                                          - lte
                                                          - eq
                                                          - neq
                                                      value:
                                                        description: Value to use during filtering
                                                        type: number
                                                        example: 19.99
                                            weight:
                                              type: number
                                              description: Weight of the filter.
                                            ruleId:
                                              type: integer
                                              description: Id of the query rule from which the filter come.
                                      returnNoData:
                                        type: object
                                        description: Indicates if no data consequence is activated.
                                        properties:
                                          enabled:
                                            type: boolean
                                            description: Indicates if the consequence is enabled.
                                          ruleIds:
                                            type: array
                                            description: Ids of the query rules which activated the consequence.
                                            items:
                                              type: integer
                                      pinFacets:
                                        type: array
                                        description: |
                                          Per-rule pin facet consequences contributing to the final `facetsOrdering`.
                                          Reflects what the rules engine emitted; the contributing rule ids are also present in `appliedRules`.
                                        items:
                                          type: object
                                          description: A single pin-facet consequence emitted by a matched query rule.
                                          properties:
                                            attribute:
                                              type: string
                                              description: Name of the pinned facet attribute.
                                              example: size
                                            position:
                                              type: integer
                                              minimum: 1
                                              maximum: 100
                                              description: |
                                                1-based slot the rule requested. Omitted when the rule pinned the attribute without a position.
                                              example: 1
                                            ruleId:
                                              type: integer
                                              description: Id of the query rule that emitted this pin.
                                      hideFacets:
                                        type: array
                                        description: |
                                          Per-attribute hide facet consequences contributing to the final `facetsOrdering`.
                                          Each entry lists every rule that hid that attribute.
                                        items:
                                          type: object
                                          description: A single hide-facet consequence aggregated across all rules that hid the same attribute.
                                          properties:
                                            attribute:
                                              type: string
                                              description: Name of the hidden facet attribute.
                                              example: material
                                            ruleIds:
                                              type: array
                                              description: Ids of every query rule that hid this attribute.
                                              items:
                                                type: integer
                                  sortDetails:
                                    oneOf:
                                      - type: object
                                        properties:
                                          metric:
                                            type: string
                                            description: Metric used to sort the items.
                                            enum:
                                              - TransactionsPopularity
                                              - PageVisitsPopularity
                                          ordering:
                                            type: string
                                            description: Applied ordering.
                                            enum:
                                              - asc
                                              - desc
                                      - type: object
                                        properties:
                                          attribute:
                                            type: string
                                            description: Name of the attribute used to sort the items.
                                          ordering:
                                            type: string
                                            description: Applied ordering.
                                            enum:
                                              - asc
                                              - desc
                                          ruleId:
                                            type: integer
                                            description: Id of a query rule that set the sort, if applicable.
                                      - type: object
                                        properties:
                                          point:
                                            type: string
                                            description: Point used to sort the items.
                                            example: 34.052235,-118.243685
                                          ordering:
                                            type: string
                                            description: Applied ordering.
                                            enum:
                                              - asc
                                              - desc
                                    description: Applied sorting details.
                                  query:
                                    type: object
                                    properties:
                                      finalQuery:
                                        type: string
                                        description: Query that was ultimately used to perform the search.
                                      synonyms:
                                        type: array
                                        description: Used synonyms.
                                        items:
                                          type: object
                                          properties:
                                            word:
                                              type: string
                                              description: Phrase that the synonyms relate to.
                                            synonyms:
                                              type: array
                                              description: List of the synonyms.
                                              items:
                                                type: string
                                  personalized:
                                    type: boolean
                                    description: Indicates whether the search results were personalized.
                                  promotedItemsCount:
                                    type: integer
                                    description: Promoted items count.
                                  wasFallbackMatchingUsed:
                                    type: boolean
                                    description: "`true` if fallback matching was used."
                                  facetSelectionExplanation:
                                    type: object
                                    description: |
                                      Explanation of automatic facet selection. Only present when `facets=auto` is used on an `/explain` endpoint.
                                      Contains the raw coverage data from the result set that was used to select and rank facets.
                                      To compute coverage percentage, divide each value by the response's `total` field.
                                    properties:
                                      facetCoverage:
                                        type: object
                                        description: |
                                          Map of facetable attribute names to the number of results that have a value for that attribute.
                                          Includes all candidate facets (not just the ones that were returned in the item's data), so you can see what was considered and why some were excluded by `maxFacets`.
                                        additionalProperties:
                                          type: integer
                                        example:
                                          brand: 4800
                                          color: 4500
                                          price: 4900
                                          size: 3200
                                          material: 400
                              - type: object
                                properties:
                                  reranker:
                                    type: object
                                    properties:
                                      queryClassificationApplied:
                                        type: boolean
                                        description: "`true` if query classification was applied."
                                      dynamicRerankerApplied:
                                        type: boolean
                                        description: "`true` if dynamic reranker was applied."
                                      queryClassificationResult:
                                        type: array
                                        description: A list of predicted categories and their scores
                                        items:
                                          type: object
                                          properties:
                                            category:
                                              type: string
                                              description: The predicted category.
                                            score:
                                              type: number
                                              description: The score of the predicted category.
                                            ctr:
                                              type: number
                                              description: The CTR of the predicted category.
                                              format: float
                                            actions:
                                              type: array
                                              items:
                                                type: string
                                                description: |
                                                  The action to perform when the reliability level from `minReliabilityLevel` is reached.
                                                  - `staticFilter` will apply a static filter to limit the search results to the predicted category.
                                                  - `elasticFilter` will apply an elastic filter - if there are not enough results from the predicted category, the AI engine will pick items from other categories to meet the minimum number of results.
                                                  - `boosting` will increase the scores of items from the predicted category.

                                                  If reliability levels are met for multiple actions, the priority is:
                                                  1. static filter
                                                  2. elastic filter
                                                  3. boosting
                                                enum:
                                                  - staticFilter
                                                  - elasticFilter
                                                  - boosting
                                            reliabilityLevel:
                                              type: string
                                              description: The reliability level indicates how confident we are that a given prediction is the best choice.
                                              enum:
                                                - certain
                                                - veryHigh
                                                - high
                                                - medium
                                                - low
                      meta:
                        type: object
                        description: Optional metadata, such as pagination. This is returned if the `includeMeta` parameter was set to true in the request.
                        properties:
                          totalPages:
                            type: number
                            description: The total number of pages
                          totalCount:
                            type: number
                            description: The total number of search results
                          page:
                            type: number
                            description: The current page
                          limit:
                            type: number
                            description: The maximal number of items on a page
                          sortedBy:
                            type: string
                            description: The column (attribute) that the campaigns were sorted by
                          ordering:
                            type: string
                            description: Sorting order
                          code:
                            type: number
                            description: HTTP response code
                          link:
                            type: array
                            description: Links to neighboring pages, first page, and last page in pagination
                            items:
                              type: object
                              properties:
                                url:
                                  description: Page URL
                                  type: string
                                rel:
                                  type: string
                                  description: Position of the linked page
                                  enum:
                                    - first
                                    - next
                                    - prev
                                    - last
                  - type: object
                    title: Suggestion search
                    properties:
                      data:
                        type: array
                        description: A page of search query suggestions
                        items:
                          type: object
                          description: A search suggestion
                          properties:
                            _explanation:
                              type: object
                              description: Explanation of the result
                              properties:
                                origin:
                                  type: array
                                  description: The type of suggestion
                                  items:
                                    type: string
                                    enum:
                                      - Manual
                                      - Attribute
                                      - Event
                                popularityScore:
                                  type: number
                                  description: Popularity of the suggestion
                                score:
                                  type: number
                                  description: Score of the suggestion
                            suggestion:
                              type: string
                              description: The suggested search phrase
                      extras:
                        type: object
                        description: Additional information
                        properties:
                          correlationId:
                            type: string
                            description: |
                              This ID is used:
                              - for search result pagination
                              - as `correlationId` of the search event in events such as `items.search.click`

                              Search results are cached for 10 minutes.

                              The cached value will be used if the ID is provided in subsequent calls. This makes search faster and eliminates personalization non-determinism.
                          searchId:
                            type: string
                            deprecated: true
                            description: |
                              **DEPRECATED - use correlationId instead**

                              This ID is used:
                              - for search result pagination
                              - as `searchId` of the search event in events such as `items.search.click`

                              Search results are cached for 10 minutes.

                              The cached value will be used if the ID is provided in subsequent calls. This makes search faster and eliminates personalization non-determinism.
                          facetsOrdering:
                            type: array
                            description: |
                              An ordered list of facet attribute names indicating the display order of facets in the response.
                              When `facets=auto`, facets are ordered by coverage (most relevant first) unless `facetsOrderBy=name` is specified.
                              When facets are specified explicitly, the ordering is by name.
                              Empty when no facets are requested.

                              Matching query rules can override the resulting set and order via two consequences:
                              - `pinFacets` forces specific facets into the response, optionally at a specific 1-based slot.
                                Pinned facets bypass the coverage threshold in `facets=auto`.
                              - `hideFacets` removes specific facets from the response, also stripping them from
                                `customFilteredFacets`. Hide takes precedence over pin and over explicit `facets=[...]`.

                              The corresponding facet values appear in `filteredFacets`, `allFacets`, and `customFilteredFacets`
                              only for attributes present in this list.
                            items:
                              type: string
                            example:
                              - brand
                              - color
                              - size
                              - price
                      meta:
                        type: object
                        description: Optional metadata, such as pagination. This is returned if the `includeMeta` parameter was set to true in the request.
                        properties:
                          totalPages:
                            type: number
                            description: The total number of pages
                          totalCount:
                            type: number
                            description: The total number of search results
                          page:
                            type: number
                            description: The current page
                          limit:
                            type: number
                            description: The maximal number of items on a page
                          sortedBy:
                            type: string
                            description: The column (attribute) that the campaigns were sorted by
                          ordering:
                            type: string
                            description: Sorting order
                          code:
                            type: number
                            description: HTTP response code
                          link:
                            type: array
                            description: Links to neighboring pages, first page, and last page in pagination
                            items:
                              type: object
                              properties:
                                url:
                                  description: Page URL
                                  type: string
                                rel:
                                  type: string
                                  description: Position of the linked page
                                  enum:
                                    - first
                                    - next
                                    - prev
                                    - last
        "500":
          description: Service not available
          content:
            application/json:
              schema:
                type: object
                properties:
                  timestamp:
                    type: string
                    format: date-time
                    description: Time when the error occurred
                  status:
                    type: integer
                    description: Status code
                  error:
                    type: string
                    description: Summary of the error
                  message:
                    type: string
                    description: Description of the problem
                  path:
                    type: string
                    description: URL of the requested resource
                required:
                  - timestamp
                  - status
                  - message
      x-snr-doc-urls:
        - /api-reference/ai-search#tag/Search/operation/SearchFullTextPostWithExplanation
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/query/explain \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"query":"string","page":0,"limit":10,"sortBy":"string","ordering":"desc","includeMeta":true,"clientUUID":"string","personalize":true,"correlationId":"string","searchId":"string","sortByMetric":"TransactionsPopularity","sortByGeoPoints":"34.052235,-118.243685","filterGeoPoints":["34.052235,-118.243685","15.0,65.0"],"filterAroundRadius":2000,"filters":"string","facets":["string"],"customFilteredFacets":{"brand":"price > 100","price":"brand == foo"},"facetsSize":2000,"maxValuesPerFacet":50,"caseSensitiveFacetValues":false,"includeFacets":"all","facetsOrderBy":"coverage","context":["mobile","listing"],"displayAttributes":["title","price"],"distinctFilter":{"attribute":"string","maxNumItems":1,"levelRangeModifier":0},"ignoreQueryRules":false,"excludeQueryRules":[2,5],"params":{"source":"mobile"},"disableQueryClassification":false,"disableDynamicReranker":false,"crossWorkspaceMode":{"enabled":true}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"query\":\"string\",\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"personalize\":true,\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":1,\"levelRangeModifier\":0},\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"},\"disableQueryClassification\":false,\"disableDynamicReranker\":false,\"crossWorkspaceMode\":{\"enabled\":true}}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/search/v2/indices/%7BindexId%7D/query/explain", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "query": "string",
              "page": 0,
              "limit": 10,
              "sortBy": "string",
              "ordering": "desc",
              "includeMeta": true,
              "clientUUID": "string",
              "personalize": true,
              "correlationId": "string",
              "searchId": "string",
              "sortByMetric": "TransactionsPopularity",
              "sortByGeoPoints": "34.052235,-118.243685",
              "filterGeoPoints": [
                "34.052235,-118.243685",
                "15.0,65.0"
              ],
              "filterAroundRadius": 2000,
              "filters": "string",
              "facets": [
                "string"
              ],
              "customFilteredFacets": {
                "brand": "price > 100",
                "price": "brand == foo"
              },
              "facetsSize": 2000,
              "maxValuesPerFacet": 50,
              "caseSensitiveFacetValues": false,
              "includeFacets": "all",
              "facetsOrderBy": "coverage",
              "context": [
                "mobile",
                "listing"
              ],
              "displayAttributes": [
                "title",
                "price"
              ],
              "distinctFilter": {
                "attribute": "string",
                "maxNumItems": 1,
                "levelRangeModifier": 0
              },
              "ignoreQueryRules": false,
              "excludeQueryRules": [
                2,
                5
              ],
              "params": {
                "source": "mobile"
              },
              "disableQueryClassification": false,
              "disableDynamicReranker": false,
              "crossWorkspaceMode": {
                "enabled": true
              }
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/search/v2/indices/%7BindexId%7D/query/explain");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/search/v2/indices/%7BindexId%7D/query/explain",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              query: 'string',
              page: 0,
              limit: 10,
              sortBy: 'string',
              ordering: 'desc',
              includeMeta: true,
              clientUUID: 'string',
              personalize: true,
              correlationId: 'string',
              searchId: 'string',
              sortByMetric: 'TransactionsPopularity',
              sortByGeoPoints: '34.052235,-118.243685',
              filterGeoPoints: ['34.052235,-118.243685', '15.0,65.0'],
              filterAroundRadius: 2000,
              filters: 'string',
              facets: ['string'],
              customFilteredFacets: {brand: 'price > 100', price: 'brand == foo'},
              facetsSize: 2000,
              maxValuesPerFacet: 50,
              caseSensitiveFacetValues: false,
              includeFacets: 'all',
              facetsOrderBy: 'coverage',
              context: ['mobile', 'listing'],
              displayAttributes: ['title', 'price'],
              distinctFilter: {attribute: 'string', maxNumItems: 1, levelRangeModifier: 0},
              ignoreQueryRules: false,
              excludeQueryRules: [2, 5],
              params: {source: 'mobile'},
              disableQueryClassification: false,
              disableDynamicReranker: false,
              crossWorkspaceMode: {enabled: true}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/query/explain');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"query":"string","page":0,"limit":10,"sortBy":"string","ordering":"desc","includeMeta":true,"clientUUID":"string","personalize":true,"correlationId":"string","searchId":"string","sortByMetric":"TransactionsPopularity","sortByGeoPoints":"34.052235,-118.243685","filterGeoPoints":["34.052235,-118.243685","15.0,65.0"],"filterAroundRadius":2000,"filters":"string","facets":["string"],"customFilteredFacets":{"brand":"price > 100","price":"brand == foo"},"facetsSize":2000,"maxValuesPerFacet":50,"caseSensitiveFacetValues":false,"includeFacets":"all","facetsOrderBy":"coverage","context":["mobile","listing"],"displayAttributes":["title","price"],"distinctFilter":{"attribute":"string","maxNumItems":1,"levelRangeModifier":0},"ignoreQueryRules":false,"excludeQueryRules":[2,5],"params":{"source":"mobile"},"disableQueryClassification":false,"disableDynamicReranker":false,"crossWorkspaceMode":{"enabled":true}}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/search/v2/indices/%7BindexId%7D/query/explain")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"query\":\"string\",\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"personalize\":true,\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":1,\"levelRangeModifier\":0},\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"},\"disableQueryClassification\":false,\"disableDynamicReranker\":false,\"crossWorkspaceMode\":{\"enabled\":true}}")
              .asString();
servers:
  - description: Microsoft Azure EU
    url: https://api.synerise.com
  - description: Microsoft Azure USA
    url: https://api.azu.synerise.com
  - description: Google Cloud Platform
    url: https://api.geb.synerise.com
tags:
  - name: Search
components:
  securitySchemes:
    TrackerKey:
      type: apiKey
      name: token
      in: query
      description: Authorization by tracker key sent as a query parameter. This is the same key as used in the website tracking code.
    JWT:
      type: http
      scheme: bearer
      description: |-
        JWT Bearer token. The header looks like this: `Bearer {JWT}`

        Remember to include the space between 'Bearer' and the token.

        Generate a token via the **Authorization** endpoints.
```
