curl --request POST \
--url https://api.example.com/v1/knowledge/search \
--header 'Content-Type: application/json' \
--data '
{
"query": "Qual a politica de SLA para clientes Enterprise?",
"top_k": 5,
"filters": {
"source": "<string>",
"tags": [
"<string>"
]
},
"search_mode": "hybrid"
}
'import requests
url = "https://api.example.com/v1/knowledge/search"
payload = {
"query": "Qual a politica de SLA para clientes Enterprise?",
"top_k": 5,
"filters": {
"source": "<string>",
"tags": ["<string>"]
},
"search_mode": "hybrid"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
query: 'Qual a politica de SLA para clientes Enterprise?',
top_k: 5,
filters: {source: '<string>', tags: ['<string>']},
search_mode: 'hybrid'
})
};
fetch('https://api.example.com/v1/knowledge/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/knowledge/search",
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([
'query' => 'Qual a politica de SLA para clientes Enterprise?',
'top_k' => 5,
'filters' => [
'source' => '<string>',
'tags' => [
'<string>'
]
],
'search_mode' => 'hybrid'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/knowledge/search"
payload := strings.NewReader("{\n \"query\": \"Qual a politica de SLA para clientes Enterprise?\",\n \"top_k\": 5,\n \"filters\": {\n \"source\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ]\n },\n \"search_mode\": \"hybrid\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/knowledge/search")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"Qual a politica de SLA para clientes Enterprise?\",\n \"top_k\": 5,\n \"filters\": {\n \"source\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ]\n },\n \"search_mode\": \"hybrid\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/knowledge/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"Qual a politica de SLA para clientes Enterprise?\",\n \"top_k\": 5,\n \"filters\": {\n \"source\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ]\n },\n \"search_mode\": \"hybrid\"\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"chunk_id": "<string>",
"content": "<string>",
"score": 123,
"document": {
"doc_id": "<string>",
"title": "<string>",
"source": "<string>"
},
"metadata": {
"position": 123,
"indexed_at": "<string>"
}
}
],
"query_embedding_model": "<string>",
"total_results": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Semantic search over indexed knowledge documents
Embed the query using the configured LLM embedding model and perform semantic search against the Qdrant collection.
Returns chunks ranked by cosine similarity score (highest first).
Optional filters narrow results by source or document tags.
curl --request POST \
--url https://api.example.com/v1/knowledge/search \
--header 'Content-Type: application/json' \
--data '
{
"query": "Qual a politica de SLA para clientes Enterprise?",
"top_k": 5,
"filters": {
"source": "<string>",
"tags": [
"<string>"
]
},
"search_mode": "hybrid"
}
'import requests
url = "https://api.example.com/v1/knowledge/search"
payload = {
"query": "Qual a politica de SLA para clientes Enterprise?",
"top_k": 5,
"filters": {
"source": "<string>",
"tags": ["<string>"]
},
"search_mode": "hybrid"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
query: 'Qual a politica de SLA para clientes Enterprise?',
top_k: 5,
filters: {source: '<string>', tags: ['<string>']},
search_mode: 'hybrid'
})
};
fetch('https://api.example.com/v1/knowledge/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/knowledge/search",
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([
'query' => 'Qual a politica de SLA para clientes Enterprise?',
'top_k' => 5,
'filters' => [
'source' => '<string>',
'tags' => [
'<string>'
]
],
'search_mode' => 'hybrid'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/knowledge/search"
payload := strings.NewReader("{\n \"query\": \"Qual a politica de SLA para clientes Enterprise?\",\n \"top_k\": 5,\n \"filters\": {\n \"source\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ]\n },\n \"search_mode\": \"hybrid\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/knowledge/search")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"Qual a politica de SLA para clientes Enterprise?\",\n \"top_k\": 5,\n \"filters\": {\n \"source\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ]\n },\n \"search_mode\": \"hybrid\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/knowledge/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"Qual a politica de SLA para clientes Enterprise?\",\n \"top_k\": 5,\n \"filters\": {\n \"source\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ]\n },\n \"search_mode\": \"hybrid\"\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"chunk_id": "<string>",
"content": "<string>",
"score": 123,
"document": {
"doc_id": "<string>",
"title": "<string>",
"source": "<string>"
},
"metadata": {
"position": 123,
"indexed_at": "<string>"
}
}
],
"query_embedding_model": "<string>",
"total_results": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Body
Request body for POST /v1/knowledge/search.
Free-text question or query to embed and search semantically.
1"Qual a politica de SLA para clientes Enterprise?"
Maximum number of chunks to return.
1 <= x <= 50Optional filters applied to the Qdrant search.
Show child attributes
Show child attributes
Search mode: 'hybrid' uses RRF fusion (dense + sparse BM25) for improved recall — requires collection with named vectors (text-dense + text-sparse). 'dense' uses only the embedding vector (cosine similarity). Falls back to 'dense' automatically for collections with old schema.
hybrid, dense