Open ben-ko opened 4 years ago
The issue I described here is mostly fixed, but block searches still sometimes order search results strangely.
To take the Bible example, typing ((John 3:16))
no longer pulls up every block containing the terms John
, 3
, and 16
in reverse chronological order, but it will turn up John 13:16
before John 3:16
.
Sorry for being stupid, but isn't that reverse chronological order?
John 3:16 is before John 13:16 so in reverse chronological order John 13:16 appears before John 13:16
Right. You can see the way it used to work in this video: https://youtu.be/nplokaE6FKY?t=201. He types ((John 10:10))
and gets a bunch of blocks that contain John
and 10
with, I believe, the most recently added block at the top.
Thankfully this is fixed, but there's still something less than ideal going on whereby if you have a block for every verse in the book of John and type ((John 3:16))
, the results you get are the block for John 13:16
followed by the block for John 3:16
.
Or here's another example where I type ((John 1:12))
and the results I get are the block for John 21:12
followed by the block for John 11:12
followed by the block for John 1:12
. (Sorry my css makes it a little hard to read.)
EDIT: The issue I described here is mostly fixed, but block searches still sometimes order search results strangely. See next comment below.
Describe the problem
When you search for a block, it looks like Roam pulls up every block that contains each of your search terms, regardless of how you ordered them, and presents those blocks in reverse chronological order. This works well until you have a lot of blocks that contain the same words or numbers. When this happens, you can have a frustrating experience where you type in the exact wording of the block you're looking for but then still have to scroll through more recent blocks that are less exact matches to find the one you want.
You can see someone running into this problem at https://youtu.be/nplokaE6FKY?t=201. He's searching for the Bible verse
John 10:10
, but when he types inJohn 10:10
he has to scroll through lots of other verses withJohn
,1
, and0
in them to find what he's looking for.To see a simplified version of this in action, you can create a block that says
1.2
and a second that says2.1
. Then, in a new block, try to search for the first block by typing((1.2))
. Even though you typed1.2
,2.1
will come up first (see screenshot below). This isn't a big deal when it's just two blocks, but will become much more annoying as you add more blocks with1
and2
in them.Feature implementation
When a user searches for a block, I think that any blocks that match the exact phrase they typed should come up first in the search results.
Most other search platforms let you search for an exact phrase by putting quotation marks around the phrase. Something like that might also work for block search, though it might be complicated by the fact that some blocks themselves might contain quotation marks.