Giter VIP home page Giter VIP logo

Comments (5)

KeeJef avatar KeeJef commented on August 16, 2024 1

Yeah this is a bit of an issue, we only support search for strings longer than 2 characters, otherwise things get tricky performance wise. A comprise might be to allow search for usernames / group names for less than 2 characters but still limit conversation searches. @mpretty-cyro thoughts?

from session-ios.

KeeJef avatar KeeJef commented on August 16, 2024 1

@mpretty-cyro sounds reasonable, lets put this in the backlog for iOS

from session-ios.

mpretty-cyro avatar mpretty-cyro commented on August 16, 2024

I do wonder if users will get confused as to why they aren't getting message search results when only entering a single character

I'll take a quick look so see what the performance is like for a single character search - I think the last time I actually checked were were using FTS4 (now have FTS5) and I'm not sure whether we had a limit on the search results (it's now 500 for contacts and 500 for messages)

from session-ios.

mpretty-cyro avatar mpretty-cyro commented on August 16, 2024

@KeeJef Ok did some quick testing on my main test emulator (which has quite a large database) and the results are:

Contacts & Groups

  • 2 Characters: 98ms
  • 1 Character: 263ms

Messages

  • 2 Characters: 2,408ms
  • 1 Character: 8,272ms

The query for global search is pretty complicated at the moment so this might be able to be improved (and potentially combined into a single query instead of two) but would require a decent chunk of effort so might be better left until we can move it across to libSession - I think the compromise you suggest is the best option for something sort-term

The contacts/groups search could be moved earlier than the messages, and even done in-memory instead of at the database level, but we'd need to decide whether we want to sacrifice some of the convenient things FTS5 gives us for free like matching similar words like "corrected" and "correcting" (which is probably more relevant for message searching)

from session-ios.

mpretty-cyro avatar mpretty-cyro commented on August 16, 2024

Jira ticket is SES-1321

from session-ios.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.