Manual Rank API
- Manual Rank (or mRank) API is a SearchBlox on-demand feature. This feature can be used to rank specific documents on top of the search results page, irrespective of the relevancy mechanism supported by SearchBlox.
- Adding rank requires additional sorting tweaks to be done for sort search parameters.
Please contact [email protected] to know more.
Ranking Documents using Queries
mrank/tag
REST-JSON API
https://localhost:8443/rest/v2/api/mrank/tag
Method
POST
Media Type
REST-JSON API
application/json
Headers
SB-PKEY
LmfxTTDSeYxHTntJMHuhwRrGVICMaVN/wl/zPuQ3LtQDNRMnng5GpKIkgt0q1rCC/h6wDA==
Document Syntax
REST-JSON API
{
"apikey": "0C407E013424736A16149636A45030DD",
"colname": "HTTPCollection",
"queryTag": "search ai",
"url": "https://www.searchblox.com/products",
"rank": 3
}
Document Description
JSON Attribute | Description |
---|---|
apikey | The API key is accessible in the SearchBlox Admin Console. It is also present in the config.xml file. |
colname | Name of the collection. |
queryTag | Search query which user types to get the specific document(s) in the search page. |
url | Document URL which the user gets on the search page for a specific search term. |
rank | Rank is the position of the document where it shows up on the search page. |
Response Codes
Response Code | Message |
---|---|
601 | Invalid API Key |
501 | Collection not found |
7002 | URL not found |
7003 | Document not found |
8001 | Document rank update failed |
8002 | Query can not be empty |
8003 | Ranking should be greater than 0 |
Ranking Status using Queries/Document URL
mrank/doc
REST-JSON API
https://localhost:8443/rest/v2/api/mrank/doc
Method
POST
Media Type
REST-JSON API
application/json
Headers
SB-PKEY
LmfxTTDSeYxHTntJMHuhwRrGVICMaVN/wl/zPuQ3LtQDNRMnng5GpKIkgt0q1rCC/h6wDA==
mRank Status using Queries/Document URL
REST-JSON API
{
"apikey": "0C407E013424736A16149636A45030DD",
"colname": "HTTPCollection",
"queryTag": "search ai",
"url": "https://www.searchblox.com/products/"
}
mRank Status using Queries
REST-JSON API
{
"apikey": "0C407E013424736A16149636A45030DD",
"colname": "HTTPCollection",
"queryTag": "search ai",
}
mRank Status using Document URL
REST-JSON API
{
"apikey": "0C407E013424736A16149636A45030DD",
"colname": "HTTPCollection",
"url": "https://www.searchblox.com/products/"
}
Document Description
JSON Attribute | Description |
---|---|
apikey | API key accessible in the SearchBlox Admin Console. It is also present in the config.xml file. |
colname | Name of the Collection. |
queryTag | Search query which user types to get the specific document(s) in the search page. |
url | Document URL which the user gets on the search page for a specific search term. |
Response Codes
JSON
Response Code | Message |
---|---|
601 | Invalid API Key |
501 | Collection not found |
Clear Search Ranking
Clearing mRank will remove the queries associated with documents along with its search rank defined.
tag/clear
REST-JSON API
https://localhost:8443/rest/v2/api/tag/clear
Method
POST
Media Type
REST-JSON API
application/json
Headers
SB-PKEY
LmfxTTDSeYxHTntJMHuhwRrGVICMaVN/wl/zPuQ3LtQDNRMnng5GpKIkgt0q1rCC/h6wDA==
Clear mRank using Specific Document
REST-JSON API
{
"apikey": "0C407E013424736A16149636A45030DD",
"colname": "HTTPCollection",
"queryTag": "search ai",
"url": "https://www.searchblox.com/producs"
}
Clear mRank using Multiple Documents
REST-JSON API
{
"apikey": "0C407E013424736A16149636A45030DD",
"colname": "HTTPCollection",
"queryTag": "search ai",
"url":[
"https://www.searchblox.com",
"https://www.searchblox.com/products"
]
}
Clear mRank on all Documents
REST-JSON API
{
"apikey": "0C407E013424736A16149636A45030DD",
"colname": "HTTPCollection",
"queryTag": "search ai"
}
Clear mRank using Specific Document
REST-JSON API
{
"apikey": "0C407E013424736A16149636A45030DD",
"colname": "HTTPCollection",
"queryTag": "*",
"url":"https://www.searchblox.com"
}
Clear mRank using Multiple Documents
REST-JSON API
{
"apikey": "0C407E013424736A16149636A45030DD",
"colname": "HTTPCollection",
"queryTag": "search ai",
"url":[
"https://www.searchblox.com",
"https://www.searchblox.com/products"
]
}
Clear mRank for all Documents
REST-JSON API
{
"apikey": "0C407E013424736A16149636A45030DD",
"colname": "HTTPCollection",
"queryTag": "*"
}
Document Description
JSON Attribute | Description |
---|---|
apikey | API key accessible in the SearchBlox Admin Console. It is also present in the config.xml file. |
colname | Search query which user types to get the specific document(s) in the search page. |
queryTag | Search query which user types to get the specific document(s) in the search page. |
url | Document URL, which the user gets on the search page for a specific search term. |
Response Codes
Response Code | Message |
---|---|
600 | Invalid API Key |
501 | Collection not found |
8002 | Query can not be empty |
Updated about 3 years ago