SuttaCentral

Search improvements


#1

Hi all, so we are now looking at improving the basic search on the main SC site (NOT here on the forum!).

This has been a long-standing issue for us. If you are interested, please check our Github issue first:

Please let us know if we have missed anything, or any other features you’d like to see.

A word of caution: search is hard! Search across 46 languages is hard! We get so used to how good Google is that we forget that cracking search was what made them the no. 1 tech company in the world. We use elasticsearch, which is a leading site search software. But configuring and optimizing is tricky. We’ll do what we can!


#2

Thank you Bhante.
Also there used to have a description of how to use the search function. Would be great to add it in the new SC Introduction page.


#3

I admit to being tech incompetent. It would be nice if I could easily filter out Jatakas, Abhidhamma etc., search specific Nikayas and such. I don’t know if there’s some special code way to do that now. I see you have prioritize EBTs which is basically what I’m getting at. The Jatakas especially are really killing my searches right now. It’s like wading through bog lands.


#4

Well, hopefully we’ve been using the internet for long enough now that we don’t need an explainer for how to use search. But if any explanation is needed, it should be contextual, not on an introduction page.


#5

Absolutely.

There’s two ways of doing that. The geeky way is to use delimiters in the search field itself. For example, we could do it so that any text ID at the beginning of the field would limit the search to that.

dn: something= "search for “something” in Digha Nikaya.

It could use comma separated values:

dn,sn,dhp: something = "search for “something” in DN, SN, and Dhp.

We could supply some shortcuts, like ebt, su, etc.

Authors could work the same way:

bodhi, dn: something = search for “something” in translations by Bhikkhu Bodhi.

So that way of doing it is rich and flexible, but the problem is discoverability.

The other way is to supply an “advanced search” UI, with a bunch of options. While this has the advantage of being more discoverable, it’s heavier in the sense of “more code” and less flexible.

What do you reckon?


#6

Probably what you call “discoverability” is what @alaber would like to have some instructions for? Could it be an idea to have some short and easy instruction the way you are describing it here so that people know what to enter and which possibilities for searching are available?


#7

Well, ignorance is bliss except when it isn’t. So from my side the advanced search UI would be ideal if there was some way of making it as flexible as the delimiter method. But given the, idk, grassroots or non-googley nature of the project, I think the delimiter method is more realistic to keep down the code requirements and assure maximum flexibility in searching. But there should be a page that explains in sufficient detail how to use the delimiter method on suttacentral.


#8

Google provides both ways to do advanced search.

UI based:
https://www.google.com/advanced_search

keyword/operator based:
https://support.google.com/websearch/answer/2466433?hl=en


#9

Bhante, forgive my ignorance, but I cannot find the introduction page or instructions for search?

Instead, I have relied on the kindness of many others here who have gently guided my missteps and corrected my misunderstandings. For example I did not know about quoting strings. I never quote strings on Google. It just works. And I did not know about the URL trick of using the short reference (e.g. suttacentral.net/mn1), which I consider part of search and use every day. And I have, just now, just now, discovered that I can type mn1 in search. This had never occurred to me since it doesnot work on Google. Yes. I am slow.


#10

Huh! Neat. Thanks. I didn’t know that either. :red_face:


#11

I would imagine just as @Polarbear remarks above that one of the most requested features for search would be filtering out the nikayas for a search. I don’t think it has to be super complicated either. I would hazard a guess that the majority of searches that would want some kind of filtering would be wanting it by nikaya, and probably limited to the pali nikayas.

SN ▢ MN ▣ DN ▢ AN ▢ KN ▢
[ Checkboxes for SN, MN, DN, AN, KN. ]

Just those five I would think to be enough to cover most. Then more advanced searches might have to extend into a larger panel or be using search operators.

Just a guess! Maybe we could take a vote on most requested search features?


#12

Indeed. Although not everything is covered in the UI. Also, Google has thousands of engineers!

Well, isn’t that much better than a cold, heartless explainer!

That’s probably the way to go: put the most common requests in a UI and provide others in a back end. We can make a list of search operators.

You can if you want, but for now, we’re listening and starting work. A lot of it just depends on what is possible/doable/easy from an engineering point of view.


#13

Interesting. I had not considered that mutually supportive continual blind discovery might actually be an architectural criterion.

I also do not think of Wikipedia as a cold, heartless explainer. Wikipedia rests on the hearts and minds of all the contributors and editors. A SuttaCentral wiki with a topic on Search would perhaps suit?


#14

I was being kinda facetious, but in fact, that was one of the reasons for setting up this forum. Documentation for software is a nightmare: It’s complex, few people read it, even if they do read them they often misunderstand it, the software changes while the documentation doesn’t, and on it goes.

Far better to make things that simply work, and if explanation is needed, give it in context.

You can make a wiki here if you like. But I would wait, it will be changing soon!


#15

As far as search goes, I think they really nailed it. Their search interface is the best example of Alan Kay’s line: “Simple things should be simple, complex things should be possible.

A basic input box for quick, simple searches and other ways to allow complex queries. But yes, they have armies of engineers… :slight_smile:


#16

[low priority or user error]
International keyboard cannot be used to enter quoted search string:

8382 results for ¨is the root of suffering¨

Fix is to type spacebar immediately after typing double quotes
Workaround is to revert to US keyboard for typing quotes.
Theoretically possible to map %C2%A8 to double quote, but that might be too clever.

Search term for US international keyboard:
https://discourse.suttacentral.net/search/query?term=%C2%A8root%20of%20suffering%C2%A8&include_blurbs=true&_=1533317593504

Search term for US keyboard:
query?term=%22root%20of%20suffering%22&include_blurbs=true&_=1533317593501

The %C2%A8 is the UTF-8 for the diaerisis.

Resolution: added FAQ to Search page on wiki


#17

Thanks for this, we can grow the wiki over time!


#18

Sorry if this isn’t appropriate for this thread, but when I put Dhammacakkappavattana in the search, it doesn’t return (believe it or not) the Dhammacakkappavattana Sutta. Under filter I have selected all.

Any ideas? Am I doing something wrong? It is especially sad because the Dhammacakkappavattana Sutta is notoriously difficult for people to find. It’s tucked away in the very back of the SN. There isn’t even a way to find it in the indexes in the Wisdom edition.


#19

Have you tried Dhammacakkappavattanasutta?

I will update the wiki


#20

Well, that takes you to the Pali. Which can lead to the English. But it seems odd that if I cut the pali name from the English card the search doens’t take me back to it. (Obviously this isn’t what someone would do, I’m just saying the even the exact text dosen’t even return the result)

And it isn’t limited to this sutta. It seems that searching for the pail name doesn’t work. This seems like a big problem.