Results 1 to 3 of 3
  1. #1
    rnamboodiri is offline Member
    Join Date
    Oct 2011
    Posts
    2
    Rep Power
    0

    Default Return search file contents instead of the file names

    I am using the demo program that is coming with lucene. I have some text files in a directory. When I run the demo program, it returns the list of files containing the search key word. If I have to return the file contents also (containing the search key words), how do I change the indexes..or how do I do that? Thanks
    -Raj

  2. #2
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,641
    Rep Power
    7

    Default Re: Return search file contents instead of the file names

    Add the path of the file to the index. Search the index, get the file path from the index, and read the file.

  3. #3
    rnamboodiri is offline Member
    Join Date
    Oct 2011
    Posts
    2
    Rep Power
    0

    Default Re: Return search file contents instead of the file names

    Thanks doWhile. From the path, I can read the file but the real problem is in extracting only the exact hits that the original query has encountered. How do we do that? Thanks
    -Raj

Similar Threads

  1. Replies: 9
    Last Post: 10-20-2009, 10:52 AM
  2. Replies: 2
    Last Post: 05-11-2009, 10:07 AM
  3. Replies: 7
    Last Post: 11-19-2008, 02:09 PM
  4. Replies: 9
    Last Post: 07-10-2008, 04:52 PM
  5. Adding file names(Help!!)
    By Gambit17 in forum New To Java
    Replies: 4
    Last Post: 11-09-2007, 07:26 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •