Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Manually or explicitly indexing a folder in Thunderbird with GlodaIndexer
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Ferad Zyulkyarov  
View profile  
 More options Oct 11 2012, 12:37 pm
Newsgroups: mozilla.dev.mdc
From: Ferad Zyulkyarov <fer...@gmail.com>
Date: Thu, 11 Oct 2012 09:37:55 -0700 (PDT)
Local: Thurs, Oct 11 2012 12:37 pm
Subject: Manually or explicitly indexing a folder in Thunderbird with GlodaIndexer
I am trying to manually index a folder in Thunderbird by using GlodaIndexer. What I do is following.

1. I open a new tab with the

document.getElementById("tabmail").openTab("chromeTab", {
   chromePage: “indexWithGloda.html”,

});

2. The file indexWithGloda.html has a button with an onlick even that should start the indexing.

<html>
<head>
<script type="text/javascript">
function onClickStartIndexingWithGloda()
{
   var inboxFolder = getInboxFolder(); // Find the inbox folder
   GlodaMsgIndexer.indexFolder(inboxFolder, ["force"]);
   var job = GlodaIndexer._indexQueue.pop();
   GlodaMsgIndexer._worker_folderIndex(job);

}

function getInboxFolder() {
   var inbox = null;
   var accounts = [x for each (x in fixIterator(MailServices.accounts.accounts, Ci.nsIMsgAccount))].filter(function (x) x.incomingServer);

   var server = accounts[0].incomingServer;
   var folder = server.rootFolder;

   var searchForInbox = function(folder) {
      var isInbox = folder.getFlag(Ci.nsMsgFolderFlags.Inbox);
      if (isInbox) {
         inbox = folder;
      }
      else if (folder.hasSubFolders) {
         for each (var subFolder in fixIterator(folder.subFolders, Ci.nsIMsgFolder))
            searchForInbox(subFolder);
      }
   }

   searchForInbox(folder);

   return inbox;

}

</script>
</head>
<body>
<input type="button" id="indexmsg " value="Start Indexing" onClick="onClickStartIndexingWithGloda()" />
</body>
</html>

The problem is that the call “GlodaMsgIndexer._worker_folderIndex(job);” in function onClickStartIndexingWithGloda () does not really start the indexing. I guess it should be called in some asynchronous manner but I do not know how to start it asynchronously. I would very much appreciate any help here. One more question, would this method work if the folder is already indexed? If not, what is necessary to do to re-index an already indexed folder?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »