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

# Search the query rewrite staging collection to get facets and hits



## OpenAPI

````yaml /api-reference/4.2/service-query-rewrite.json get /query-rewrite/search
openapi: 3.0.0
info:
  version: 4.2.6-rc1
  title: Fusion Service query-rewrite
servers:
  - url: /api/apollo/
security: []
tags:
  - name: query-rewrite
paths:
  /query-rewrite/search:
    get:
      tags:
        - 4.2 Query Rewrite API
      summary: Search the query rewrite staging collection to get facets and hits
      operationId: search
      parameters:
        - name: context
          in: query
          description: The current Fusion application Id
          required: false
          schema:
            type: string
        - name: editSessionId
          in: query
          description: The current user session Id
          required: false
          schema:
            type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResponse'
components:
  schemas:
    SearchResponse:
      type: object
      properties:
        response:
          $ref: '#/components/schemas/Response'
        responseHeader:
          $ref: '#/components/schemas/ResponseHeader'
        facet_counts:
          $ref: '#/components/schemas/FacetCountsCollection'
        facets:
          type: object
          additionalProperties:
            type: object
        stats:
          $ref: '#/components/schemas/Stats'
        debug:
          type: object
          additionalProperties:
            type: object
        highlighting:
          type: object
          additionalProperties:
            type: object
        fusionResponse:
          type: object
          additionalProperties:
            type: object
    Response:
      type: object
      properties:
        numFound:
          type: integer
          format: int64
        start:
          type: integer
          format: int64
        maxScore:
          type: number
          format: double
        docs:
          type: array
          items:
            type: object
            additionalProperties:
              type: object
    ResponseHeader:
      type: object
      properties:
        status:
          type: integer
          format: int32
        QTime:
          type: integer
          format: int32
        params:
          type: object
          additionalProperties:
            type: object
    FacetCountsCollection:
      type: object
      properties:
        facet_fields:
          type: object
          readOnly: true
          additionalProperties:
            type: object
        facet_ranges:
          type: object
          readOnly: true
          additionalProperties:
            $ref: '#/components/schemas/FacetRange'
    Stats:
      type: object
      properties:
        stats_fields:
          type: object
          additionalProperties:
            type: object
    FacetRange:
      type: object
      properties:
        counts:
          type: object
          additionalProperties:
            type: integer
            format: int32
        gap:
          type: object
        start:
          type: object
        end:
          type: object
        after:
          type: object
        before:
          type: object
        between:
          type: object

````