3 // SearchableDocument.cs: Abstracts our model of document from the Lucene Document
5 // Author: Mario Sopena
7 using Lucene.Net.Documents;
11 struct SearchableDocument
15 public string fulltitle;
16 public string hottext;
18 public string examples;
20 public Document LuceneDoc {
22 Document doc = new Document ();
23 doc.Add (UnIndexed ("title", title));
24 doc.Add (UnIndexed ("url", url));
25 doc.Add (UnIndexed ("fulltitle", fulltitle ?? string.Empty));
26 doc.Add (UnStored ("hottext", hottext));
27 doc.Add (UnStored ("text", text));
28 doc.Add (UnStored ("examples", examples));
33 static Field UnIndexed(System.String name, System.String value_Renamed)
35 return new Field(name, value_Renamed, Field.Store.YES, Field.Index.NO);
38 static Field UnStored(System.String name, System.String value_Renamed)
40 return new Field(name, value_Renamed, Field.Store.NO, Field.Index.ANALYZED);