Skip to main content
GET
/
query-rewrite
/
search
Get query rewrite facets and hits
import requests

url = "https://{FUSION HOST}/api/query-rewrite/search"

headers = {"Authorization": "Basic <encoded-value>"}

response = requests.get(url, headers=headers)

print(response.json())
{
  "spellcheck": {
    "suggestions": {},
    "correctlySpelled": true,
    "collations": [
      {
        "collationQuery": "<string>",
        "hits": 123,
        "misspellingsAndCorrections": {}
      }
    ]
  },
  "response": {
    "response": {
      "numFound": 106,
      "start": 0,
      "docs": [
        {
          "title": [
            "Solr and SolrAdmin APIs - Fusion Documentation - Lucidworks"
          ]
        },
        {
          "title": [
            "Solr and SolrAdmin APIs - Fusion Documentation - Lucidworks"
          ]
        },
        {
          "title": [
            "Search Clusters - Fusion Documentation - Lucidworks"
          ]
        },
        {
          "title": [
            "Search Clusters - Fusion Documentation - Lucidworks"
          ]
        },
        {
          "title": [
            "Searching - Fusion Documentation - Lucidworks"
          ]
        }
      ]
    },
    "responseHeader": {
      "status": 0,
      "QTime": 1,
      "params": {
        "fl": "title",
        "lw.pipelineId": "default",
        "q": "solr",
        "wt": "json",
        "rows": "5",
        "defType": "edismax"
      }
    }
  },
  "responseHeader": {
    "zkConnected": true,
    "QTime": 123,
    "totalTime": 123,
    "params": {},
    "status": 123
  },
  "facet_counts": {
    "facet_fields": {},
    "facet_queries": {},
    "facet_ranges": {},
    "facet_intervals": {},
    "facet_heatmaps": {}
  },
  "facets": {},
  "stats": {
    "stats_fields": {}
  },
  "grouped": {},
  "debug": {},
  "highlighting": {},
  "fusionResponse": {}
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Query Parameters

context
string
required

The app to which this object belongs, as app:SomeApp. If the app doesn't exist, the request fails. Other comma-separated contexts in the context parameter are allowed but ignored.

editSessionId
string

An edit session ID filter. Equivalent to a Fusion username.

params
object
required

Additional parameters used when executing the query.

Response

200 - */*

OK

The search response.

spellcheck
object

Spellcheck results.

response
object

The query result documents and statistics.

Example:
{
"response": {
"numFound": 106,
"start": 0,
"docs": [
{
"title": [
"Solr and SolrAdmin APIs - Fusion Documentation - Lucidworks"
]
},
{
"title": [
"Solr and SolrAdmin APIs - Fusion Documentation - Lucidworks"
]
},
{
"title": [
"Search Clusters - Fusion Documentation - Lucidworks"
]
},
{
"title": [
"Search Clusters - Fusion Documentation - Lucidworks"
]
},
{
"title": [
"Searching - Fusion Documentation - Lucidworks"
]
}
]
},
"responseHeader": {
"status": 0,
"QTime": 1,
"params": {
"fl": "title",
"lw.pipelineId": "default",
"q": "solr",
"wt": "json",
"rows": "5",
"defType": "edismax"
}
}
}
responseHeader
object
facet_counts
object

Counts of facets matching the query.

facets
object
stats
object
grouped
object
debug
object
highlighting
object

Highlight snippets per matching document, if requested.

fusionResponse
object