I am Not getting The "Lucene.Net.Documents.Field.Store.Yes" or other options like index etc. Is it there another DLL for this? 开发者_Go百科Or which namespace I should use?
As far as I recall my Lucene experience some years ago. The attribute Store.Yes indicate wheter the field is stored along the index.
What is the difference between storing and indexing: Well when you declare a field to be part of the index you can find documents using the field in the query. When you declare a field to be stored you can retrieve a found document including that document (e.g. for displaying it or for using it as a reference to the data store).
Hope that helps.
Add Lucene.net.dll to your references
add a line to use the Lucene.Net.Documents namespace
using LUDoc = Lucene.Net.Documents;
In you code
LUDoc.Document luceneDoc;
luceneDoc = new LUDoc.Document();
Example code to add data to your document
luceneDoc.Add(new LUDoc.Field("path", myFilename.ToLower(), LUDoc.Field.Store.YES,
LUDoc.Field.Index.UN_TOKENIZED))
It is not clear if the above explanation was required or whether it is a issue with Intellisense. If the options are not appearing when you enter the code into VS, then it could be Intellisense that is not kicking in. Look for help on Intellisense if that is the case.
Hope this helps.
精彩评论