lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <erickerick...@gmail.com>
Subject Re: Combining hits
Date Thu, 23 Jul 2009 18:57:33 GMT
What do you mean by "first"? Would you want to process a doc thatdid NOT
have a "Term 3"?

Let's say you have the following:
doc1: "Term 1"
doc2: "Term 2"
doc3: "Term 1" "Term 2"
doc4: "Term 3"
doc5: "Term 1" "Term 2" "Term 3"
doc6: "Term 2" "Term 3"

Which docs do you want to get from your search? And does order really
matter?

Best
Erick



On Thu, Jul 23, 2009 at 2:29 PM, Max Lynch <ihasmax@gmail.com> wrote:

> Hi,
> I am doing a search on my index for a query like this:
>
> query = "\"Term 1\" \"Term 2\" \"Term 3\""
>
> Where I want to find Term 1, Term 2 and Term 3 in the index.  However, I
> only want to search for "Term 3" if I find "Term 1" and "Term 2" first, to
> avoid doing processing on hits that only contain "Term 3".  To do this, I
> was thinking of doing a search for "\"Term 1\" \"Term 2\"" and then if
> there
> are hits for these terms, I would do another search for "Term 3" on these
> resulting documents.  I am running a background search so I am not too
> worried performance issues caused by searching twice.
>
> Is there a way to search on subset of documents and then combining the hits
> for the document?  For example, if Term 1 and Term 2 are found in
> Document1,
> and Term3 is also later found in Document1, I want to be able to process
> the
> hits on my highlighter as containing all three terms.
>
> Sorry if it's confusing.
>
> Thanks,
> Max
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message