> ## Documentation Index
> Fetch the complete documentation index at: https://help.teable.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Post adminobservabilitytable query opssearch access pathsanalyze

> Analyze generated text GIN access paths for exact substring search

Required token scopes: `instance|read`



## OpenAPI

````yaml /swagger.json post /admin/observability/table-query-ops/search-access-paths/analyze
openapi: 3.0.0
info:
  version: 1.0.0
  title: Teable App
  description: Manage Data as easy as drink a cup of tea
  x-logo:
    backgroundColor: '#F0F0F0'
    altText: Teable logo
servers:
  - url: https://app.teable.ai/api
security: []
tags:
  - name: base
    x-group: project
  - name: base node
    x-group: project node
  - name: base-share
    x-group: project-share
paths:
  /admin/observability/table-query-ops/search-access-paths/analyze:
    post:
      tags:
        - admin
        - observability
      description: |-
        Analyze generated text GIN access paths for exact substring search

        Required token scopes: `instance|read`
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                spaceId:
                  type: string
                  minLength: 1
                baseId:
                  type: string
                  minLength: 1
                tableId:
                  type: string
                  minLength: 1
                fieldIds:
                  anyOf:
                    - type: string
                    - type: array
                      items:
                        type: string
                provider:
                  type: string
                  enum:
                    - pg_bigm
                    - pg_trgm
                searchProbe:
                  type: string
                includeResultSamples:
                  type: boolean
                  default: true
                sampleResultLimit:
                  type: integer
                  nullable: true
                  minimum: 0
                  maximum: 3
                  default: 3
                maxRecommendations:
                  type: integer
                  minimum: 1
                  maximum: 20
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  scope:
                    type: object
                    properties:
                      spaceId:
                        type: string
                      baseId:
                        type: string
                      tableId:
                        type: string
                      fieldIds:
                        type: array
                        items:
                          type: string
                      semantics:
                        type: string
                        enum:
                          - substring
                      provider:
                        type: string
                        enum:
                          - pg_bigm
                          - pg_trgm
                      maxRecommendations:
                        type: number
                    required:
                      - semantics
                  tableCount:
                    type: number
                  searchProbeLengthBucket:
                    type: string
                    enum:
                      - none
                      - short
                      - medium
                      - long
                  scannedFieldCount:
                    type: number
                  coveredFieldCount:
                    type: number
                  skippedFieldCount:
                    type: number
                  recommendations:
                    type: array
                    items:
                      type: object
                      properties:
                        candidateKey:
                          type: string
                        tableId:
                          type: string
                        tableName:
                          type: string
                        baseId:
                          type: string
                        generatedColumnName:
                          type: string
                        generatedTextColumnName:
                          type: string
                        indexName:
                          type: string
                        indexKind:
                          type: string
                          enum:
                            - gin_bigm
                            - gin_trgm
                        accessPath:
                          type: string
                          enum:
                            - generated_text
                        semantics:
                          type: string
                          enum:
                            - substring
                        provider:
                          type: string
                          enum:
                            - pg_bigm
                            - pg_trgm
                        providerCapability:
                          type: object
                          properties:
                            provider:
                              type: string
                              enum:
                                - pg_bigm
                                - pg_trgm
                            extensionName:
                              type: string
                              enum:
                                - pg_bigm
                                - pg_trgm
                            operatorClass:
                              type: string
                              enum:
                                - gin_bigm_ops
                                - gin_trgm_ops
                            operatorClassSchema:
                              type: string
                            extensionInstalled:
                              type: boolean
                            extensionAvailable:
                              type: boolean
                            operatorClassInstalled:
                              type: boolean
                            usable:
                              type: boolean
                            minimumProbeLength:
                              type: integer
                              minimum: 1
                            reason:
                              type: string
                              enum:
                                - extension_not_installed
                                - extension_unavailable
                                - extension_not_preloaded
                                - operator_class_missing
                          required:
                            - provider
                            - extensionName
                            - operatorClass
                            - extensionInstalled
                            - extensionAvailable
                            - operatorClassInstalled
                            - usable
                            - minimumProbeLength
                        providerCapabilities:
                          type: array
                          items:
                            type: object
                            properties:
                              provider:
                                type: string
                                enum:
                                  - pg_bigm
                                  - pg_trgm
                              extensionName:
                                type: string
                                enum:
                                  - pg_bigm
                                  - pg_trgm
                              operatorClass:
                                type: string
                                enum:
                                  - gin_bigm_ops
                                  - gin_trgm_ops
                              operatorClassSchema:
                                type: string
                              extensionInstalled:
                                type: boolean
                              extensionAvailable:
                                type: boolean
                              operatorClassInstalled:
                                type: boolean
                              usable:
                                type: boolean
                              minimumProbeLength:
                                type: integer
                                minimum: 1
                              reason:
                                type: string
                                enum:
                                  - extension_not_installed
                                  - extension_unavailable
                                  - extension_not_preloaded
                                  - operator_class_missing
                            required:
                              - provider
                              - extensionName
                              - operatorClass
                              - extensionInstalled
                              - extensionAvailable
                              - operatorClassInstalled
                              - usable
                              - minimumProbeLength
                        operatorClass:
                          type: string
                          enum:
                            - gin_bigm_ops
                            - gin_trgm_ops
                        minimumProbeLength:
                          type: integer
                          minimum: 1
                        searchScope:
                          type: string
                          enum:
                            - selected_fields
                            - all_fields
                        coveredFields:
                          type: array
                          items:
                            type: object
                            properties:
                              fieldId:
                                type: string
                              fieldName:
                                type: string
                              fieldDbName:
                                type: string
                              fieldType:
                                type: string
                              valueType:
                                type: string
                              included:
                                type: boolean
                              textProjection:
                                type: object
                                properties:
                                  kind:
                                    type: string
                                    enum:
                                      - plain
                                      - multiline
                                      - plain_list
                                      - structured_title
                                      - structured_title_list
                                      - rounded_number
                                      - rounded_number_list
                                  precision:
                                    type: integer
                                    minimum: 0
                                required:
                                  - kind
                              skippedReason:
                                type: string
                            required:
                              - fieldId
                              - fieldName
                              - fieldType
                              - included
                        skippedFields:
                          type: array
                          items:
                            type: object
                            properties:
                              fieldId:
                                type: string
                              fieldName:
                                type: string
                              fieldDbName:
                                type: string
                              fieldType:
                                type: string
                              valueType:
                                type: string
                              included:
                                type: boolean
                              textProjection:
                                type: object
                                properties:
                                  kind:
                                    type: string
                                    enum:
                                      - plain
                                      - multiline
                                      - plain_list
                                      - structured_title
                                      - structured_title_list
                                      - rounded_number
                                      - rounded_number_list
                                  precision:
                                    type: integer
                                    minimum: 0
                                required:
                                  - kind
                              skippedReason:
                                type: string
                            required:
                              - fieldId
                              - fieldName
                              - fieldType
                              - included
                        estimatedRows:
                          type: number
                        tableSizeBytes:
                          type: number
                        inventory:
                          type: object
                          properties:
                            state:
                              type: string
                              enum:
                                - ready
                                - missing
                                - stale
                                - invalid
                                - unknown
                            semantics:
                              type: string
                              enum:
                                - substring
                            provider:
                              type: string
                              enum:
                                - pg_bigm
                                - pg_trgm
                            operatorClass:
                              type: string
                              enum:
                                - gin_bigm_ops
                                - gin_trgm_ops
                            existingGeneratedColumn:
                              type: string
                            existingIndexName:
                              type: string
                            existingIndexValid:
                              type: boolean
                            staleReasons:
                              type: array
                              items:
                                type: string
                          required:
                            - state
                            - staleReasons
                        planEvidence:
                          type: object
                          properties:
                            explainStatus:
                              type: string
                              enum:
                                - validated
                                - skipped
                                - failed
                            explainMethod:
                              type: string
                              enum:
                                - explain
                                - hypothetical_index
                                - real_index
                            explainReason:
                              type: string
                            costBefore:
                              type: number
                            costAfter:
                              type: number
                            costDeltaPct:
                              type: number
                            planNodeBefore:
                              type: string
                            planNodeAfter:
                              type: string
                            usesCandidateIndex:
                              type: boolean
                            semanticsCompatible:
                              type: boolean
                            hypotheticalIndexStatement:
                              type: string
                            sqlDetails:
                              type: object
                              properties:
                                beforeSql:
                                  type: string
                                afterSql:
                                  type: string
                                searchProbeLengthBucket:
                                  type: string
                                  enum:
                                    - none
                                    - short
                                    - medium
                                    - long
                                placeholders:
                                  type: object
                                  properties:
                                    likePattern:
                                      type: string
                                    tsquery:
                                      type: string
                                  required:
                                    - likePattern
                                    - tsquery
                                redaction:
                                  type: string
                                  enum:
                                    - search_probe_parameterized
                              required:
                                - beforeSql
                                - afterSql
                                - searchProbeLengthBucket
                                - placeholders
                                - redaction
                          required:
                            - explainStatus
                        resultCompatibility:
                          type: object
                          properties:
                            status:
                              type: string
                              enum:
                                - exact
                                - mismatch
                                - not_validated
                            baseline:
                              type: string
                              enum:
                                - ilike
                            baselineMatchCount:
                              type: number
                            candidateMatchCount:
                              type: number
                            sampleOverlap:
                              type: number
                              minimum: 0
                              maximum: 1
                            reason:
                              type: string
                          required:
                            - status
                            - baseline
                        repeatedTiming:
                          type: object
                          properties:
                            status:
                              type: string
                              enum:
                                - measured
                                - not_measured
                            iterations:
                              type: integer
                              minimum: 1
                            warmupIterations:
                              type: integer
                              minimum: 0
                            beforeMedianMs:
                              type: number
                              minimum: 0
                            afterMedianMs:
                              type: number
                              minimum: 0
                            improvementPct:
                              type: number
                            reason:
                              type: string
                          required:
                            - status
                        semanticsReport:
                          type: object
                          properties:
                            searchProbeLengthBucket:
                              type: string
                              enum:
                                - none
                                - short
                                - medium
                                - long
                            baselineStrategy:
                              type: string
                              enum:
                                - ilike
                            comparisons:
                              type: array
                              items:
                                type: object
                                properties:
                                  strategy:
                                    type: string
                                    enum:
                                      - ilike
                                      - bigram
                                      - trigram
                                  label:
                                    type: string
                                  semantics:
                                    type: string
                                    enum:
                                      - substring
                                      - trigram_substring
                                  available:
                                    type: boolean
                                  availabilityReason:
                                    type: string
                                  indexSupport:
                                    type: string
                                    enum:
                                      - none
                                      - generated_text_gin
                                      - existing_or_manual_trigram
                                      - extension_required
                                  explainStatus:
                                    type: string
                                    enum:
                                      - validated
                                      - skipped
                                      - failed
                                  explainReason:
                                    type: string
                                  cost:
                                    type: number
                                  planNode:
                                    type: string
                                  usesIndex:
                                    type: boolean
                                  matchCount:
                                    type: number
                                  matchCountDeltaFromIlike:
                                    type: number
                                  matchCountDeltaPctFromIlike:
                                    type: number
                                  sampleOverlapWithIlike:
                                    type: number
                                  sampleResults:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        recordId:
                                          type: string
                                        fieldPreviews:
                                          type: array
                                          items:
                                            type: object
                                            properties:
                                              fieldId:
                                                type: string
                                              fieldName:
                                                type: string
                                              fieldDbName:
                                                type: string
                                              preview:
                                                type: string
                                              previewLength:
                                                type: number
                                              truncated:
                                                type: boolean
                                            required:
                                              - fieldId
                                              - fieldName
                                              - fieldDbName
                                              - preview
                                              - previewLength
                                              - truncated
                                      required:
                                        - fieldPreviews
                                required:
                                  - strategy
                                  - label
                                  - semantics
                                  - available
                                  - indexSupport
                                  - explainStatus
                                  - sampleResults
                          required:
                            - searchProbeLengthBucket
                            - baselineStrategy
                            - comparisons
                        nextAction:
                          type: string
                          enum:
                            - ready_for_confirmation
                            - no_index_change
                            - candidate_not_recommended
                            - needs_plan_validation
                            - manual_investigation
                      required:
                        - candidateKey
                        - tableId
                        - tableName
                        - baseId
                        - generatedColumnName
                        - generatedTextColumnName
                        - indexName
                        - indexKind
                        - accessPath
                        - semantics
                        - provider
                        - providerCapability
                        - providerCapabilities
                        - operatorClass
                        - minimumProbeLength
                        - searchScope
                        - coveredFields
                        - skippedFields
                        - estimatedRows
                        - inventory
                        - planEvidence
                        - resultCompatibility
                        - repeatedTiming
                        - nextAction
                  scopeHeatReports:
                    type: array
                    items:
                      type: object
                      properties:
                        tableId:
                          type: string
                        tableName:
                          type: string
                        estimatedRows:
                          type: number
                        scannedObservationCount:
                          type: number
                        scopes:
                          type: array
                          items:
                            type: object
                            properties:
                              scopeKey:
                                type: string
                              searchedFieldIds:
                                type: array
                                items:
                                  type: string
                              searchedFields:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    fieldId:
                                      type: string
                                    fieldName:
                                      type: string
                                  required:
                                    - fieldId
                                    - fieldName
                              searchMode:
                                type: string
                                enum:
                                  - ilike
                                  - substring
                                  - trigram
                                  - full_text
                              requestCount:
                                type: number
                              slowCount:
                                type: number
                              timeoutCount:
                                type: number
                              totalDurationMs:
                                type: number
                              maxDurationMs:
                                type: number
                              averageDurationMs:
                                type: number
                              heatScore:
                                type: number
                              hot:
                                type: boolean
                              reasonCodes:
                                type: array
                                items:
                                  type: string
                                  enum:
                                    - high_request_volume
                                    - high_total_duration
                                    - slow_query_volume
                                    - large_table
                              nextAction:
                                type: string
                                enum:
                                  - needs_plan_validation
                                  - no_index_change
                            required:
                              - scopeKey
                              - searchedFieldIds
                              - searchedFields
                              - searchMode
                              - requestCount
                              - slowCount
                              - timeoutCount
                              - totalDurationMs
                              - maxDurationMs
                              - averageDurationMs
                              - heatScore
                              - hot
                              - reasonCodes
                              - nextAction
                      required:
                        - tableId
                        - tableName
                        - estimatedRows
                        - scannedObservationCount
                        - scopes
                  scopedExpressionRecommendations:
                    type: array
                    items:
                      type: object
                      properties:
                        candidateKey:
                          type: string
                        tableId:
                          type: string
                        tableName:
                          type: string
                        baseId:
                          type: string
                        indexName:
                          type: string
                        indexKind:
                          type: string
                          enum:
                            - gin_bigm_expression
                            - gin_trgm_expression
                        accessPath:
                          type: string
                          enum:
                            - scoped_expression_gin
                        semantics:
                          type: string
                          enum:
                            - substring
                        provider:
                          type: string
                          enum:
                            - pg_bigm
                            - pg_trgm
                        operatorClass:
                          type: string
                          enum:
                            - gin_bigm_ops
                            - gin_trgm_ops
                        minimumProbeLength:
                          type: integer
                          minimum: 1
                        searchedFieldIds:
                          type: array
                          items:
                            type: string
                        coveredFields:
                          type: array
                          items:
                            type: object
                            properties:
                              fieldId:
                                type: string
                              fieldName:
                                type: string
                              fieldDbName:
                                type: string
                              fieldType:
                                type: string
                              valueType:
                                type: string
                              included:
                                type: boolean
                              textProjection:
                                type: object
                                properties:
                                  kind:
                                    type: string
                                    enum:
                                      - plain
                                      - multiline
                                      - plain_list
                                      - structured_title
                                      - structured_title_list
                                      - rounded_number
                                      - rounded_number_list
                                  precision:
                                    type: integer
                                    minimum: 0
                                required:
                                  - kind
                              skippedReason:
                                type: string
                            required:
                              - fieldId
                              - fieldName
                              - fieldType
                              - included
                        scopeHeat:
                          type: object
                          properties:
                            scopeKey:
                              type: string
                            searchedFieldIds:
                              type: array
                              items:
                                type: string
                            searchedFields:
                              type: array
                              items:
                                type: object
                                properties:
                                  fieldId:
                                    type: string
                                  fieldName:
                                    type: string
                                required:
                                  - fieldId
                                  - fieldName
                            searchMode:
                              type: string
                              enum:
                                - ilike
                                - substring
                                - trigram
                                - full_text
                            requestCount:
                              type: number
                            slowCount:
                              type: number
                            timeoutCount:
                              type: number
                            totalDurationMs:
                              type: number
                            maxDurationMs:
                              type: number
                            averageDurationMs:
                              type: number
                            heatScore:
                              type: number
                            hot:
                              type: boolean
                            reasonCodes:
                              type: array
                              items:
                                type: string
                                enum:
                                  - high_request_volume
                                  - high_total_duration
                                  - slow_query_volume
                                  - large_table
                            nextAction:
                              type: string
                              enum:
                                - needs_plan_validation
                                - no_index_change
                          required:
                            - scopeKey
                            - searchedFieldIds
                            - searchedFields
                            - searchMode
                            - requestCount
                            - slowCount
                            - timeoutCount
                            - totalDurationMs
                            - maxDurationMs
                            - averageDurationMs
                            - heatScore
                            - hot
                            - reasonCodes
                            - nextAction
                        planEvidence:
                          type: object
                          properties:
                            explainStatus:
                              type: string
                              enum:
                                - validated
                                - skipped
                                - failed
                            explainMethod:
                              type: string
                              enum:
                                - explain
                                - hypothetical_index
                                - real_index
                            explainReason:
                              type: string
                            costBefore:
                              type: number
                            costAfter:
                              type: number
                            costDeltaPct:
                              type: number
                            planNodeBefore:
                              type: string
                            planNodeAfter:
                              type: string
                            usesCandidateIndex:
                              type: boolean
                            semanticsCompatible:
                              type: boolean
                            hypotheticalIndexStatement:
                              type: string
                            sqlDetails:
                              type: object
                              properties:
                                beforeSql:
                                  type: string
                                afterSql:
                                  type: string
                                searchProbeLengthBucket:
                                  type: string
                                  enum:
                                    - none
                                    - short
                                    - medium
                                    - long
                                placeholders:
                                  type: object
                                  properties:
                                    likePattern:
                                      type: string
                                    tsquery:
                                      type: string
                                  required:
                                    - likePattern
                                    - tsquery
                                redaction:
                                  type: string
                                  enum:
                                    - search_probe_parameterized
                              required:
                                - beforeSql
                                - afterSql
                                - searchProbeLengthBucket
                                - placeholders
                                - redaction
                          required:
                            - explainStatus
                        nextAction:
                          type: string
                          enum:
                            - ready_for_confirmation
                            - no_index_change
                            - candidate_not_recommended
                            - needs_plan_validation
                            - manual_investigation
                      required:
                        - candidateKey
                        - tableId
                        - tableName
                        - baseId
                        - indexName
                        - indexKind
                        - accessPath
                        - semantics
                        - provider
                        - operatorClass
                        - minimumProbeLength
                        - searchedFieldIds
                        - coveredFields
                        - scopeHeat
                        - planEvidence
                        - nextAction
                  coverageReport:
                    type: object
                    properties:
                      scannedFieldCount:
                        type: number
                      coveredFieldCount:
                        type: number
                      skippedFieldCount:
                        type: number
                      skippedReasons:
                        type: object
                        additionalProperties:
                          type: number
                    required:
                      - scannedFieldCount
                      - coveredFieldCount
                      - skippedFieldCount
                      - skippedReasons
                required:
                  - scope
                  - tableCount
                  - searchProbeLengthBucket
                  - scannedFieldCount
                  - coveredFieldCount
                  - skippedFieldCount
                  - recommendations
                  - scopeHeatReports
                  - scopedExpressionRecommendations
                  - coverageReport
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request POST \
              --url https://app.teable.ai/api/admin/observability/table-query-ops/search-access-paths/analyze \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"spaceId":"string","baseId":"string","tableId":"string","fieldIds":"string","provider":"pg_bigm","searchProbe":"string","includeResultSamples":true,"sampleResultLimit":3,"maxRecommendations":1}'
        - lang: JavaScript
          source: >-
            const url =
            'https://app.teable.ai/api/admin/observability/table-query-ops/search-access-paths/analyze';

            const options = {
              method: 'POST',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              },
              body: '{"spaceId":"string","baseId":"string","tableId":"string","fieldIds":"string","provider":"pg_bigm","searchProbe":"string","includeResultSamples":true,"sampleResultLimit":3,"maxRecommendations":1}'
            };


            try {
              const response = await fetch(url, options);
              const data = await response.json();
              console.log(data);
            } catch (error) {
              console.error(error);
            }
        - lang: Node.js
          source: |-
            const http = require('https');

            const options = {
              method: 'POST',
              hostname: 'app.teable.ai',
              port: null,
              path: '/api/admin/observability/table-query-ops/search-access-paths/analyze',
              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({
              spaceId: 'string',
              baseId: 'string',
              tableId: 'string',
              fieldIds: 'string',
              provider: 'pg_bigm',
              searchProbe: 'string',
              includeResultSamples: true,
              sampleResultLimit: 3,
              maxRecommendations: 1
            }));
            req.end();
        - lang: Python
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("app.teable.ai")


            payload =
            "{\"spaceId\":\"string\",\"baseId\":\"string\",\"tableId\":\"string\",\"fieldIds\":\"string\",\"provider\":\"pg_bigm\",\"searchProbe\":\"string\",\"includeResultSamples\":true,\"sampleResultLimit\":3,\"maxRecommendations\":1}"


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


            conn.request("POST",
            "/api/admin/observability/table-query-ops/search-access-paths/analyze",
            payload, headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````