Hi, Its Ershad here.I am working on lucene. Now i am able to search the word.But if i type part of word, i am unable to get the results. Can you pls suggest what to be done.
For indexing, i am using the below code
writer = new IndexWriter(directory, new StandardAnalyzer(), true);
writer.SetUseCompoundFile(true);
doc.Add(Field.UnStored("text", parseHtml(html)));
doc.Add(Field.Keyword("path", relativePath));
writer.AddDocument(doc);
For searching, i am using the below code.
Query query = QueryParser.Parse(this.Query,"text",new StandardAnalyzer());
// create the result DataTable
this.Results.Columns.Add("title", typeof(string));
this.Results.Columns.Add("sample", typeof(string));
this.Results.Columns.Add("path", typeof(string));
// search
Hits hits = searcher.Search(query);
this.total = hits.Length();