--- title: Search Page Ranking type: templates category: Ranking and Scoring cat: ranking-and-scoring order: 405 meta_title: Rank different kinds of results by given search query meta_description: --- Based on your search input query, you can select the most relevant search results provided by search engine.
Search Page Ranking example ## Labeling Configuration There are a lot of styles to make it look like search engine page. Search query is loaded as `$text` for `Text` objects. Specially formatted search results in html format are loaded as dynamic `Choices` via `value="$options"` parameter. Task data should contain field `options` with a list of objects, each one contains parameters for generated `Choice`. Options also can be nested via `children` parameter to visually group results from the same domain. This also requires `allownested="true"` in `Choices` tag. Important thing here is that result will be different — instead of usual array of selected choices values you'll get array of arrays, every item is a list of values from topmost parent choice down to selected one. For example in provided example you'll se in result: `"choices": [ [ "result1", "result11" ] ]` `html` content in task data should have escaped quotes (`\"`). `html` content in config should be html-escaped, see example in `Choices name="confidence"`. Example data for this config you can see below. ```xml
``` ## Example data ```json { "data": { "text": "Which is the biggest black hole in the universe?", "options": [ { "html": "

List of most massive black holes - Wikipedia

https://en.wikipedia.org/wiki/List_of_most_massive_black_holes

List ; Messier 59, 2.7×10 · This black hole has a retrograde rotation. ; PG 1411+442, (4.43±1.46)×10 · 79430000 ; Markarian 876, (2.79±1.29)×10 · 240000000 ; Andromeda ...

", "value": "result1", "children": [ { "html": "

Supermassive black hole - Wikipedia

https://en.wikipedia.org/wiki/Supermassive_black_hole

The largest supermassive black hole in the Milky Way's vicinity appears to be that of Messier 87 (i.e. M87*), at a mass of (6.4±0.5)×109 (c. 6.4 billion) M ☉ at a distance of 53.5 million light-years.

", "value": "result11", "selected": true }, { "html": "

Buraco negro supermassivo

https://pt.wikipedia.org/wiki/Buraco_negro_supermassivo

Um buraco negro supermassivo é uma classe de buracos negros encontrados principalmente no centro das galáxias. Ao contrário dos buracos negros estelares, que são originados a partir da evolução de estrelas de massa elevada, os buracos negros supermassivos foram formados por imensas nuvens de gás ou por aglomerados de milhões de estrelas que colapsaram sobre a sua própria gravidade quando o universo ainda era bem mais jovem e denso.

", "value": "result12" } ] }, { "html": "

Black Hole Size Comparison Chart Gives New View of Universe

https://nerdist.com/article/biggest-black-holes-size-comparison/

They can fit multiple solar systems inside of them. Ton 618, the largest ultramassive black hole, appears at the very end of the video, which, ...

", "value": "result2" }, { "html": "

How Big Is the Largest Black Hole in the Universe? - Business ...

https://www.businessinsider.com/black-hole-how-big-largest-universe-2019-5

And the supermassive black hole at the center of Messier 87 is so huge that astronomers could see it from 55 million light-years away. It's 24 ...

", "value": "result3" }, { "html": "

5 Most Massive Black Holes Discovered So Far. - The Secrets

https://www.secretsofuniverse.in/5-most-massive-black-holes/

The list of the most massive black holes is topped by TON 618. TON 618 is technically a a hyperluminous, broad-absorption line, radio-loud quasar—located near

", "value": "result4" }, { "html": "

'Stupendously large' black holes could grow to truly monstrous ...

https://www.space.com/black-holes-can-reach-stupendously-large-sizes.html

Currently the largest known black hole, powering the quasar TON 618, has a mass of 66 billion solar masses. TON 618's enormous bulk led ...

", "value": "result5" } ] } } ```