meza
meza copied to clipboard
Create cross-wiki search
It's very easy to search across elasticsearch indices:
# List indices
curl localhost:9200/_cat/indices?v
# Search all indices
curl "localhost:9200/_all/_search/?q=Some%20search" | jq .
# Search multiple indices as once
curl "localhost:9200/wiki_bme*,wiki_hsg*/_search/?q=Test%20page" | jq .
To make a nice UI you'd have to determine what wikis a user had the read
privilege on, and only search those indices. Additionally you could have different levels of allowed content to be displayed from wikis a user didn't have access to:
- Show all search info including snippets of text. This is the most permissive option. Users who clicked on such results still wouldn't be able to get to the page, though.
- Show page names without any of the content of the page
- Show something like "A page on the YXZ Wiki has relevant content"
- Don't show results
This is excellent news and great information. Thank you!