Can you provide more information? Your syntax looks ok. Is it possible that one of the docs have been deleted? Sounds stupid, but have you tried searching via a manual query, or using one of the Lucene index browsers?
Kelvin On Wed, 2 Feb 2005 18:05:47 -0500, Luke Shannon wrote: > 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- >[EMAIL PROTECTED] For additional commands, e-mail: >[EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]