lucenenet-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Cecil <>
Subject Disparity between API usage and Luke
Date Tue, 26 Jun 2012 17:50:59 GMT
If I run a query against my index using QueryParser to query a field:

                var query = _parser.Parse("Id:BAUER*");
                var topDocs = searcher.Search(query, 10);
                Assert.AreEqual(count, topDocs.TotalHits);

I get 0 for my TotalHits, yet in Luke, the same query phrase yields 15
results, what am I doing wrong? I use the StandardAnalyzer both to
create the index and to query.

The field is defined as:

new Field("Id", myObject.Id, Field.Store.YES, Field.Index.NOT_ANALYZED)

and is a string field. The result set back from Luke looks like (screencap):


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