Hi,
I have indexed some information from a database using the dotNet
port of Lucene. If I index a field as a keyword then Lucene does not
pick it up when searching. If I index the field as text then Lucene
finds it. Here is a sample of the code. If anyone can see why please
e-mail me at th**********@yahoo.com. This is somewhat urgent.
Indexer:
Document doc = new Document();
doc.Add (Field.Text ("director_name",
dRow["director_name"].ToString())); // Works
doc.Add (Field.Keyword ("director_name",
dRow["director_name"].ToString())); // Does not work
Searcher:
Query qry = QueryParser.Parse ("director_name:Donovan", "", new
StandardAnalyzer());
m_hits = m_indexSearcher.Search (qry);
I am using a StandardAnalyzer for both indexing and searching.
Cheers,
JD