> ## 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.

# Retrieve queries that were made for a specified document-id

> This finds the top queries that led users to a particular item. The response is a list of query terms and their respective weights



## OpenAPI

````yaml /api-reference/4.2/service-recommend.json get /recommend/{collection}/queriesForItem
openapi: 3.0.0
info:
  version: 4.2.6-rc1
  title: Fusion Service recommend
servers:
  - url: /api/apollo/
security: []
tags:
  - name: recommend
paths:
  /recommend/{collection}/queriesForItem:
    get:
      tags:
        - 4.2 Recommend API
      summary: Retrieve queries that were made for a specified document-id
      description: >-
        This finds the top queries that led users to a particular item. The
        response is a list of query terms and their respective weights
      operationId: getQueriesForItem
      parameters:
        - name: collection
          in: path
          description: The name of a specific collection
          required: true
          schema:
            type: string
        - name: docId
          in: query
          description: The document ID
          required: false
          schema:
            type: string
        - name: rows
          in: query
          description: The number of items to return
          required: false
          schema:
            type: integer
            format: int32
            default: 10
        - name: aggrType
          in: query
          description: The type of aggregation
          required: false
          schema:
            type: string
            default: '*'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RecommendationResponseQueryResult'
components:
  schemas:
    RecommendationResponseQueryResult:
      type: object
      properties:
        header:
          $ref: '#/components/schemas/ResponseHeader'
        items:
          type: array
          readOnly: true
          items:
            $ref: '#/components/schemas/QueryResult'
        debugInfo:
          $ref: '#/components/schemas/RecommendationDebugQuery'
    ResponseHeader:
      type: object
      properties:
        queryParams:
          $ref: '#/components/schemas/RecommenderQueryParams'
        totalTime:
          type: integer
          format: int64
    QueryResult:
      type: object
      properties:
        query:
          type: string
        weight:
          type: number
          format: float
    RecommendationDebugQuery:
      type: object
      properties:
        aggrTime:
          type: integer
          format: int64
        queryTime:
          type: integer
          format: int64
        solrParams:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
    RecommenderQueryParams:
      type: object
      properties:
        aggrType:
          type: string
          readOnly: true
        modelId:
          type: string
          readOnly: true
        rows:
          type: integer
          format: int32
          readOnly: true
        collection:
          type: string
          readOnly: true
        aggrRows:
          type: integer
          format: int32
          readOnly: true
        q:
          type: string
        fq:
          type: array
          readOnly: true
          items:
            type: string
        docId:
          type: string
          readOnly: true
        userId:
          type: string
          readOnly: true
        debug:
          type: boolean
          readOnly: true
          default: false
        shinglesLimit:
          type: integer
          format: int32
          readOnly: true
        termsLimit:
          type: integer
          format: int32
          readOnly: true
        rollupField:
          type: string
          readOnly: true
        rollupWeightField:
          type: string
          readOnly: true
        rollupWeightStrategy:
          type: string
          readOnly: true
          enum:
            - sum
            - max

````