Messages icon indicating copy to clipboard operation
Messages copied to clipboard

Search doesn't index/find messeges past a certain date.

Open UltraSabreman opened this issue 1 year ago • 6 comments

Checklist

  • [X] I can reproduce the bug with the latest version given here.
  • [X] I made sure that there are no existing issues - open or closed - to which I could contribute my information.
  • [X] I made sure that there are no existing discussions - open or closed - to which I could contribute my information.
  • [X] I have read the FAQs inside the app (Menu -> About -> FAQs) and my problem isn't listed.
  • [X] I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
  • [X] This issue contains only one bug.
  • [X] I have read and understood the contribution guidelines.

Affected app version

1.0.1

Affected Android/Custom ROM version

Android 14

Affected device model

Pixel 8 Pro

How did you install the app?

F-Droid / IzzyOnDroid

Steps to reproduce the bug

Search for anything using the search bar

Expected behavior

It finds your string

Actual behavior

The app will not search messages past about 1.5 "loads" of texts. IE if I go into a text conversation and scroll up, It will find everything just fine prior to the first load, and after loading in the second "batch" of texts, about half-way through that batch. Any older texts may as well not exist as far as the search feature is concerned.

Screenshots/Screen recordings

No response

Additional information

I did import a long history of texts from google when I transitioned to this app, however that doesn't seem to the culprit as text conversations that I have no modified since then behave the exact same way. Even new conversations that have filled up to more than 1.5 loads of text messages have this issue.

UltraSabreman avatar Sep 11 '24 20:09 UltraSabreman

I'm also having the same issue. Search doesn't find anything past a certain amount of messages.

Al-Batal avatar Dec 31 '24 15:12 Al-Batal

For what it's worth I don't seem to have this issue. I was able to search and find messages that are older than "a few loads/batches" ago. Maybe it has been fixed already.

App version 1.1.5 Android 15 Pixel 6a

primesun avatar Mar 21 '25 19:03 primesun

@primesun It hasn't been fixed yet. Maybe you weren't searching for a message far enough in the conversation.

Aga-C avatar Mar 21 '25 19:03 Aga-C

@Aga-C Interesting, maybe our experiences are different then. I definitely searched for a message far enough in the conversation, I'm sure about that. It is showing a result that is over 50 "loads" ago (it is a very long conversation).

primesun avatar Mar 21 '25 19:03 primesun

I did a bit more testing, and I was able to reproduce the issue. The number of "loads" is not the right factor in whether or not a search will find the matching message.

I am able to find messages that are:

  • over 50 "loads" ago
  • almost 10 years old
  • existing since before installing this app, as long as the conversation was opened in this app (possibly need to scroll up to that message, this part is hard to test)

I wasn't able to find a message that existed before installing this app, before opening the conversation that contains it.

The way I tested this was I scrolled down in the list of conversations to the oldest one (or any conversation from before installing this app), but I did not open that conversation. I noted a word from the message shown in the conversation preview, which would be the last message from that conversation. Ideally a unique word would be chosen, to reduce the number of other results. And finally I searched for that word. The message was not found. Then I repeated the test after opening the conversation, and the message was found.

I haven't looked at the code, but most likely the app simply builds its search index over time from conversations as they are opened (possibly also when a new message is received, but that's irrelevant here). If a pre-existing conversation hasn't been opened in this app, then it won't have it in its search index. If my theory is correct, this may have been a design decision for efficiency and/or simplicity.

primesun avatar Mar 22 '25 05:03 primesun

In the code, it seems like this is where that main search occurs:

https://github.com/FossifyOrg/Messages/blob/74cb8c602c7a16e00b60e307643a20ea9197cf58/app/src/main/kotlin/org/fossify/messages/activities/MainActivity.kt#L528

Maybe it is related to how messagesDB and conversationsDB are built.

primesun avatar Mar 22 '25 06:03 primesun