Discuss & Discover

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.

Sounds like it will be very powerful in the long run. Let me know when it’s implemented.

Was there anything in particular that you felt was better about using the elasticsearch approach?

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.

1 Like

Hmm, I’m having trouble getting this to show up as a link the Sutta area:

Here’s the sutta itself:

http://suttacentral.net/sn12.15

Presumably I’m doing something wrong…

Also, I think it would be nice to have access to the link from the “Details and Parallels” page, not just the pali or translation page.

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…

1 Like

OK this one worked:

So the problem is with the SNaa.bb format in my other post?

That’s actually a good point, let me think about it.

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?

And from the Contents page? E.g. from:
http://suttacentral.net/dn
it would be nice to be able to browse for suttas that have tagged discussions etc.

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.

Dear Bhante, dear Blake,

just to let you know and in order to link my post with the original conversation: I experienced the same issues as @mikenz66.

Since, you are aware of this issue already, feel free to ignore that post… :smile:

With much mettā,
Robert

A few details for @blake

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 there a problem with the Discuss & Discover feature? I currently don’t see links from any sutta…

You’re right, it’s broke, @blake can you look into this?

Hmmm, I manually regenerated the search index and the results are back, I’m not sure quite what went wrong though.

Thanks @blake. It’s working great now…

In fact it seems to be working instantaneously!

Is there a reason why the Dhammapada verses don’t have this feature?

1 Like

Well spotted, @blake can you look into this? On Dhp, things need to link to the data-uid.

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.

1 Like