Results 1 to 2 of 2
  1. #1
    ilyaz is offline Member
    Join Date
    Jun 2011
    Posts
    10
    Rep Power
    0

    Default how can I find query hit positions in original contents?

    Suppose I have a document collection that I have indexed in Lucene. I submit a query and get hits. Now what I want is to find where in a particular document hit(s) occur(s). I know that I can use the Lucene Highlighting classes to obtain relevant fragments. But how can I find out where exactly these fragments appear in the original contents?

    A related question is how to make sure the found fragments are actually very close to the original query? I noticed in my experiments with highlighting that often I would have a multi-word query and it would return fragments that would have only some of these words. But what if I want to make sure I get hits with all the words?

    Thanks!

  2. #2
    Jayshri is offline Member
    Join Date
    Nov 2011
    Posts
    7
    Rep Power
    0

    Default Re: how can I find query hit positions in original contents?

    If you are using multi-word query and want document if only its having all words then in query use occurrence 'must'.
    It will ensure you that documents having all words you are searching for.

    Hope it helps you!

Similar Threads

  1. Original JOptionPane Color
    By jiffi in forum New To Java
    Replies: 9
    Last Post: 10-14-2011, 01:51 AM
  2. Close a JFrame, but keep the original open.
    By nolsen01 in forum AWT / Swing
    Replies: 3
    Last Post: 06-13-2011, 11:28 PM
  3. Getting to original File location
    By ravjot28 in forum New To Java
    Replies: 2
    Last Post: 02-28-2010, 04:00 PM
  4. Replies: 1
    Last Post: 02-23-2010, 09:48 AM
  5. Proxy or Original...!
    By Shiv in forum New To Java
    Replies: 1
    Last Post: 04-11-2009, 03:32 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
  •