After looking at postgresql’s full text search capabilities I have decided to index all posts into elasticsearch.
Towards this end I have created a mechanism via plugin which allows retrieving all new/updated posts. This should make it possible to keep elasticsearch perfectly synchronized while only needing to transfer ‘differences’. In principle Discourse can already show you new posts, but there is no real way to track deleted or edited posts.
The ability to do small incremental updates is very powerful as it allows very frequent synchronization with little burden on the servers.
Of course. Postgresql is about as low level as it gets, all it really provides are some functions you can build a search engine with. I can see the merits of the approach as it gives you a lot of precise control and you know exactly what it’s doing and how it works, but if you don’t feel like implementing your own search engine it makes a lot more sense to a full-fledged search engine.
Actually, it would be really nice if pages like: http://suttacentral.net/dn
gave an indication of whether there were links to discussions. As it is, I have to go into DN1, DN2, etc and see what’s there…
No, that should be fine. i think the problem is on our end, I think the search index or something is not working 100%. We just launched it yesterday! @blake, can you look into this?
Not sure about this. It could overload the page; it might increase loading time a lot, not sure.
On the one hand, it would be nice to have a place that was for discussions about the division as a whole; someone might want to talk about the Nidana Samyutta, for example. On the other hand, maybe we should keep it simple, and just let people search for things like that on Discourse. SC isn’t meant to be an interface for Discourse, we just want to make the connection.
We might let the current implementation settle down and see how the feedback and usage goes before pushing it any further.
I’ve tweaked the CSS for the Discourse results. Overall I’ve made it a little more compact and balanced.
Thanks for hiding it in the Templates folder, that gave me a nice little hunt! Just wondering, is there any sane reason why this isn’t in, oh I don’t know, stab in the dark, the CSS folder, perhaps?
For filtering, we still need to narrow results for the exact ID, so MN2 does not grab MN21.
Also, can we exclude results based on category, such as this Dev category, or more generally, the Meta category?
As time goes on we might want to weight results by Likes or something. Currently, how are the results sorted?
Is it possible to make this feature work in the titles?
I notice that in posts like this:
by @Russell I can’t easily get to MN95.
(Whereas having typed it up here ^ I can get to it easily.)
In the links I added I simply copied the title into the body, which then made the sutta labels active, but one could argue that that approach adds clutter.