import requests
url = "https://{FUSION HOST}/api/query-rewrite/search/{type}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text){
"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": {}
}Get query rewrite facets and hits
Search the query rewrite staging collection to get facets and hits.
import requests
url = "https://{FUSION HOST}/api/query-rewrite/search/{type}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text){
"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
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Path Parameters
The query rewrite type. Use /query-rewrite/schema to get the available query rewrite types.
Query Parameters
An application name
An edit session ID filter. Equivalent to a Fusion username.
Additional parameters used when executing the query. The parameters of the query request.
Show child attributes
Show child attributes
Response
OK
The search response.
Spellcheck results.
Show child attributes
Show child attributes
The query result documents and statistics.
Show child attributes
Show child attributes
{
"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"
}
}
}Show child attributes
Show child attributes
Counts of facets matching the query.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Highlight snippets per matching document, if requested.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?