Discuss & Discover

The first thing that strikes me about the current implementation is that it’s small. @blake made the font size smaller to fit it in, and to me that’s a red flag: too much info, too little space. And on my mobile it’s basically unreadable.

So we should either increase the space or decrease the information.

I’d opt for the former; I think the amount of info is good. So how do we create more space?

There could be many approaches to this, but a simple one would be to give the “Discuss & Discover” 100% of the sidebar when it is activated. In other words, it replaces the other info in the tab (much like the expanding search bar in mobile view).

If it’s not clear I did that inspired by the Discourse search, basically I tried to reproduce the contents and style of the dropdown you get when performing a search on Discourse.
On Discourse, when you do a search on mobile, the blurb/snippet disappears and the title text is full size.

Okay, good. That means we can be pretty consistent. We should handle tags, though; perhaps keep on eye on whether Discourse includes these.

Sounds like a good idea.

Still need more room!

i see that the links are to topics, whereas the sutta may only be referenced in a single post and therefore is hard to find in lengthy discussions such as this

of course linking to each and every individual post a sutta is mentioned in is a bad idea

i’m aware that one can use browser search to hop about these posts within a topic

but maybe for convenience sake it makes sense to implement one more step between a link to the topic and the topic page itself, specifically a page where all posts which reference the sutta in a particular topic are aggregated, wherefrom one can access these posts selectively instead of scanning the entire discussion for them

That’s a perennial issue in search engines. What does google do if you search something? It shows you a snippet, but when you follow a link, it just takes you to the top of the page. It’s entirely up to you to find the part of the page which caused it to show in the search results. It seems google has concluded the best place to drop a person is at the start of a page. Who knows why. But I’m sure they performed thorough user-testing before settling on this.

However I believe I actually intended it to go directly to the referenced post, there might be something wrong with the links I’m constructing causing it to go elsewhere in the thread.

edit: And yup there is. So for the next iteration it’ll link directly to the appropriate post.

1 Like

at least for this topic Kamma of unintentional actions the link is erroneous, because the address for some reason refers to post 513

http://discourse.suttacentral.net/t/kamma-of-unintentional-actions/232/513

while the topic only contains 80 of them and that’s why this particular link doesn’t make the user land at a particular post but rather drops him off at its end

in fact all links have a way larger posts integer than the number of posts the topics actually contain and thus a user every time ends up at their bottom

another thing i spotted is that the last 80th post URL generated by the ‘share a link’ tool actually gives a link to a 81th post, which is non-existent

Kamma of unintentional actions

as if numbering got wrong somewhere along the posts count, because a few first posts share links are correct

1 Like

Okay I’ve pushed a new iteration onto staging. You now have more room! It now takes over the whole sidebar and the other controls are removed while discuss is open.

@LXNDR it now links to the correct post

@sujato I’ll look into categories. Unfortunately the JSON data for a ajax search request does not include information about categories, it only includes a category ID. So I need to ajax the category data separately just to build a few little icons. Worth it I guess though because it gives an indication about the kind of things we talk about.

Is it an idea to have a target="_blank" in there for the links so you don’t loose the tab with the sutta you were reading?

Category badges are now implemented - for reasons of complexity it doesn’t show subcategories. Also I made the links _blank as suggested by @vimala as it’s an external link.

does it take time to come into effect?

in the latest Chrome the pages open in the same window

@blake, this is amazing work, we are building something wonderful here! This morning I’ll add a bunch of content.

One detail: we should have an arrow on this button that points down when it is opened, like the one for “languages”.

@LXNDR, it opens in the same window but a new tab. If it’s not doing this for you, probably it’s a cache thing.

1 Like

We need to pay attention to sorting. I’ve added a bunch of resources for DN1 to test this out. We’re getting a real mix of things, with the actual DN1 resources sometimes missing, or below things for other suttas. One problem is the matching isn’t whole word, so “DN1” matches “DN11”, etc.

I would suggest to use exact whole word matching and weight in this order:

  1. Sutta IDs in tags
  2. Sutta IDs in titles
  3. Sutta IDs in posts.

And then other stuff. I know this may take some time to implement, just recording it here.

Unfortunately at the moment we are somewhat constrained by the behavior of discourse search which is very much inclined towards search-as-you-type.

The two possible approaches to getting better results, is either performing custom search queries against the PostgreSQL database using a Discourse ruby plugin, or indexing the posts into (say) elasticsearch on our server. PostgreSQL text search is perfectly respectable and the synchronization will always be perfect (or at least as perfect as the discourse devs have made it). With elasticsearch there is easy communication between the server and search, but the difficulty is communication between discourse and elasticsearch - keeping it synchronized. Both are doable but non-trivial.

No problems, for now I think we just focus on getting it rolled out, we can keep our eye on it and worry about tweaking the results as we move forward.

Actually, this may be a worse problem than I thought. After adding more resources, on say DN2 we now have a bunch of things showing up for DN20 onwards, and nothing for DN2.

I believe the Abbidhamma is not the words of the Buddha.

3 Likes

Okay, busted! And there are plenty of things in the Vinaya and suttas that are not the Buddha’s words, too. Let me rephrase: SuttaCentral contains only the canonical texts themselves.

Incidentally, the inclusion of the Abhidhamma serves a number of purposes, but one of them is that there are many sutta parallels in the abhidhamma.

2 Likes

Thanks Bhante. In my opinion it would be great to have the full Canonical Abhidhamma readily available. Actually, that’s almost possible now that PTS has put a lot of their material into the public domain.

There is a great deal of confusion between the Canonical Abhidhamma, which hardly anyone has read, and the “summaries” in the Visuddhimagga and the Abhidhammatthasangaha, which were written about many centuries after the canonical Abhidhamma. See:
A Comprehensive Manual of the Abhidhamma:The Abhidhammatthasangaha of Acariya Anuruddha, Buddhist Publication Society, Edited by Bhikkhu Bodhi and others.
http://store.pariyatti.org/Comprehensive-Manual-of-Abhidhamma-A--PDF-eBook_p_4362.html

The Canonical Abhidhamma doesn’t contain billions of mind moments arising every second. It is much more along the lines of analysis and systematisation of the Suttas as @sujato mentions.

Take a look at, for example: http://www.ancient-buddhist-texts.net/English-Texts/Short-Pieces-in-English/Conditions.htm The Enumeration of the Conditions:

3 Likes

SuttaCentral coverage of Abhidhamma is not as extensive as for the Suttas and Vinaya, but we still have more than pretty much any other site that I’m aware of.

We have the full Pali text of the seven Abhidhamma books. These are very extensive, especially compared to the PTS editions. The Patthana in particular is very detailed; I spent several weeks last year sorting out the incredibly complex internal structure of this mind-blowing text, which has over 10,000 structural headings. It is perhaps the only text produced by humanity that genuinely requires using an <h6> tag!

We also have full English translations of three of these texts, the Dhammasangani, Vibhanga, and Kathavatthu. These are mostly from the PTS editions, with some improvements. I have added the Mātikā translation, which was missing from the PTS. And Ven Anandajoti has retranslated the Satipaṭṭhāna Vibhanga.

The Vibhanga and Kathavatthu were digitized by us, while the Dhammasangani was digitized and available on the Wisdom Library and adapted for SuttaCentral.

We are still missing the text and translations for the Abhidhamma texts in Chinese and Sanskrit. These are on our 2do list. Particularly interesting is the Sanskrit text of the Dharmaskandha, which quotes from and discusses a number of interesting suttas. I’d like to prepare the translation of the Puggalapaññatti also, as this is little more than a collection of passages from the suttas. Full sets of parallels for all Abhidhamma materials is also on the 2do list. (It’s a long 2do list!)

1 Like

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.