lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luke Shannon" <lshan...@futurebrand.com>
Subject QueryParser Help
Date Wed, 02 Feb 2005 23:05:47 GMT
Hello;

Getting squinted with Query Parsing.  I have a questions:

Query query = MultiFieldQueryParser
            .parse("mario", new String[] { "name", "desc" }, new int[] {
                    MultiFieldQueryParser.NORMAL_FIELD,
MultiFieldQueryParser.NORMAL_FIELD }, new StandardAnalyzer());
IndexSearcher searcher = new IndexSearcher(fsDir);
            Hits hits = searcher.search(query);
            System.out.printing("Keywords : " + hits.length()+ " " +
query.toString());
            assertEquals(2, hits.length());

This test is successful.

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)?

Thanks

Luke



---------------------------------------------------------------------
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