Yes, one can fetch related queries to a search term using the below API request
Index URL
Method
POST
Media Type
application/json
Headers
content-type : application/json
accept: application/json
accept: application/json
SB-PKEY: MJxdHTfBplp06eEfUbhxoHseH8j7QoU7zUfpC6vVRtoz/QdPP0LrB7Xz7Vu+w+G2CHhmqg==
Document Syntax
{
"apikey":"ADB9E38C363A5AB7B17E34956D21543B",
"field":"content",
"col":"1,2,3",
"type":"phrase",
"operator":"or",
"limit":20,
"terms":5,
"query":"test"
}
Document Description
JSON Fields | Value |
---|---|
apikey | API key accessible in the SearchBlox Admin Console. It is also present in the config.xml file. |
field | the field is the field from which the related search terms are to be fetched, e.g., content, keywords, title, description or custom meta field |
col | collection id |
type | whether it is a phrase or fuzzy search for related terms the phrase refers to an exact match fuzzy refers to fuzzy match (approximate matches) |
operator | AND or OR operator between the terms if multiple words are available in the search term |
limit | number of related queries returned |
terms | number of associated terms returned for each query |
query | Search query |
To learn more on related queries and search API read: Related Queries and Search Related API
Comments
0 comments
Please sign in to leave a comment.