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

# Buscar em múltiplas coleções

> Realiza busca em várias coleções simultaneamente



## OpenAPI

````yaml https://raw.githubusercontent.com/prefeitura-rio/app-go-api/refs/heads/main/docs/openapi-v3.json post /api/v1/typesense/multi-search
openapi: 3.0.0
info:
  description: API de serviços para aplicativos da Prefeitura do Rio
  title: API Go
  termsOfService: http://swagger.io/terms/
  contact:
    name: API Support
    url: https://iplan.rio
    email: frederico.zolio@prefeitura.rio
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: '1.0'
servers:
  - url: https://services.pref.rio/go
    description: Production
  - url: https://services.staging.app.dados.rio/go
    description: Staging
security:
  - BearerAuth: []
paths:
  /api/v1/typesense/multi-search:
    post:
      tags:
        - search
      summary: Buscar em múltiplas coleções
      description: Realiza busca em várias coleções simultaneamente
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/models.MultiCollectionSearchParameters'
        description: Parâmetros de busca
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.MultiCollectionSearchResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    models.MultiCollectionSearchParameters:
      type: object
      properties:
        collections:
          description: Lista de nomes das coleções para buscar
          type: array
          items:
            type: string
        params:
          description: Parâmetros de busca
          allOf:
            - $ref: '#/components/schemas/models.SearchParameters'
    models.MultiCollectionSearchResponse:
      type: object
      properties:
        results:
          description: Mapa de resultados por coleção
          type: object
          additionalProperties:
            $ref: '#/components/schemas/models.SearchDocumentsResponse'
        total_found:
          type: integer
    models.ErrorResponse:
      type: object
      properties:
        code:
          type: integer
        message:
          type: string
    models.SearchParameters:
      type: object
      properties:
        exclude_fields:
          type: string
        facet_by:
          type: string
        facet_query:
          type: string
        filter_by:
          type: string
        highlight_fields:
          type: string
        highlight_full_fields:
          type: string
        include_fields:
          type: string
        max_facet_values:
          type: integer
        num_typos:
          type: integer
        page:
          type: integer
        per_page:
          type: integer
        prefix:
          type: boolean
        q:
          type: string
        query_by:
          type: string
        sort_by:
          type: string
    models.SearchDocumentsResponse:
      type: object
      properties:
        found:
          type: integer
        hits:
          type: array
          items:
            type: object
            additionalProperties: true
        page:
          type: integer
        request_params:
          type: object
          additionalProperties: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````