Prepping for monodoc move from monodoc/engine to mcs/class/monodoc...
[mono.git] / mcs / class / monodoc / SearchableDocument.cs
1 //
2 //
3 // SearchableDocument.cs: Abstracts our model of document from the Lucene Document 
4 //
5 // Author: Mario Sopena
6 //
7 using Monodoc.Lucene.Net.Documents;
8
9 namespace Monodoc {
10 struct SearchableDocument {
11         public string title;
12         public string url;
13         public string hottext;
14         public string text;
15         public string examples;
16
17         public Document LuceneDoc {
18                 get {
19                         Document doc = new Document ();
20                         doc.Add (Field.UnIndexed ("title", title));
21                         doc.Add (Field.UnIndexed ("url", url));
22                         doc.Add (Field.UnStored ("hottext", hottext));
23                         doc.Add (Field.UnStored ("text", text));
24                         doc.Add (Field.UnStored ("examples", examples));
25                         return doc;
26                 }
27         }
28 }
29 }