lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maik Schreiber <blizzy-keyword-lucene_user.f54...@blizzy.de>
Subject Re: QueryParser Help
Date Wed, 02 Feb 2005 23:15:23 GMT
> But, I know "name" contains 2 documents, I also know "desc" contains one.
> This may be a dumb question but why does Hits not contain pointers to 3
> results (1 from name, 2 from desc)?

Your search is an OR search, which is why you get a union of search hits. 
Consider these documents (which I think you have in your index):

Document 1:
- name=mario
- desc=mario

Document 2:
- name=mario
- desc=foo


- Searching for "mario" in field "name" would return 2 hits.
- Searching for "mario" in field "desc" would return 1 hit.
- Searching for "mario" in both fields would return 2 hits (which is what 
you're seeing).

-- 
Maik Schreiber   *   http://www.blizzy.de

GPG public key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x1F11D713
Key fingerprint: CF19 AFCE 6E3D 5443 9599 18B5 5640 1F11 D713

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message