[MediaWiki-l] Customizing how search results are displayed/adding content to search results

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[MediaWiki-l] Customizing how search results are displayed/adding content to search results

George, Garrett J. (JSC-CB111)[SGT, INC]
Hey all,

I work on a wiki that incorporates a lot of templates and properties from SMW and I've been trying to figure out how best to add this type of information to the existing search results.

My big two questions are:

1.       Does CirrusSearch handle HTML generation for visually printing search results or does it simply hand off the results to MW for printing?

2.       In either case, where can I find the code that does the HTML printing of search results in order to tack on more information about each search result?

Thanks,

Garrett
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Customizing how search results are displayed/adding content to search results

Brian Wolff
The code for searching is split between the stuff in includes/search,
includes/specials/SpecialSearch.php and includes/widgets/search.

Im not all that familar with the search code, so ymmv. I guess what you
would want to do is have a custom SearchEngine subclass, which would return
a custom SearchResultSet subclass which would return a custom SearchResult
subclass which adds additional html to the output in getTextSnippet().

There is also the SearchResultsAugment hook, which seems relavent to your
usecase, but it seems more for collecting extra data not displaying it.

--
Bawolff

On Monday, August 14, 2017, George, Garrett J. (JSC-CB111)[SGT, INC] <
[hidden email]> wrote:
> Hey all,
>
> I work on a wiki that incorporates a lot of templates and properties from
SMW and I've been trying to figure out how best to add this type of
information to the existing search results.
>
> My big two questions are:
>
> 1.       Does CirrusSearch handle HTML generation for visually printing
search results or does it simply hand off the results to MW for printing?
>
> 2.       In either case, where can I find the code that does the HTML
printing of search results in order to tack on more information about each
search result?
>
> Thanks,
>
> Garrett
> _______________________________________________
> MediaWiki-l mailing list
> To unsubscribe, go to:
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l