lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kelvin Tan <kelvin-li...@relevanz.com>
Subject Re: QueryParser Help
Date Wed, 02 Feb 2005 23:16:41 GMT
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-
> unsubscribe@jakarta.apache.org For additional commands, e-mail:
> lucene-user-help@jakarta.apache.org



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