Several things (on a "quick look" basis).

I don't see where you are retrieving the document fields you index. You're
indexing "resume_name" and "details" fields. But your search code is trying
to get the "path" and "title" fields out of the document. They won't be
there. Of course, you may not have posted all the code....

It's not clear from the code whether you're writing to and reading from the
same index. In INDEX_DIR defined somewhere to be "index"? And do both
programs run from the same directory? This may be a silly question, but I've
spent waaaay too much time chasing down this kind of junk <G>.

The first thing I'd actually advise is getting a copy of Luke. Use it to
examine the index you built to see if it looks like what you expect. It
looked like the code you wrote printed out the query, so you might try using
Luke to search with that and see how many hits you get.

Hope this helps. Really, really, really get a copy of Luke. That's the first
place I turn to when I don't get the results I expect. See.

http://www.getopt.org/luke/

Best
Erick

Reply via email to