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 AttributeDescription
apikeyThe API key is accessible in the SearchBlox Admin Console. It is also present in the config.xml file.
colnameName of the collection.
queryTagSearch query which user types to get the specific document(s) in the search page.
urlDocument URL which the user gets on the search page for a specific search term.
rankRank is the position of the document where it shows up on the search page.

Response Codes

Response CodeMessage
601Invalid API Key
501Collection not found
7002URL not found
7003Document not found
8001Document rank update failed
8002Query can not be empty
8003Ranking 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 AttributeDescription
apikeyAPI key accessible in the SearchBlox Admin Console. It is also present in the config.xml file.
colnameName of the Collection.
queryTagSearch query which user types to get the specific document(s) in the search page.
urlDocument URL which the user gets on the search page for a specific search term.

Response Codes

JSON

Response CodeMessage
601Invalid API Key
501Collection 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 AttributeDescription
apikeyAPI key accessible in the SearchBlox Admin Console. It is also present in the config.xml file.
colnameSearch query which user types to get the specific document(s) in the search page.
queryTagSearch query which user types to get the specific document(s) in the search page.
urlDocument URL, which the user gets on the search page for a specific search term.

Response Codes

Response CodeMessage
600Invalid API Key
501Collection not found
8002Query can not be empty