import requests
url = "https://{FUSION HOST}/api/query/{id}"
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 results
Send a query to a query profile, using the Solr query language.
The response contains matching documents, plus statistics about the query operation.
Use the /api/query-profiles endpoint to get the query profile ID for this request. For a Domain Search Language (DSL) search, see the POST method for this endpoint.
import requests
url = "https://{FUSION HOST}/api/query/{id}"
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 profile ID.
Query Parameters
The query terms, using the Solr query language.
Additional Solr query parameters. 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?