The fastest way to search contacts

stratus

Active Member
Licensed User
Longtime User
I have a program which every day when day changes must search contacts for specific names.The problem is that if the user has too many contacts the procedure takes too long.I am looking a fast way to search all the contacts.Any idea?
Thanks in advance.
 

rboeck

Well-Known Member
Licensed User
Longtime User
Try to use an sqlite database with fts4 (fulltextsearch v4). You will be able to find all ocurrences of an search string in all fields: even email, street adress etc.
I use an test database with more then 130.000 adresses and the search time for strings is 100 to 200 msec; for only one hit its even faster.
Greetings
Reinhard
 
Upvote 0

stratus

Active Member
Licensed User
Longtime User
It will be faster with Exact set to true.
Ok i set it to true and it is fastest.But i have another problem now.I am Greek user and the contacts are written with greek letters of course.The findbyname function does not find all contacts which their name contains the string i am looking for.Sometimes the function find one contact,other time none etc.Is there any problem with greek chars?
 
Upvote 0

mc73

Well-Known Member
Licensed User
Longtime User
Ok i set it to true and it is fastest.But i have another problem now.I am Greek user and the contacts are written with greek letters of course.The findbyname function does not find all contacts which their name contains the string i am looking for.Sometimes the function find one contact,other time none etc.Is there any problem with greek chars?
Many times, users tend to confuse greek with english letters when they are identical. In order to solve this, you should make some combinations, including at least the two different first letters of the name. For e.g. ΝΙΚΟΣ can be written with greek N but also with english N. You should try to search for both.
 
Upvote 0

stratus

Active Member
Licensed User
Longtime User
Many times, users tend to confuse greek with english letters when they are identical. In order to solve this, you should make some combinations, including at least the two different first letters of the name. For e.g. ΝΙΚΟΣ can be written with greek N but also with english N. You should try to search for both.
This is not the problem.I have 4 contacts which are name is "ιωσηφ".If i try findbyname function returns 3 of them only.If i try the function to my second phone which is synchronized with the first phone returns only one contact.
 
Upvote 0

mc73

Well-Known Member
Licensed User
Longtime User
This is not the problem.I have 4 contacts which are name is "ιωσηφ".If i try findbyname function returns 3 of them only.If i try the function to my second phone which is synchronized with the first phone returns only one contact.

I don't know. If you're sure that ιωσήφ is not written as ιωσήφ (with the first ιώτα being the english i) then I cannot help any further, it should be really a bug.
 
Upvote 0

stratus

Active Member
Licensed User
Longtime User
Thanks for the help.Unfortunately "ιωσηφ" is written only with Greek letters.
YΓ Ευχαριστω και στα ελληνικα :)
 
Upvote 0
Top