Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Lucene Keywords not matching

Thread Tools

Lucene Keywords not matching
Posts: n/a
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 Removed). This is somewhat urgent.

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

Query qry = QueryParser.Parse ("director_nameonovan", "", new
m_hits = m_indexSearcher.Search (qry);

I am using a StandardAnalyzer for both indexing and searching.



Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with Pattern matching. Matching multiple lines from while reading from a file. Bobby Chamness Perl Misc 2 05-03-2007 06:02 PM
how to use lucene api (Search Engine Java) Ezee Java 1 07-30-2005 07:32 PM
Jakarta Lucene MultiSearcher Question Java 0 01-12-2005 08:04 PM
Does Lucene have a sort feature? Son KwonNam Java 0 06-22-2004 05:05 PM
Pattern matching : not matching problem Marc Bissonnette Perl Misc 9 01-13-2004 05:52 PM