sujato
February 9, 2022, 8:51pm
117
This is noted here:
opened 11:54PM - 08 Jun 21 UTC
closed 05:34AM - 09 Mar 23 UTC
We should be able to filter search by collection or other criteria.
- [x] **… Note: this feature will render obsolete the existing "filter" dropdown, which is broken anyway. Remove it.**
For an implementation of this, see digital pali reader:
https://www.digitalpalireader.online/_dprhtml/index.html
A few choices to note here:
- filters are by GUI
- enables various filters by multiple collections, books in collection, and the like
Personally I really like the way filters are implemented in Github. For example, open up the "Issues" tab and you see `is:issue` `is:open`. That immediately tells you not only what you see, but suggests options (eg. `is:closed`).
But text filters are also less discoverable. I'm concerned, though, that implementing a system of filters via GUI would get complicated quickly. Even on DPR it's not immediately obvious why the options change the way they do; and they have a lot fewer possibilities to consider.
Perhaps we could implement a certain number of filters by UI and lead people on to discoverability.
For example, we could offer the following:
```
Search: |____________|
Filter: `dn` `mn` `sn` `an` `kn`
```
Click one of those and you see:
```
Search: |_is: dn____________|
Filter: `dn` `mn` `sn` `an` `kn`
```
Perhaps we could start by defining a default subset for searches:
```
Search: |_is:ebt___________|
Filter: `dn` `mn` `sn` `an` `kn`
```
Where `ebt` includes dn, mn, sn, an, the seven early kn books, and all the non-Pali texts. Mostly this is what people will be looking for.
Other things might be filter by author, etc., or by `not:`
We can give an explainer:
```
Search: |_is:ebt___________|
Filter: `dn` `mn` `sn` `an` `kn`
```
<details><summary>More …</summary>
<ul>
<li>Default <code>ebt</code> searches within dn, mn, sn, an, kp, iti, ud, snp, dhp, thig, thag; Vinaya except for Parivara; and all non-Pali texts)</li>
<li>Any valid SC text ID can be used as a filter. So you can filter by eg. chapter (<code>is:dn-silakkhandhavagga</code>) or sutta (<code>is:dn1</code>).</li>
<li>You can search only texts that have one or more parallels: <code>is:ll</code></li>
<li>Other filters include <ul>
<li>collection (<code>is:sutta</code>, <code>is:vinaya</code>, <code>is:abhidhamma</code>),
<li>language (<code>is:pli</code>, <code>is:lzh</code>, <code>is:san</code>, <code>is:xct</code>),
<li>author (<code>is:bodhi</code>, <code>is:brahmali</code>)</li></ul>
<li>You can also use <code>not</code> to invert the search, eg. <code>not:vinaya</code>, <code>not:pli</code>, <code>not:ll</code>
</ul>
</details>
Fixing it is part of our planned search update. You’ll see the overall project here. Please make any suggestions or ideas! These plans are not fully mature yet.