Hybrid Search API

Hybrid Search API is a standard search API with support for hybrid search and Auto Relevance should be enabled for this. Auto Relevance can be enabled from Settings tab of each collection.

URL

https://localhost:8443/rest/v2/api/hybrid-search

Method

GET

params

Below given are the basic parameters to use in Hybrid Search API. There are a wide variety of parameters that are supported, please refer Search Parameters

paramdescription
querysearch query
cnamename of the Collection
colcollection id
searchtypecan be keyword/vector/hybrid
v.weightvector weight in double value
v.thresholdvector threshold in double value

Header

HeaderDescription
X-Correlation-IDA unique identifier that can be sent through the search API request.
The X-Correlation-IDs will be logged in ../webapps/ROOT/logs/query.log and can also be viewed in exported query logs file from SearchBlox Analytics.

Response

The JSON response from SearchBlox by default

Example For Hybrid Search API

URL with Parameters : https://localhost:8443/rest/v2/api/hybrid-search?public=true&query=tools&searchtype=hybrid&v.threshold=0.7&v.weight=0.2

METHOD : GET

Response :

{
  "query": "tools",
  "sort": "relevance",
  "end": 9,
  "time": 197,
  "result": [
    {
      "col": "2",
      "creationdate": "2024-12-03T10:21:02.665Z",
      "theme-color": "#000000",
      "og:site_name": "X (formerly Twitter)",
      "keywords": "",
      "apple-mobile-web-app-title": "Twitter",
      "description": "Explore how advanced collaboration tools enhance productivity and communication in modern work environments.",
      "original_description": "",
      "click_count": 1,
      "language": "en",
      "sb_boost": 1,
      "title": "Smart Collaboration Tools for Teams",
      "content": "",
      "document_allow": [
        "unsecured"
      ],
      "twitter-site-verification": "AUVDWo1JpbjI22xjTe5JOvTAWuW9bK41CpxYxCeCjH97mEVp7rtiHcvdOaUksJrG",
      "uid": "870aa03d76988739d74eaa8c13cd844e",
      "score": 1.6252954,
      "colname": "webcol",
      "alpha": "",
      "sortdate": "2024-12-03T10:21:02.000Z",
      "context": "",
      "page_dna": "Collaboration Software Workplace Productivity Virtual Meetings Team Communication Project Management Tools Remote Work Solutions Data Analytics for Teams Enterprise Software Integration User Experience Design Security in Cloud Services Smart Collaboration Tools for Teams Explore how advanced collaboration tools enhance productivity and communication in modern work environments",
      "id": "870aa03d76988739d74eaa8c13cd844e",
      "google-site-verification": "600dQ0pZYsH2xOFt4hYmf5f5NpjCbWE_qk5Y04dErYM",
      "original_title": "x.com",
      "indexdate": "2024-12-03T10:21:02.665Z",
      "urllen": 17,
      "topics": "Collaboration Software,Workplace Productivity,Virtual Meetings,Team Communication,Project Management Tools,Remote Work Solutions,Data Analytics for Teams,Enterprise Software Integration,User Experience Design,Security in Cloud Services",
      "isStructured": false,
      "url": "https://x.com/CNN",
      "contenttype": "HTML",
      "facebook-domain-verification": "x6sdcc8b5ju3bh8nbm59eswogvg6t1",
      "fb:app_id": "2231777543",
      "filename": "",
      "apple-mobile-web-app-status-bar-style": "white",
      "size": "2610",
      "viewport": "width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0,viewport-fit=cover",
      "old_uid": "https://x.com/cnn",
      "lastmodified": "2024-12-03T10:21:02.000Z",
      "mobile-web-app-capable": "yes",
      "crawldate": "2024-12-03T10:06:52.094Z",
      "md5": "d41d8cd98f00b204e9800998ecf8427e"
    },
    {...}
  ],
  "facets": [],
  "pageSize": 10,
  "highlight": true,
  "maxScore": 1.6252954,
  "ads": [],
  "sortDir2": "",
  "pageMark": 0,
  "suggest": "",
  "sortDir": "",
  "sortDir3": "",
  "lastPage": 1,
  "sortDir1": "",
  "currentPage": 1,
  "pmIdx": "",
  "smartFaq": [],
  "hits": 9,
  "start": 1,
  "pcode": "1733297378289ugz5"
}