import requests
url = "https://{FUSION HOST}/api/query-pipelines/{id}"
payload = {
"queryDefinition": {
"main": { "type": "<string>" },
"boostsByValues": [
{
"field": "<string>",
"boosts": [
{
"key": "<string>",
"boost": 100
}
]
}
],
"boostsByQuery": [
{
"query": { "type": "<string>" },
"boost": 123,
"type": "<string>"
}
],
"userQuery": "<string>",
"filters": [{ "type": "<string>" }],
"namedFilters": [
{
"name": "<string>",
"query": { "type": "<string>" }
}
],
"groupedQuery": { "type": "<string>" },
"groupedFilters": [{ "type": "<string>" }]
},
"results": {
"cursor": "<string>",
"start": 0,
"size": 123,
"sort": [
{
"value": "<string>",
"query": { "type": "<string>" }
}
],
"fields": ["<string>"],
"highlight": {
"fields": ["<string>"],
"pre": "<em>",
"post": "</em>",
"length": 100,
"count": 1,
"defaultHighlight": False
},
"returnScore": True,
"includeRawResponse": True,
"group": {
"field": "<string>",
"leaderStrategy": { "type": "<string>" },
"sort": [
{
"value": "<string>",
"query": { "type": "<string>" }
}
],
"size": 123
}
},
"params": {},
"context": {},
"facets": {
"fields": [
{
"field": "<string>",
"prefix": "<string>",
"limit": 100,
"offset": 0,
"minCount": 123,
"missing": True,
"ensuredValues": ["<string>"],
"domain": {
"additionalFilters": [{ "type": "<string>" }],
"excludedFiltersByName": ["<string>"]
}
}
],
"ranges": [
{
"field": "<string>",
"start": "<string>",
"end": "<string>",
"gap": "<string>",
"hardEnd": True,
"minCount": 123,
"include": [],
"other": [],
"domain": {
"additionalFilters": [{ "type": "<string>" }],
"excludedFiltersByName": ["<string>"]
}
}
],
"groupFacets": True
}
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)HttpResponse<String> response = Unirest.post("https://{FUSION HOST}/api/query-pipelines/{id}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"queryDefinition\": {\n \"main\": {\n \"type\": \"<string>\"\n },\n \"boostsByValues\": [\n {\n \"field\": \"<string>\",\n \"boosts\": [\n {\n \"key\": \"<string>\",\n \"boost\": 100\n }\n ]\n }\n ],\n \"boostsByQuery\": [\n {\n \"query\": {\n \"type\": \"<string>\"\n },\n \"boost\": 123,\n \"type\": \"<string>\"\n }\n ],\n \"userQuery\": \"<string>\",\n \"filters\": [\n {\n \"type\": \"<string>\"\n }\n ],\n \"namedFilters\": [\n {\n \"name\": \"<string>\",\n \"query\": {\n \"type\": \"<string>\"\n }\n }\n ],\n \"groupedQuery\": {\n \"type\": \"<string>\"\n },\n \"groupedFilters\": [\n {\n \"type\": \"<string>\"\n }\n ]\n },\n \"results\": {\n \"cursor\": \"<string>\",\n \"start\": 0,\n \"size\": 123,\n \"sort\": [\n {\n \"value\": \"<string>\",\n \"query\": {\n \"type\": \"<string>\"\n }\n }\n ],\n \"fields\": [\n \"<string>\"\n ],\n \"highlight\": {\n \"fields\": [\n \"<string>\"\n ],\n \"pre\": \"<em>\",\n \"post\": \"</em>\",\n \"length\": 100,\n \"count\": 1,\n \"defaultHighlight\": false\n },\n \"returnScore\": true,\n \"includeRawResponse\": true,\n \"group\": {\n \"field\": \"<string>\",\n \"leaderStrategy\": {\n \"type\": \"<string>\"\n },\n \"sort\": [\n {\n \"value\": \"<string>\",\n \"query\": {\n \"type\": \"<string>\"\n }\n }\n ],\n \"size\": 123\n }\n },\n \"params\": {},\n \"context\": {},\n \"facets\": {\n \"fields\": [\n {\n \"field\": \"<string>\",\n \"prefix\": \"<string>\",\n \"limit\": 100,\n \"offset\": 0,\n \"minCount\": 123,\n \"missing\": true,\n \"ensuredValues\": [\n \"<string>\"\n ],\n \"domain\": {\n \"additionalFilters\": [\n {\n \"type\": \"<string>\"\n }\n ],\n \"excludedFiltersByName\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"ranges\": [\n {\n \"field\": \"<string>\",\n \"start\": \"<string>\",\n \"end\": \"<string>\",\n \"gap\": \"<string>\",\n \"hardEnd\": true,\n \"minCount\": 123,\n \"include\": [],\n \"other\": [],\n \"domain\": {\n \"additionalFilters\": [\n {\n \"type\": \"<string>\"\n }\n ],\n \"excludedFiltersByName\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"groupFacets\": true\n }\n}")
.asString();const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
queryDefinition: {
main: {type: '<string>'},
boostsByValues: [{field: '<string>', boosts: [{key: '<string>', boost: 100}]}],
boostsByQuery: [{query: {type: '<string>'}, boost: 123, type: '<string>'}],
userQuery: '<string>',
filters: [{type: '<string>'}],
namedFilters: [{name: '<string>', query: {type: '<string>'}}],
groupedQuery: {type: '<string>'},
groupedFilters: [{type: '<string>'}]
},
results: {
cursor: '<string>',
start: 0,
size: 123,
sort: [{value: '<string>', query: {type: '<string>'}}],
fields: ['<string>'],
highlight: {
fields: ['<string>'],
pre: '<em>',
post: '</em>',
length: 100,
count: 1,
defaultHighlight: false
},
returnScore: true,
includeRawResponse: true,
group: {
field: '<string>',
leaderStrategy: {type: '<string>'},
sort: [{value: '<string>', query: {type: '<string>'}}],
size: 123
}
},
params: {},
context: {},
facets: {
fields: [
{
field: '<string>',
prefix: '<string>',
limit: 100,
offset: 0,
minCount: 123,
missing: true,
ensuredValues: ['<string>'],
domain: {additionalFilters: [{type: '<string>'}], excludedFiltersByName: ['<string>']}
}
],
ranges: [
{
field: '<string>',
start: '<string>',
end: '<string>',
gap: '<string>',
hardEnd: true,
minCount: 123,
include: [],
other: [],
domain: {additionalFilters: [{type: '<string>'}], excludedFiltersByName: ['<string>']}
}
],
groupFacets: true
}
})
};
fetch('https://{FUSION HOST}/api/query-pipelines/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://{FUSION HOST}/api/query-pipelines/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"queryDefinition\": {\n \"main\": {\n \"type\": \"<string>\"\n },\n \"boostsByValues\": [\n {\n \"field\": \"<string>\",\n \"boosts\": [\n {\n \"key\": \"<string>\",\n \"boost\": 100\n }\n ]\n }\n ],\n \"boostsByQuery\": [\n {\n \"query\": {\n \"type\": \"<string>\"\n },\n \"boost\": 123,\n \"type\": \"<string>\"\n }\n ],\n \"userQuery\": \"<string>\",\n \"filters\": [\n {\n \"type\": \"<string>\"\n }\n ],\n \"namedFilters\": [\n {\n \"name\": \"<string>\",\n \"query\": {\n \"type\": \"<string>\"\n }\n }\n ],\n \"groupedQuery\": {\n \"type\": \"<string>\"\n },\n \"groupedFilters\": [\n {\n \"type\": \"<string>\"\n }\n ]\n },\n \"results\": {\n \"cursor\": \"<string>\",\n \"start\": 0,\n \"size\": 123,\n \"sort\": [\n {\n \"value\": \"<string>\",\n \"query\": {\n \"type\": \"<string>\"\n }\n }\n ],\n \"fields\": [\n \"<string>\"\n ],\n \"highlight\": {\n \"fields\": [\n \"<string>\"\n ],\n \"pre\": \"<em>\",\n \"post\": \"</em>\",\n \"length\": 100,\n \"count\": 1,\n \"defaultHighlight\": false\n },\n \"returnScore\": true,\n \"includeRawResponse\": true,\n \"group\": {\n \"field\": \"<string>\",\n \"leaderStrategy\": {\n \"type\": \"<string>\"\n },\n \"sort\": [\n {\n \"value\": \"<string>\",\n \"query\": {\n \"type\": \"<string>\"\n }\n }\n ],\n \"size\": 123\n }\n },\n \"params\": {},\n \"context\": {},\n \"facets\": {\n \"fields\": [\n {\n \"field\": \"<string>\",\n \"prefix\": \"<string>\",\n \"limit\": 100,\n \"offset\": 0,\n \"minCount\": 123,\n \"missing\": true,\n \"ensuredValues\": [\n \"<string>\"\n ],\n \"domain\": {\n \"additionalFilters\": [\n {\n \"type\": \"<string>\"\n }\n ],\n \"excludedFiltersByName\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"ranges\": [\n {\n \"field\": \"<string>\",\n \"start\": \"<string>\",\n \"end\": \"<string>\",\n \"gap\": \"<string>\",\n \"hardEnd\": true,\n \"minCount\": 123,\n \"include\": [],\n \"other\": [],\n \"domain\": {\n \"additionalFilters\": [\n {\n \"type\": \"<string>\"\n }\n ],\n \"excludedFiltersByName\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"groupFacets\": true\n }\n}"
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{FUSION HOST}/api/query-pipelines/{id}"
payload := strings.NewReader("{\n \"queryDefinition\": {\n \"main\": {\n \"type\": \"<string>\"\n },\n \"boostsByValues\": [\n {\n \"field\": \"<string>\",\n \"boosts\": [\n {\n \"key\": \"<string>\",\n \"boost\": 100\n }\n ]\n }\n ],\n \"boostsByQuery\": [\n {\n \"query\": {\n \"type\": \"<string>\"\n },\n \"boost\": 123,\n \"type\": \"<string>\"\n }\n ],\n \"userQuery\": \"<string>\",\n \"filters\": [\n {\n \"type\": \"<string>\"\n }\n ],\n \"namedFilters\": [\n {\n \"name\": \"<string>\",\n \"query\": {\n \"type\": \"<string>\"\n }\n }\n ],\n \"groupedQuery\": {\n \"type\": \"<string>\"\n },\n \"groupedFilters\": [\n {\n \"type\": \"<string>\"\n }\n ]\n },\n \"results\": {\n \"cursor\": \"<string>\",\n \"start\": 0,\n \"size\": 123,\n \"sort\": [\n {\n \"value\": \"<string>\",\n \"query\": {\n \"type\": \"<string>\"\n }\n }\n ],\n \"fields\": [\n \"<string>\"\n ],\n \"highlight\": {\n \"fields\": [\n \"<string>\"\n ],\n \"pre\": \"<em>\",\n \"post\": \"</em>\",\n \"length\": 100,\n \"count\": 1,\n \"defaultHighlight\": false\n },\n \"returnScore\": true,\n \"includeRawResponse\": true,\n \"group\": {\n \"field\": \"<string>\",\n \"leaderStrategy\": {\n \"type\": \"<string>\"\n },\n \"sort\": [\n {\n \"value\": \"<string>\",\n \"query\": {\n \"type\": \"<string>\"\n }\n }\n ],\n \"size\": 123\n }\n },\n \"params\": {},\n \"context\": {},\n \"facets\": {\n \"fields\": [\n {\n \"field\": \"<string>\",\n \"prefix\": \"<string>\",\n \"limit\": 100,\n \"offset\": 0,\n \"minCount\": 123,\n \"missing\": true,\n \"ensuredValues\": [\n \"<string>\"\n ],\n \"domain\": {\n \"additionalFilters\": [\n {\n \"type\": \"<string>\"\n }\n ],\n \"excludedFiltersByName\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"ranges\": [\n {\n \"field\": \"<string>\",\n \"start\": \"<string>\",\n \"end\": \"<string>\",\n \"gap\": \"<string>\",\n \"hardEnd\": true,\n \"minCount\": 123,\n \"include\": [],\n \"other\": [],\n \"domain\": {\n \"additionalFilters\": [\n {\n \"type\": \"<string>\"\n }\n ],\n \"excludedFiltersByName\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"groupFacets\": true\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{FUSION HOST}/api/query-pipelines/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'queryDefinition' => [
'main' => [
'type' => '<string>'
],
'boostsByValues' => [
[
'field' => '<string>',
'boosts' => [
[
'key' => '<string>',
'boost' => 100
]
]
]
],
'boostsByQuery' => [
[
'query' => [
'type' => '<string>'
],
'boost' => 123,
'type' => '<string>'
]
],
'userQuery' => '<string>',
'filters' => [
[
'type' => '<string>'
]
],
'namedFilters' => [
[
'name' => '<string>',
'query' => [
'type' => '<string>'
]
]
],
'groupedQuery' => [
'type' => '<string>'
],
'groupedFilters' => [
[
'type' => '<string>'
]
]
],
'results' => [
'cursor' => '<string>',
'start' => 0,
'size' => 123,
'sort' => [
[
'value' => '<string>',
'query' => [
'type' => '<string>'
]
]
],
'fields' => [
'<string>'
],
'highlight' => [
'fields' => [
'<string>'
],
'pre' => '<em>',
'post' => '</em>',
'length' => 100,
'count' => 1,
'defaultHighlight' => false
],
'returnScore' => true,
'includeRawResponse' => true,
'group' => [
'field' => '<string>',
'leaderStrategy' => [
'type' => '<string>'
],
'sort' => [
[
'value' => '<string>',
'query' => [
'type' => '<string>'
]
]
],
'size' => 123
]
],
'params' => [
],
'context' => [
],
'facets' => [
'fields' => [
[
'field' => '<string>',
'prefix' => '<string>',
'limit' => 100,
'offset' => 0,
'minCount' => 123,
'missing' => true,
'ensuredValues' => [
'<string>'
],
'domain' => [
'additionalFilters' => [
[
'type' => '<string>'
]
],
'excludedFiltersByName' => [
'<string>'
]
]
]
],
'ranges' => [
[
'field' => '<string>',
'start' => '<string>',
'end' => '<string>',
'gap' => '<string>',
'hardEnd' => true,
'minCount' => 123,
'include' => [
],
'other' => [
],
'domain' => [
'additionalFilters' => [
[
'type' => '<string>'
]
],
'excludedFiltersByName' => [
'<string>'
]
]
]
],
'groupFacets' => true
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}curl --request POST \
--url https://{FUSION HOST}/api/query-pipelines/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"queryDefinition": {
"main": {
"type": "<string>"
},
"boostsByValues": [
{
"field": "<string>",
"boosts": [
{
"key": "<string>",
"boost": 100
}
]
}
],
"boostsByQuery": [
{
"query": {
"type": "<string>"
},
"boost": 123,
"type": "<string>"
}
],
"userQuery": "<string>",
"filters": [
{
"type": "<string>"
}
],
"namedFilters": [
{
"name": "<string>",
"query": {
"type": "<string>"
}
}
],
"groupedQuery": {
"type": "<string>"
},
"groupedFilters": [
{
"type": "<string>"
}
]
},
"results": {
"cursor": "<string>",
"start": 0,
"size": 123,
"sort": [
{
"value": "<string>",
"query": {
"type": "<string>"
}
}
],
"fields": [
"<string>"
],
"highlight": {
"fields": [
"<string>"
],
"pre": "<em>",
"post": "</em>",
"length": 100,
"count": 1,
"defaultHighlight": false
},
"returnScore": true,
"includeRawResponse": true,
"group": {
"field": "<string>",
"leaderStrategy": {
"type": "<string>"
},
"sort": [
{
"value": "<string>",
"query": {
"type": "<string>"
}
}
],
"size": 123
}
},
"params": {},
"context": {},
"facets": {
"fields": [
{
"field": "<string>",
"prefix": "<string>",
"limit": 100,
"offset": 0,
"minCount": 123,
"missing": true,
"ensuredValues": [
"<string>"
],
"domain": {
"additionalFilters": [
{
"type": "<string>"
}
],
"excludedFiltersByName": [
"<string>"
]
}
}
],
"ranges": [
{
"field": "<string>",
"start": "<string>",
"end": "<string>",
"gap": "<string>",
"hardEnd": true,
"minCount": 123,
"include": [],
"other": [],
"domain": {
"additionalFilters": [
{
"type": "<string>"
}
],
"excludedFiltersByName": [
"<string>"
]
}
}
],
"groupFacets": true
}
}
'{
"meta": {
"timing": {
"total": 123,
"mainQuery": 123,
"pipeline": [
{
"stage": "<string>",
"time": 123
}
]
},
"debug": {
"solrParams": {}
}
},
"facets": {
"fields": [
{
"field": "<string>",
"prefix": "<string>",
"limit": 100,
"offset": 0,
"minCount": 123,
"missing": true,
"ensuredValues": [
"<string>"
],
"domain": {
"additionalFilters": [
{
"type": "<string>"
}
],
"excludedFiltersByName": [
"<string>"
]
}
}
],
"ranges": [
{
"field": "<string>",
"start": "<string>",
"end": "<string>",
"gap": "<string>",
"hardEnd": true,
"minCount": 123,
"include": [],
"other": [],
"domain": {
"additionalFilters": [
{
"type": "<string>"
}
],
"excludedFiltersByName": [
"<string>"
]
}
}
],
"groupFacets": true
},
"results": {
"cursor": "<string>",
"start": 0,
"size": 123,
"sort": [
{
"value": "<string>",
"query": {
"type": "<string>"
}
}
],
"fields": [
"<string>"
],
"highlight": {
"fields": [
"<string>"
],
"pre": "<em>",
"post": "</em>",
"length": 100,
"count": 1,
"defaultHighlight": false
},
"returnScore": true,
"includeRawResponse": true,
"group": {
"field": "<string>",
"leaderStrategy": {
"type": "<string>"
},
"sort": [
{
"value": "<string>",
"query": {
"type": "<string>"
}
}
],
"size": 123
}
},
"spellcheck": {
"suggestions": {},
"correctlySpelled": true,
"collations": [
{
"collationQuery": "<string>",
"hits": 123,
"misspellingsAndCorrections": {}
}
]
},
"debugResponse": {},
"rules": {
"redirects": [
"<string>"
],
"responseValues": {},
"banners": [
{
"url": "<string>",
"zone": "<string>"
}
],
"jsonBlobs": {}
}
}Get query results (DSL mode)
Send a query to a query pipeline, using Fusion’s Domain Specific Language (DSL). The response contains matching documents, plus statistics about the query operation.
Use the /api/query-pipelines endpoint to get the query pipeline ID for this request.
import requests
url = "https://{FUSION HOST}/api/query-pipelines/{id}"
payload = {
"queryDefinition": {
"main": { "type": "<string>" },
"boostsByValues": [
{
"field": "<string>",
"boosts": [
{
"key": "<string>",
"boost": 100
}
]
}
],
"boostsByQuery": [
{
"query": { "type": "<string>" },
"boost": 123,
"type": "<string>"
}
],
"userQuery": "<string>",
"filters": [{ "type": "<string>" }],
"namedFilters": [
{
"name": "<string>",
"query": { "type": "<string>" }
}
],
"groupedQuery": { "type": "<string>" },
"groupedFilters": [{ "type": "<string>" }]
},
"results": {
"cursor": "<string>",
"start": 0,
"size": 123,
"sort": [
{
"value": "<string>",
"query": { "type": "<string>" }
}
],
"fields": ["<string>"],
"highlight": {
"fields": ["<string>"],
"pre": "<em>",
"post": "</em>",
"length": 100,
"count": 1,
"defaultHighlight": False
},
"returnScore": True,
"includeRawResponse": True,
"group": {
"field": "<string>",
"leaderStrategy": { "type": "<string>" },
"sort": [
{
"value": "<string>",
"query": { "type": "<string>" }
}
],
"size": 123
}
},
"params": {},
"context": {},
"facets": {
"fields": [
{
"field": "<string>",
"prefix": "<string>",
"limit": 100,
"offset": 0,
"minCount": 123,
"missing": True,
"ensuredValues": ["<string>"],
"domain": {
"additionalFilters": [{ "type": "<string>" }],
"excludedFiltersByName": ["<string>"]
}
}
],
"ranges": [
{
"field": "<string>",
"start": "<string>",
"end": "<string>",
"gap": "<string>",
"hardEnd": True,
"minCount": 123,
"include": [],
"other": [],
"domain": {
"additionalFilters": [{ "type": "<string>" }],
"excludedFiltersByName": ["<string>"]
}
}
],
"groupFacets": True
}
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)HttpResponse<String> response = Unirest.post("https://{FUSION HOST}/api/query-pipelines/{id}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"queryDefinition\": {\n \"main\": {\n \"type\": \"<string>\"\n },\n \"boostsByValues\": [\n {\n \"field\": \"<string>\",\n \"boosts\": [\n {\n \"key\": \"<string>\",\n \"boost\": 100\n }\n ]\n }\n ],\n \"boostsByQuery\": [\n {\n \"query\": {\n \"type\": \"<string>\"\n },\n \"boost\": 123,\n \"type\": \"<string>\"\n }\n ],\n \"userQuery\": \"<string>\",\n \"filters\": [\n {\n \"type\": \"<string>\"\n }\n ],\n \"namedFilters\": [\n {\n \"name\": \"<string>\",\n \"query\": {\n \"type\": \"<string>\"\n }\n }\n ],\n \"groupedQuery\": {\n \"type\": \"<string>\"\n },\n \"groupedFilters\": [\n {\n \"type\": \"<string>\"\n }\n ]\n },\n \"results\": {\n \"cursor\": \"<string>\",\n \"start\": 0,\n \"size\": 123,\n \"sort\": [\n {\n \"value\": \"<string>\",\n \"query\": {\n \"type\": \"<string>\"\n }\n }\n ],\n \"fields\": [\n \"<string>\"\n ],\n \"highlight\": {\n \"fields\": [\n \"<string>\"\n ],\n \"pre\": \"<em>\",\n \"post\": \"</em>\",\n \"length\": 100,\n \"count\": 1,\n \"defaultHighlight\": false\n },\n \"returnScore\": true,\n \"includeRawResponse\": true,\n \"group\": {\n \"field\": \"<string>\",\n \"leaderStrategy\": {\n \"type\": \"<string>\"\n },\n \"sort\": [\n {\n \"value\": \"<string>\",\n \"query\": {\n \"type\": \"<string>\"\n }\n }\n ],\n \"size\": 123\n }\n },\n \"params\": {},\n \"context\": {},\n \"facets\": {\n \"fields\": [\n {\n \"field\": \"<string>\",\n \"prefix\": \"<string>\",\n \"limit\": 100,\n \"offset\": 0,\n \"minCount\": 123,\n \"missing\": true,\n \"ensuredValues\": [\n \"<string>\"\n ],\n \"domain\": {\n \"additionalFilters\": [\n {\n \"type\": \"<string>\"\n }\n ],\n \"excludedFiltersByName\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"ranges\": [\n {\n \"field\": \"<string>\",\n \"start\": \"<string>\",\n \"end\": \"<string>\",\n \"gap\": \"<string>\",\n \"hardEnd\": true,\n \"minCount\": 123,\n \"include\": [],\n \"other\": [],\n \"domain\": {\n \"additionalFilters\": [\n {\n \"type\": \"<string>\"\n }\n ],\n \"excludedFiltersByName\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"groupFacets\": true\n }\n}")
.asString();const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
queryDefinition: {
main: {type: '<string>'},
boostsByValues: [{field: '<string>', boosts: [{key: '<string>', boost: 100}]}],
boostsByQuery: [{query: {type: '<string>'}, boost: 123, type: '<string>'}],
userQuery: '<string>',
filters: [{type: '<string>'}],
namedFilters: [{name: '<string>', query: {type: '<string>'}}],
groupedQuery: {type: '<string>'},
groupedFilters: [{type: '<string>'}]
},
results: {
cursor: '<string>',
start: 0,
size: 123,
sort: [{value: '<string>', query: {type: '<string>'}}],
fields: ['<string>'],
highlight: {
fields: ['<string>'],
pre: '<em>',
post: '</em>',
length: 100,
count: 1,
defaultHighlight: false
},
returnScore: true,
includeRawResponse: true,
group: {
field: '<string>',
leaderStrategy: {type: '<string>'},
sort: [{value: '<string>', query: {type: '<string>'}}],
size: 123
}
},
params: {},
context: {},
facets: {
fields: [
{
field: '<string>',
prefix: '<string>',
limit: 100,
offset: 0,
minCount: 123,
missing: true,
ensuredValues: ['<string>'],
domain: {additionalFilters: [{type: '<string>'}], excludedFiltersByName: ['<string>']}
}
],
ranges: [
{
field: '<string>',
start: '<string>',
end: '<string>',
gap: '<string>',
hardEnd: true,
minCount: 123,
include: [],
other: [],
domain: {additionalFilters: [{type: '<string>'}], excludedFiltersByName: ['<string>']}
}
],
groupFacets: true
}
})
};
fetch('https://{FUSION HOST}/api/query-pipelines/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://{FUSION HOST}/api/query-pipelines/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"queryDefinition\": {\n \"main\": {\n \"type\": \"<string>\"\n },\n \"boostsByValues\": [\n {\n \"field\": \"<string>\",\n \"boosts\": [\n {\n \"key\": \"<string>\",\n \"boost\": 100\n }\n ]\n }\n ],\n \"boostsByQuery\": [\n {\n \"query\": {\n \"type\": \"<string>\"\n },\n \"boost\": 123,\n \"type\": \"<string>\"\n }\n ],\n \"userQuery\": \"<string>\",\n \"filters\": [\n {\n \"type\": \"<string>\"\n }\n ],\n \"namedFilters\": [\n {\n \"name\": \"<string>\",\n \"query\": {\n \"type\": \"<string>\"\n }\n }\n ],\n \"groupedQuery\": {\n \"type\": \"<string>\"\n },\n \"groupedFilters\": [\n {\n \"type\": \"<string>\"\n }\n ]\n },\n \"results\": {\n \"cursor\": \"<string>\",\n \"start\": 0,\n \"size\": 123,\n \"sort\": [\n {\n \"value\": \"<string>\",\n \"query\": {\n \"type\": \"<string>\"\n }\n }\n ],\n \"fields\": [\n \"<string>\"\n ],\n \"highlight\": {\n \"fields\": [\n \"<string>\"\n ],\n \"pre\": \"<em>\",\n \"post\": \"</em>\",\n \"length\": 100,\n \"count\": 1,\n \"defaultHighlight\": false\n },\n \"returnScore\": true,\n \"includeRawResponse\": true,\n \"group\": {\n \"field\": \"<string>\",\n \"leaderStrategy\": {\n \"type\": \"<string>\"\n },\n \"sort\": [\n {\n \"value\": \"<string>\",\n \"query\": {\n \"type\": \"<string>\"\n }\n }\n ],\n \"size\": 123\n }\n },\n \"params\": {},\n \"context\": {},\n \"facets\": {\n \"fields\": [\n {\n \"field\": \"<string>\",\n \"prefix\": \"<string>\",\n \"limit\": 100,\n \"offset\": 0,\n \"minCount\": 123,\n \"missing\": true,\n \"ensuredValues\": [\n \"<string>\"\n ],\n \"domain\": {\n \"additionalFilters\": [\n {\n \"type\": \"<string>\"\n }\n ],\n \"excludedFiltersByName\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"ranges\": [\n {\n \"field\": \"<string>\",\n \"start\": \"<string>\",\n \"end\": \"<string>\",\n \"gap\": \"<string>\",\n \"hardEnd\": true,\n \"minCount\": 123,\n \"include\": [],\n \"other\": [],\n \"domain\": {\n \"additionalFilters\": [\n {\n \"type\": \"<string>\"\n }\n ],\n \"excludedFiltersByName\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"groupFacets\": true\n }\n}"
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{FUSION HOST}/api/query-pipelines/{id}"
payload := strings.NewReader("{\n \"queryDefinition\": {\n \"main\": {\n \"type\": \"<string>\"\n },\n \"boostsByValues\": [\n {\n \"field\": \"<string>\",\n \"boosts\": [\n {\n \"key\": \"<string>\",\n \"boost\": 100\n }\n ]\n }\n ],\n \"boostsByQuery\": [\n {\n \"query\": {\n \"type\": \"<string>\"\n },\n \"boost\": 123,\n \"type\": \"<string>\"\n }\n ],\n \"userQuery\": \"<string>\",\n \"filters\": [\n {\n \"type\": \"<string>\"\n }\n ],\n \"namedFilters\": [\n {\n \"name\": \"<string>\",\n \"query\": {\n \"type\": \"<string>\"\n }\n }\n ],\n \"groupedQuery\": {\n \"type\": \"<string>\"\n },\n \"groupedFilters\": [\n {\n \"type\": \"<string>\"\n }\n ]\n },\n \"results\": {\n \"cursor\": \"<string>\",\n \"start\": 0,\n \"size\": 123,\n \"sort\": [\n {\n \"value\": \"<string>\",\n \"query\": {\n \"type\": \"<string>\"\n }\n }\n ],\n \"fields\": [\n \"<string>\"\n ],\n \"highlight\": {\n \"fields\": [\n \"<string>\"\n ],\n \"pre\": \"<em>\",\n \"post\": \"</em>\",\n \"length\": 100,\n \"count\": 1,\n \"defaultHighlight\": false\n },\n \"returnScore\": true,\n \"includeRawResponse\": true,\n \"group\": {\n \"field\": \"<string>\",\n \"leaderStrategy\": {\n \"type\": \"<string>\"\n },\n \"sort\": [\n {\n \"value\": \"<string>\",\n \"query\": {\n \"type\": \"<string>\"\n }\n }\n ],\n \"size\": 123\n }\n },\n \"params\": {},\n \"context\": {},\n \"facets\": {\n \"fields\": [\n {\n \"field\": \"<string>\",\n \"prefix\": \"<string>\",\n \"limit\": 100,\n \"offset\": 0,\n \"minCount\": 123,\n \"missing\": true,\n \"ensuredValues\": [\n \"<string>\"\n ],\n \"domain\": {\n \"additionalFilters\": [\n {\n \"type\": \"<string>\"\n }\n ],\n \"excludedFiltersByName\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"ranges\": [\n {\n \"field\": \"<string>\",\n \"start\": \"<string>\",\n \"end\": \"<string>\",\n \"gap\": \"<string>\",\n \"hardEnd\": true,\n \"minCount\": 123,\n \"include\": [],\n \"other\": [],\n \"domain\": {\n \"additionalFilters\": [\n {\n \"type\": \"<string>\"\n }\n ],\n \"excludedFiltersByName\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"groupFacets\": true\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{FUSION HOST}/api/query-pipelines/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'queryDefinition' => [
'main' => [
'type' => '<string>'
],
'boostsByValues' => [
[
'field' => '<string>',
'boosts' => [
[
'key' => '<string>',
'boost' => 100
]
]
]
],
'boostsByQuery' => [
[
'query' => [
'type' => '<string>'
],
'boost' => 123,
'type' => '<string>'
]
],
'userQuery' => '<string>',
'filters' => [
[
'type' => '<string>'
]
],
'namedFilters' => [
[
'name' => '<string>',
'query' => [
'type' => '<string>'
]
]
],
'groupedQuery' => [
'type' => '<string>'
],
'groupedFilters' => [
[
'type' => '<string>'
]
]
],
'results' => [
'cursor' => '<string>',
'start' => 0,
'size' => 123,
'sort' => [
[
'value' => '<string>',
'query' => [
'type' => '<string>'
]
]
],
'fields' => [
'<string>'
],
'highlight' => [
'fields' => [
'<string>'
],
'pre' => '<em>',
'post' => '</em>',
'length' => 100,
'count' => 1,
'defaultHighlight' => false
],
'returnScore' => true,
'includeRawResponse' => true,
'group' => [
'field' => '<string>',
'leaderStrategy' => [
'type' => '<string>'
],
'sort' => [
[
'value' => '<string>',
'query' => [
'type' => '<string>'
]
]
],
'size' => 123
]
],
'params' => [
],
'context' => [
],
'facets' => [
'fields' => [
[
'field' => '<string>',
'prefix' => '<string>',
'limit' => 100,
'offset' => 0,
'minCount' => 123,
'missing' => true,
'ensuredValues' => [
'<string>'
],
'domain' => [
'additionalFilters' => [
[
'type' => '<string>'
]
],
'excludedFiltersByName' => [
'<string>'
]
]
]
],
'ranges' => [
[
'field' => '<string>',
'start' => '<string>',
'end' => '<string>',
'gap' => '<string>',
'hardEnd' => true,
'minCount' => 123,
'include' => [
],
'other' => [
],
'domain' => [
'additionalFilters' => [
[
'type' => '<string>'
]
],
'excludedFiltersByName' => [
'<string>'
]
]
]
],
'groupFacets' => true
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}curl --request POST \
--url https://{FUSION HOST}/api/query-pipelines/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"queryDefinition": {
"main": {
"type": "<string>"
},
"boostsByValues": [
{
"field": "<string>",
"boosts": [
{
"key": "<string>",
"boost": 100
}
]
}
],
"boostsByQuery": [
{
"query": {
"type": "<string>"
},
"boost": 123,
"type": "<string>"
}
],
"userQuery": "<string>",
"filters": [
{
"type": "<string>"
}
],
"namedFilters": [
{
"name": "<string>",
"query": {
"type": "<string>"
}
}
],
"groupedQuery": {
"type": "<string>"
},
"groupedFilters": [
{
"type": "<string>"
}
]
},
"results": {
"cursor": "<string>",
"start": 0,
"size": 123,
"sort": [
{
"value": "<string>",
"query": {
"type": "<string>"
}
}
],
"fields": [
"<string>"
],
"highlight": {
"fields": [
"<string>"
],
"pre": "<em>",
"post": "</em>",
"length": 100,
"count": 1,
"defaultHighlight": false
},
"returnScore": true,
"includeRawResponse": true,
"group": {
"field": "<string>",
"leaderStrategy": {
"type": "<string>"
},
"sort": [
{
"value": "<string>",
"query": {
"type": "<string>"
}
}
],
"size": 123
}
},
"params": {},
"context": {},
"facets": {
"fields": [
{
"field": "<string>",
"prefix": "<string>",
"limit": 100,
"offset": 0,
"minCount": 123,
"missing": true,
"ensuredValues": [
"<string>"
],
"domain": {
"additionalFilters": [
{
"type": "<string>"
}
],
"excludedFiltersByName": [
"<string>"
]
}
}
],
"ranges": [
{
"field": "<string>",
"start": "<string>",
"end": "<string>",
"gap": "<string>",
"hardEnd": true,
"minCount": 123,
"include": [],
"other": [],
"domain": {
"additionalFilters": [
{
"type": "<string>"
}
],
"excludedFiltersByName": [
"<string>"
]
}
}
],
"groupFacets": true
}
}
'{
"meta": {
"timing": {
"total": 123,
"mainQuery": 123,
"pipeline": [
{
"stage": "<string>",
"time": 123
}
]
},
"debug": {
"solrParams": {}
}
},
"facets": {
"fields": [
{
"field": "<string>",
"prefix": "<string>",
"limit": 100,
"offset": 0,
"minCount": 123,
"missing": true,
"ensuredValues": [
"<string>"
],
"domain": {
"additionalFilters": [
{
"type": "<string>"
}
],
"excludedFiltersByName": [
"<string>"
]
}
}
],
"ranges": [
{
"field": "<string>",
"start": "<string>",
"end": "<string>",
"gap": "<string>",
"hardEnd": true,
"minCount": 123,
"include": [],
"other": [],
"domain": {
"additionalFilters": [
{
"type": "<string>"
}
],
"excludedFiltersByName": [
"<string>"
]
}
}
],
"groupFacets": true
},
"results": {
"cursor": "<string>",
"start": 0,
"size": 123,
"sort": [
{
"value": "<string>",
"query": {
"type": "<string>"
}
}
],
"fields": [
"<string>"
],
"highlight": {
"fields": [
"<string>"
],
"pre": "<em>",
"post": "</em>",
"length": 100,
"count": 1,
"defaultHighlight": false
},
"returnScore": true,
"includeRawResponse": true,
"group": {
"field": "<string>",
"leaderStrategy": {
"type": "<string>"
},
"sort": [
{
"value": "<string>",
"query": {
"type": "<string>"
}
}
],
"size": 123
}
},
"spellcheck": {
"suggestions": {},
"correctlySpelled": true,
"collations": [
{
"collationQuery": "<string>",
"hits": 123,
"misspellingsAndCorrections": {}
}
]
},
"debugResponse": {},
"rules": {
"redirects": [
"<string>"
],
"responseValues": {},
"banners": [
{
"url": "<string>",
"zone": "<string>"
}
],
"jsonBlobs": {}
}
}Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Path Parameters
The query pipeline ID.
Body
Defines the logic of what to query for.
Show child attributes
Show child attributes
How the results should be displayed and organized.
Show child attributes
Show child attributes
Arbitrary query parameters to be added to the underlying Solr query, also used to supply Security Trimming Stage parameters.
Show child attributes
Show child attributes
Parameters used by various query stages as well as DSL hints.
Show child attributes
Show child attributes
The returned facets and facet values.
Show child attributes
Show child attributes
Response
OK
Assorted metadata about the query, such as timing and debug information
Show child attributes
Show child attributes
The returned facets and facet values.
Show child attributes
Show child attributes
How the results should be displayed and organized.
Show child attributes
Show child attributes
Spellcheck results.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Data returned by any rules that triggered.
Show child attributes
Show child attributes
Was this page helpful?