Bug 223812 - Searching doesn't work
Summary: Searching doesn't work
Status: RESOLVED WORKSFORME
Alias: None
Product: kmail2
Classification: Applications
Component: misc (show other bugs)
Version: 1.99.0
Platform: Unlisted Binaries Linux
: HI normal
Target Milestone: ---
Assignee: Till Adam
URL:
Keywords: akonadi-ports-regression
: 259098 (view as bug list)
Depends on:
Blocks: 223438 277366
  Show dependency treegraph
 
Reported: 2010-01-22 17:46 UTC by Thomas McGuire
Modified: 2016-12-06 05:19 UTC (History)
10 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas McGuire 2010-01-22 17:46:58 UTC
Searching doesn't seem to work at all.

First of all, it doesn't find any results, even if I do simple searches like "subject contains 'e'".

Clicking the search button twice suddenly activates the "Open Search Folder" button, and clicking that button crashes KMail.

I have once got KMail to show a search folder in the folder list, but can't do that anymore. Removing the search folder crashes KMail as well.
Comment 1 Till Adam 2010-04-05 18:59:59 UTC
Most of this is obsolete, the remaining issues should be fixed once server side search editing works. Working on that, thus assigning to me.
Comment 2 Thomas McGuire 2010-04-05 19:41:17 UTC
The points I mentioned in my original comments are still valid:
- Simply searching never seems to work, even when searching for "subject 
  contains e"
- Clicking "Open Search Folder" still crashes

Also, is the "Stop" button supposed to currently work?
Comment 3 Thomas McGuire 2010-04-05 21:18:19 UTC
It currently can not work because the email feeder is disabled from build, see r1102562.
Comment 4 Milian Wolff 2010-05-07 18:33:52 UTC
The problem is this as follows:

- I start kmail with clean setup
- import 2.5k mails
- the indexer kicks in
- it's probably not yet finished, I start a search query
- kmail tells me "-1" results
- I start the query again => crash

the database has the required fields (even the pimitem relation to the search collection) but it asserts due to this:

[akonadiserver] Error during executing query "INSERT INTO CollectionTable (remoteId, name, parentId, resourceId, queryString, queryLanguage) VALUES (:0, :1, :2, :3, :4, :5)" :  "Duplicate entry '1-Last Search' for key 'CollectionTable_parentAndNameIndex' QMYSQL3: Unable to execute statement"
[akonadiserver] Error during insertion into table "CollectionTable" "Duplicate entry '1-Last Search' for key 'CollectionTable_parentAndNameIndex' QMYSQL3: Unable to execute statement"
kmail(14269) KMail::SearchWindow::searchDone: "Unable to create persistent search" 
ASSERT: "mFolder.hasAttribute<Akonadi::PersistentSearchAttribute>()" in file /home/speedy/projects/kde4/kdepim/kmail/searchwindow.cpp, line 523
*** KMail got signal 6 (Crashing)

neither of these commits seem to help nor change anything in this regard:
1121513, 1121507, 1118608, 1118601
Comment 5 Till Adam 2010-05-07 19:22:15 UTC
Yep, I'm aware of it, and working on it. :)
Comment 6 Volker Krause 2010-05-09 15:17:08 UTC
SVN commit 1124566 by vkrause:

Autostart the email feeder agent, required by KMail.

CCBUG: 223812


 M  +1 -1      nepomukemailfeeder.desktop  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1124566
Comment 7 Laurent Montel 2010-05-20 14:02:08 UTC
I tried yesterday to fix "kmail tells me "-1" results"
but in search folder staticstic value is alway "null"
We can see it when we "right click" -> "Folder properties" we see "0" as number of email in this folder.

=> perhaps a pb with search folder.
Comment 8 Laurent Montel 2010-05-20 14:05:31 UTC
An other pb is:
When we make a search it create a folder "Last search"
it's ok it works.

you close and reopen KMail, make a new search, it doesn't want to reuse "Last search" as in KMail 1 and it doesn't work
=> change folder name and it works fine.


It will good it we can reuse old search folder I think.

Regards
Comment 9 Milian Wolff 2010-05-20 17:26:26 UTC
SVN commit 1128890 by mwolff:

reuse collection of last search, when it wasn't renamed and no search collection is selected

fixes assert in searchDone since it was tried to create a new collection with an
existing name which AkonadiServer currently rejects due to the unique index on name + parent id.

Note: this patch uncovers more problems in search, hence not yet closing the bug.

CCBUG: 223812

 M  +5 -0      kmail.kcfg.cmake  
 M  +15 -3     searchwindow.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1128890
Comment 10 Sergio Martins 2011-04-08 00:24:08 UTC
What's the status on this? 

Works for you thomas?

Doesn't work for me.
Comment 11 Thomas Berger 2011-07-03 14:22:08 UTC
Hey, could please anyone investigate at this bug?

Its over one year ago, soon fixes was mentioned, and the bug is still NEW?
Comment 12 Torgny Nyblom 2011-07-16 20:27:06 UTC
*** Bug 259098 has been marked as a duplicate of this bug. ***
Comment 13 Dennis Schridde 2011-09-24 15:20:31 UTC
I experience a related bug: I start the search dialogue in kmail2 (by pressing S) and let it search for "subject contains hello" and while some correct results are given, the list also contains emails with all columns (folder, subject, from, to, date, size) empty, and even mails with a subject like PGcWpXZvwE (a kolab generated mail). The number of results is claimed to be "0", while the list of messages is definitely a lot longer.

The results, while always the same for each search term, seem to be more or less random in respect to their relation to the actual search. For example, a search for "nouveau" in the subject returned a list of 6 emails with none having any relation to "nouveau". For the first search the number of results was given as "1" and subsequently it was claimed to be "5", while everytime the same 6 messages were being displayed.
Comment 14 Dennis Schridde 2011-09-24 15:22:48 UTC
s/For the first search/For the first time I searched for this term/
Comment 15 Dennis Schridde 2011-09-24 15:24:54 UTC
This was using 4.7.1
Comment 16 Dennis Schridde 2011-09-24 15:31:06 UTC
Now it gets even funnier: Searching for "messagebody contains nouveau", the dialogue displays "48" matches, the "last search" folder displays "108" items, the list in the dialogue contains empty and unrelated items and the scrollbar behaves like a jojo, with the list of claimed-to-be-found items growing and shrinking and messages disappearing and new messages appearing in the list.
Comment 17 Christian Mollekopf 2012-06-21 11:16:40 UTC
Has been fixed as far as I know? (WORKSFORME)
Comment 18 André Verwijs 2016-12-06 05:19:57 UTC
i have the same in kubuntu 17.04

related to:
304252