Topic on Help talk:CirrusSearch

How to list more than 1 result from a wiki page

2
Chachacha2020 (talkcontribs)

Hi, I'm using


MediaWiki     1.27.1

PHP     5.5.9-1ubuntu4.22 (apache2handler)

MySQL     5.5.53-0ubuntu0.14.04.1

ICU     52.1

Elasticsearch     1.7.5

and kinda pleased with the search result. However, I have a problem. My wiki has a page "Windows tip" and 2 heading name "windows can't sleep" and "Windows wake from sleep". A search "windows sleep" only bring "Windows wake from sleep" then the results come from another page. How to list more than 1 result from a wiki page?

PS: I can code a bit, so if this feature not available I can contribute.

DCausse (WMF) (talkcontribs)

Sadly the smallest unit is the wiki page with CirrusSearch, diverging from that might require significant changes to CirrusSearch internal data model. Another issue is that CirrusSearch does not know how to attach sections and text to each other. Imagine the search query matches a section name, the text displayed below won't be extracted necessarily from this same section causing some incomprehension (see phab:T131950).

Perhaps changing the structure of some of you wiki pages (subpages instead of sections) is an option to you?

If not I'm sorry for not being able to point at a reasonable solution for adapting the CirrusSearch code.

Reply to "How to list more than 1 result from a wiki page"