Lucene Keywords not matching

T

the_kiddie98

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 (e-mail address removed). 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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,233
Latest member
AlyssaCrai

Latest Threads

Top