Return-Path: X-Original-To: apmail-lucene-lucene-net-user-archive@www.apache.org Delivered-To: apmail-lucene-lucene-net-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 61E5DCE48 for ; Tue, 26 Jun 2012 19:20:21 +0000 (UTC) Received: (qmail 54380 invoked by uid 500); 26 Jun 2012 19:20:20 -0000 Delivered-To: apmail-lucene-lucene-net-user-archive@lucene.apache.org Received: (qmail 54341 invoked by uid 500); 26 Jun 2012 19:20:20 -0000 Mailing-List: contact lucene-net-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: lucene-net-user@lucene.apache.org Delivered-To: mailing list lucene-net-user@lucene.apache.org Received: (qmail 54329 invoked by uid 99); 26 Jun 2012 19:20:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Jun 2012 19:20:20 +0000 X-ASF-Spam-Status: No, hits=-5.0 required=5.0 tests=RCVD_IN_DNSWL_HI,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [134.134.136.24] (HELO mga09.intel.com) (134.134.136.24) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Jun 2012 19:20:15 +0000 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 26 Jun 2012 12:19:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.67,351,1309762800"; d="scan'208";a="163021783" Received: from fmsmsx107.amr.corp.intel.com ([10.19.9.54]) by orsmga002.jf.intel.com with ESMTP; 26 Jun 2012 12:19:49 -0700 Received: from fmsmsx152.amr.corp.intel.com (10.19.17.221) by FMSMSX107.amr.corp.intel.com (10.19.9.54) with Microsoft SMTP Server (TLS) id 14.1.355.2; Tue, 26 Jun 2012 12:19:49 -0700 Received: from fmsmsx102.amr.corp.intel.com ([169.254.2.110]) by fmsmsx152.amr.corp.intel.com ([169.254.7.22]) with mapi id 14.01.0355.002; Tue, 26 Jun 2012 12:19:49 -0700 From: "Lingam, ChandraMohan J" To: "lucene-net-user@lucene.apache.org" Subject: RE: SPAM-HIGH: Disparity between API usage and Luke Thread-Topic: SPAM-HIGH: Disparity between API usage and Luke Thread-Index: AQHNU8xdelv0YNsPMUSyU/7ooekGWZcNa7KA//+L4HA= Date: Tue, 26 Jun 2012 19:19:49 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.1.200.107] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 >> var query =3D _parser.Parse("Id:BAUER*"); In your code, most likely, the value got converted to lower case (i.e. baue= r*) by the parse statement. Whereas indexed value is in upper case as it is not analyzed (from screen s= hot). Can you explicitly try using prefix query? > Same results, apparently, when I use Luke 1.0.1. > > When I search for "Id:BAUER*" I get 15 hits in Luke, but in my custom=20 > app, zero. > > On Tue, Jun 26, 2012 at 12:31 PM, Rob Vesse wrote: > > > You appear to be using Luke 3.5 which per the information on the=20 > > Luke homepage (http://code.google.com/p/luke/) uses Lucene 3.5 > > > > Since Lucene.Net is currently on 2.9.4 I wouldn't be surprised to=20 > > see different behavior between the API and executing in Luke. > > > > If you use a version of Luke which more closely aligns with the=20 > > version > of > > Lucene.Net (Luke 1.0.1 uses Lucene 3.0.1 which should be close=20 > > enough since the 2.9.x releases were previews of the 3.0.x releases=20 > > as I understood it) what behavior do you see? > > > > Hope this helps, > > > > Rob > > > > On 6/26/12 10:50 AM, "Rob Cecil" wrote: > > > > >If I run a query against my index using QueryParser to query a field: > > > > > > var query =3D _parser.Parse("Id:BAUER*"); > > > var topDocs =3D searcher.Search(query, 10); > > > Assert.AreEqual(count, topDocs.TotalHits); > > > > > >I get 0 for my TotalHits, yet in Luke, the same query phrase yields=20 > > >15 results, what am I doing wrong? I use the StandardAnalyzer both=20 > > >to create the index and to query. > > > > > >The field is defined as: > > > > > >new Field("Id", myObject.Id, Field.Store.YES,=20 > > >Field.Index.NOT_ANALYZED) > > > > > >and is a string field. The result set back from Luke looks like > > >(screencap): > > > > > >http://screencast.com/t/NooMK2Rf > > > > > >Thanks! > > > > > > > > > > >