Пример #1
0
        public override Indexable GetNextIndexable()
        {
            TB.NntpMessage message = DbEnumerator.Current as TB.NntpMessage;

            // If status is different, than something happend when loading this mail and we dont'
            // want to change it's status.
            if (message.GetObject("FullIndex") == null)
            {
                message.SetObject("FullIndex", (object)FullIndex);
            }

            return(NntpMessageToIndexable(message));
        }
Пример #2
0
        // FIXME: This need some more info
        private Indexable NntpMessageToIndexable(TB.NntpMessage message)
        {
            Indexable indexable;

            indexable           = new Indexable(message.Uri);
            indexable.HitType   = "MailMessage";
            indexable.MimeType  = "message/rfc822";
            indexable.Timestamp = DateTime.Parse(message.GetString("date")).ToUniversalTime();

            indexable.AddProperty(Property.NewKeyword("fixme:client", "thunderbird"));
            indexable.AddProperty(Property.NewUnsearched("fixme:fullyIndexed", message.GetBool("FullIndex")));
            indexable.AddProperty(Property.NewDate("fixme:indexDateTime", DateTime.UtcNow));

            string subject = GMime.Utils.HeaderDecodePhrase(message.GetString("subject"));

            indexable.AddProperty(Property.New("dc:title", subject));

            return(indexable);
        }