protected override Indexable MessageToIndexable (Message message) { Uri uri = new Uri (String.Format ("email:///{0};id={1}", message.Path, message.Id)); Indexable indexable = new Indexable (uri); indexable.Type = "MailMessage"; indexable.AddProperty (Property.New ("fixme:client", "mozilla")); indexable.AddProperty (Property.New ("dc:title", message.Subject)); indexable.AddProperty (Property.New ("fixme:subject", message.Subject)); indexable.AddProperty (Property.New ("fixme:to", message.To)); indexable.AddProperty (Property.New ("fixme:from", message.From)); indexable.AddProperty (Property.New ("fixme:offset", message.Offset)); StringReader reader = new StringReader (message.Body); indexable.SetTextReader (reader); return indexable; }
protected abstract Indexable MessageToIndexable (Message message);
protected override Indexable MessageToIndexable (Message message) { Uri uri = new Uri (String.Format ("feed:///{0};id={1}", message.Path, message.Id)); Indexable indexable = new Indexable (uri); indexable.MimeType = "text/html"; indexable.Type = "FeedItem"; indexable.AddProperty (Property.New ("fixme:client", "mozilla")); indexable.AddProperty(Property.New ("dc:title", message.Subject)); indexable.AddProperty(Property.New ("fixme:author", message.From)); //indexable.AddProperty(Property.NewDate ("fixme:published", item.PubDate)); indexable.AddProperty(Property.NewUnsearched ("fixme:itemuri", message.Headers ["Content-Base"])); indexable.AddProperty (Property.New ("fixme:offset", message.Offset)); StringReader reader = new StringReader (message.Body); indexable.SetTextReader (reader); return indexable; }