Bug: Gloda search limits results to first 200 hits, with exception "TypeError: amessage.to is undefined" (on large folder with many matches)
Status: RESOLVED
Priority: --
Resolution: DUPLICATE
Created: 2022-10-10 18:40:01+00:00
Resolved: 2024-09-22 19:14:55+00:00

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:105.0) Gecko/20100101 Firefox/105.0

Steps to reproduce:

TB 102.2.2 (64-Bit)
Kubuntu 22.04
16 GB RAM

I have a fairly large collection of E-Mails in local folders. Profile is 11 GB, my biggest folder in Thunderbird contains more than 20.000 messages.
When I use global search with a keyword that is very frequent (for example my own name), I would expect thousands of search results.


Actual results:

Sometimes only about 1000 results are displayed when in fact there are way more messages that would match the search term.

But sometimes the search doesn't give any results at all. Instead the rotating circle "searching" animation is displayed forever. (TB doesn't use suspicious amounts of RAM or CPU.)

In this case 3 exception errors appear in the error log:

gloda.collection: caught exception from listener in onItemsAdded: resource:///modules/gloda/GlodaFundAttr.jsm:817: TypeError: aMessage.to is undefined Collection.jsm:604:13
    _onItemsAdded resource:///modules/gloda/Collection.jsm:604
    onItemsAdded resource:///modules/gloda/GlodaDatastore.jsm:154
    _onItemsAdded resource:///modules/gloda/Collection.jsm:602
    onItemsAdded resource:///modules/gloda/GlodaDatastore.jsm:154
    _onItemsAdded resource:///modules/gloda/Collection.jsm:602
    onItemsAdded resource:///modules/gloda/GlodaDatastore.jsm:154
    _onItemsAdded resource:///modules/gloda/Collection.jsm:602
    onItemsAdded resource:///modules/gloda/GlodaDatastore.jsm:154
    handleCompletion resource:///modules/gloda/GlodaDatastore.jsm:444

gloda.ds.qfq: Exception: TypeError: aMessage.to is undefined
    score resource:///modules/gloda/GlodaFundAttr.jsm:817
    scoreNounItems resource:///modules/gloda/Gloda.jsm:2468
    set fullSet chrome://messenger/content/glodaFacetView.js:514
    initialBuild chrome://messenger/content/glodaFacetView.js:548
    onQueryCompleted chrome://messenger/content/glodaFacetView.js:1061
    onQueryCompleted resource:///modules/gloda/GlodaMsgSearcher.jsm:356
    _onQueryCompleted resource:///modules/gloda/Collection.jsm:681
    onQueryCompleted resource:///modules/gloda/GlodaDatastore.jsm:168
    _onQueryCompleted resource:///modules/gloda/Collection.jsm:681
    onQueryCompleted resource:///modules/gloda/GlodaDatastore.jsm:168
    _onQueryCompleted resource:///modules/gloda/Collection.jsm:681
    onQueryCompleted resource:///modules/gloda/GlodaDatastore.jsm:168
    _onQueryCompleted resource:///modules/gloda/Collection.jsm:681
    onQueryCompleted resource:///modules/gloda/GlodaDatastore.jsm:168
    handleCompletion resource:///modules/gloda/GlodaDatastore.jsm:449
GlodaDatastore.jsm:453:17


aMessage.to is undefined GlodaFundAttr.jsm:817
    score resource:///modules/gloda/GlodaFundAttr.jsm:817
    scoreNounItems resource:///modules/gloda/Gloda.jsm:2468
    set fullSet chrome://messenger/content/glodaFacetView.js:514
    initialBuild chrome://messenger/content/glodaFacetView.js:548
    onQueryCompleted chrome://messenger/content/glodaFacetView.js:1061
    onQueryCompleted resource:///modules/gloda/GlodaMsgSearcher.jsm:356
    _onQueryCompleted resource:///modules/gloda/Collection.jsm:681
    onQueryCompleted resource:///modules/gloda/GlodaDatastore.jsm:168
    _onQueryCompleted resource:///modules/gloda/Collection.jsm:681
    onQueryCompleted resource:///modules/gloda/GlodaDatastore.jsm:168
    _onQueryCompleted resource:///modules/gloda/Collection.jsm:681
    onQueryCompleted resource:///modules/gloda/GlodaDatastore.jsm:168
    _onQueryCompleted resource:///modules/gloda/Collection.jsm:681
    onQueryCompleted resource:///modules/gloda/GlodaDatastore.jsm:168
    handleCompletion resource:///modules/gloda/GlodaDatastore.jsm:449



Expected results:

When searching for a very frequent keyword in a large collection of messages, all matching results should be displayed. Or alternatively if there are technical limitations to the number of results, an error message should be displayed telling the user that there are too many results and that he should use more specific search term.

I'm not 100% certain if this is a recession in TB102 or if it hadn't worked in previous versions either.