meza icon indicating copy to clipboard operation
meza copied to clipboard

Create cross-wiki search

Open jamesmontalvo3 opened this issue 6 years ago • 1 comments

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:

  1. 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.
  2. Show page names without any of the content of the page
  3. Show something like "A page on the YXZ Wiki has relevant content"
  4. Don't show results

jamesmontalvo3 avatar Jan 28 '19 18:01 jamesmontalvo3

This is excellent news and great information. Thank you!

revansx avatar Jan 30 '19 18:01 revansx