Hi
I have the following code which uses Lucene to index documents,
however I want to be able to use lucene to search upon the field
summary (this is a bit of text the user supplies). Should I save the
summary as a seperate file and use lucene to index this as well or is
their another way to get summary to be searchable? In the docs it says
Field.Text(string name, string val) - field value is stored, indexed
and tokenized
This implies that summary should be searchable but it is not
Any thoughts will be much appreciated, many thanks Rippo
....
Document doc = new Document();
StreamReader sr = new StreamReader(path,
System.Text.Encoding.Default);
//add document attributes to index
doc.Add(Field.Text("text", sr));
doc.Add(Field.Text("summary", summary));
doc.Add(Field.Keyword("filename",
Path.GetFileName(path).ToString()));
writer.AddDocument(doc);
sr.Close();
writer.Close();
....