This is more of a long term aim, but I thought I’d mention it.
It would be sweet to use SuttaCentral’s elasticsearch for Discourse. Currently Discourse search is based on PostgreSQL, which is more limited. There has been some discussion about using a more advanced search for Discourse, but the devs don’t see it as a priority.
However they do say that implementing elasticsearch is not that difficult.
For our use case, let’s assume someone on SuttaCentral is searching for a particular topic, say “cat”. They get references to cats in the English translations, probably showing up in some dictionaries, and so on. But they have no way of knowing that there has been this awesome discussion of cats in Early Buddhism here on Discourse.
So if elasticsearch had discourse indexed, we could show those results as well.
A more modest implementation would be simply to add the option, “Search on Discourse” to the results page, and they could link to a full page search for that term on Discourse:
http://discourse.suttacentral.net/?search=cat
Note that Discourse doesn’t properly support full page search results yet. There is a plugin:
https://meta.discourse.org/t/full-page-search-plugin-now-available/13791
But it seems likely the devs will add this as a part of core.
From the other side, searching on Discourse currently gives no results for SuttaCentral. So if I search for MN151 there are no results, since no-one has mentioned this sutta here (until just now!) But someone looking for this may well want to know about the relevant info on SuttaCentral.
@blake’s awesome ID-conversion plugin already pulls in some information, so a similar thing could happen for search.
I don’t think, however, that you’d want to see identical results in Discourse and SuttaCentral; the results should be prioritized to those from the site you’re on.
While we could no doubt go some way by tweaking PostgreSQL on Discourse, ultimately I think an integrated elasticsearch will be the best. One of elasticsearch’s main features is the swift indexing of user-generated content like this forum.