SuttaCentral Search Bugs 🪰

A sort of bug was recently fixed by github user Mtnadi recently.

Previously if you wanted to add the in: filter (e.g. in:vinaya) it had to be the very first thing in the search string. Now that is no longer the case.

So, for example, you can search for bowl and then decide that you want to narrow it to Vinaya with bowl in:vinaya (of course you can just search for that directly too. But now you don’t have to worry about putting the in: filter as the first item in the string).

3 Likes

Found a problem when the result text is in a heading:

https://suttacentral.net/search?query=in:dn%20song

The segment link is to https://suttacentral.net/dn21/en/sujato#1.4.7.0 The problem is that that segment anchor isn’t available to the browser. Headings have segment numbers, but they are hidden. So when you click the segment in the search result, you are just taken to the top of the page.

Not sure how to fix that.

1 Like

OK, so If I search for

至得第四禪成就遊 in:ma

I get 29 results, however if I cut the characters directly form the string and search for just 2 of them together I get;

四禪 in:ma

3 results?

Shouldn’t I get at least all 29 and then some more?

1 Like

Wonderful bug!!!

@HongDa, Off the top of your head, can you imagine why this might be? If you don’t know I will write it up as an issue.

when I truncate the string slightly to

第四禪成就

I get 47 results, but if I truncate it any more I get zero, then if I truncate down just to 4th jhana, I get 3.

1 Like

similarly if I search for 第四禪 I get 109 results, but 四禪 gives me 84.

1 Like

Thanks @josephzizys !

Bhante @Snowbird I have no clue at the moment, I need to check it out.

I can write up an issue for it.

Unless @josephzizys you would like to. It might help to have it written by someone who is actually doing the search. If not I can.

1 Like

Hi @josephzizys
I have found the cause and am trying to fix it.

2 Likes

what does ‘aligned’ mean?

I understand it to mean we have a translation in my preferred language and I can do side-by-side.

This sutta has only legacy translations, yet says aligned

Is this a bug?

1 Like

No. In this case because you have searched for Pali words, it is returning a document (which includes root documents and translation documents) that has your search phrase. In this case a root document. And all root documents are aligned. Which, yeah, is kind of an odd thing to say since you can’t get translations if you go to that page.

So it’s not a bug, just an odd wording. Perhaps instead of aligned it should say “root”?

1 Like

Yes. Aligned means that it is aligned with something

Well it is aligned with all the bilara translations of that root text. Semantics, I know. When you go to a translation page it’s not aligned with anything until you activate the root text. But it’s still an aligned text.

In any case, it would be more informative perhaps to have the language there like the suttaplex card does:

Bhante @sujato, @Khemarato.bhikkhu, @HongDa ?

2 Likes

Hi @josephzizys

This problem is related to Arangosearch’s Chinese word segmentation algorithm.

I made some modifications to the Chinese search, and now it is more accurate than before, but the search speed will be slower.

1 Like

indeed, it’s not clear, I will remove ‘aligned’ in the root language result.

1 Like

This thread if for the search function on the Suttacentral.net website. Perhaps you could start a new thread and loop in @helpdesk-dd. You have a great point.

1 Like

Thanks for the feedback, Bhante. I’ll remove the post from this thread.

1 Like

Today I was searching for ‘potters shed’.
In the quick search it returned a sutta that had ‘potter’s shed’ but when I hit return It showed no results.
The SERP? seems to not filter apostrophes in the same way which is annoying

kinda a bug?

Absolutely a bug. I can reproduce.

@HongDa ?

And that vital knowledge is, of course, being encoded in our suite of regressing tests?

:upside_down_face:

1 Like