Featured Results in Search
Viewing Featured Results in Search Results
When any of the featured results keywords are entered as a search term, the featured result appears in the results based on priority.
Featured results in Faceted Search
In the faceted search, the featured results would get displayed on top of the actual search results.
Featured Results in JSON results in New Search API
The featured results are presented in the JSON output in a separate section as shown here.
Sample output for Featured Results in New Search API: http://localhost:8080/searchblox/rest/v2/api/search?query=test
"ads" : [ {
"id" : 1,
"description" : "test",
"title" : "test",
"url" : "https://edition.cnn.com",
"imageURL" : null
}, {
"id" : 2,
"description" : "This is the description",
"title" : "This is a test featured result",
"url" : "https://www.searchblox.com",
"imageURL" : null
} ],
Featured Results in XML or JSON results in Search Servlet
The featured results are presented in the XML/JSON output in a separate section as shown here.
Sample XML output for Featured Results:
http://localhost:8080/searchblox/servlet/SearchServlet?query=test&xsl=xml
<ads>
<ad no="1" collection="ads" lastmodified="1970-01-01T00:00:00.000Z" title="Graphic Featured Result" keywords="test" content="test" description="This is description" url="https://www.cnn.com" alpha="Graphic Featured Result" col="9999" colname="ads" graphic_url="https://www.searchblox.com/uploads/1/2/3/5/123532231/published/searchbloxnewlogo-final_1.png?1554771188" uid="1591791148905"/>
<ad no="2" collection="ads" lastmodified="1970-01-01T00:00:00.000Z" title="Text Featured Results" keywords="test" content="test" description="This is description" url="https://edition.cnn.com" alpha="Text Featured Results" col="9999" colname="ads" graphic_url="" uid="1591873734725"/>
</ads>
Sample JSON output for Featured Results:
http://localhost:8080/searchblox/servlet/SearchServlet?query=test&xsl=json
"ads": [
{
"@no": "1",
"@collection": "ads",
"@lastmodified": "1970-01-01T00:00:00.000Z",
"@title": "Graphic Featured Result",
"@keywords": "test",
"@content": "test",
"@description": "This is description",
"@url": "https://www.cnn.com",
"@alpha": "Graphic Featured Result",
"@col": "9999",
"@colname": "ads",
"@graphic_url": "https://www.searchblox.com/uploads/1/2/3/5/123532231/published/searchbloxnewlogo-final_1.png?1554771188",
"@uid": "1591791148905"
},
{
"@no": "2",
"@collection": "ads",
"@lastmodified": "1970-01-01T00:00:00.000Z",
"@title": "Text Featured Results",
"@keywords": "test",
"@content": "test",
"@description": "This is description",
"@url": "https://edition.cnn.com",
"@alpha": "Text Featured Results",
"@col": "9999",
"@colname": "ads",
"@graphic_url": "",
"@uid": "1591873734725"
}
],
You can display the Featured Results at the top of the page. You could also use any field, like Graphic URL for display.
Updated over 3 years ago