Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@apache.org Received: (qmail 41061 invoked from network); 19 Dec 2001 17:15:37 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 19 Dec 2001 17:15:37 -0000 Received: (qmail 5057 invoked by uid 97); 19 Dec 2001 17:15:19 -0000 Delivered-To: qmlist-jakarta-archive-lucene-user@jakarta.apache.org Received: (qmail 5033 invoked by uid 97); 19 Dec 2001 17:15:18 -0000 Mailing-List: contact lucene-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Users List" Reply-To: "Lucene Users List" Delivered-To: mailing list lucene-user@jakarta.apache.org Received: (qmail 5015 invoked from network); 19 Dec 2001 17:15:18 -0000 Message-ID: <16f501c188b1$2d01b4c0$0102000a@cardiweb.com> From: "Mike Baroukh" To: "Lucene Users List" References: <1008775113.8024.19.camel@bender> Subject: Re: Deleting problem Date: Wed, 19 Dec 2001 18:18:28 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi. Maybe it's the same problem that I asked for and Otis Gospodnetic has just answered (Many thanks !) : If your analyzer convert tokens to lower case, then you must use lower case value to search with IndexReader. You can see it with TermEnum and look at values taht are really stored in the index ... ----- Original Message ----- From: "Stephan J. Schmidt" To: Sent: Wednesday, December 19, 2001 4:17 PM Subject: Deleting problem > Hi, > > I have problems deleting documents from the index. > The documents are indexed with an unique OID. Searching > for this OID returns some documents but deleting > this OID returns 0 for deleted documents. > > Searcher searcher = new IndexSearcher("/opt/server/neotis/solent/kindex"); > > String oidString = "E78180808080808080808080808080neotis"; > Query query = QueryParser.parse(oidString, "OID", new OIDAnalyzer()); > > Hits hits = searcher.search(query); > > int start = 0; > final int HITS_PER_PAGE = 10; > int end = Math.min(HITS_PER_PAGE, hits.length()); > > // Documents are found here > for(int i = start; i < end; i++) { > System.out.println(hits.doc(i).get("Name")+" OID:"+hits.doc(i).get("OID")); > } > > searcher.close(); > > // Returns "0" for deleted documents and documents are not deleted > IndexReader reader = IndexReader.open("/opt/server/neotis/solent/kindex"); > System.err.println("Deleted: " + reader.delete(new Term("OID", oidString))) > > Thanks, > bye > -stephan > > > -- > To unsubscribe, e-mail: > For additional commands, e-mail: > > -- To unsubscribe, e-mail: For additional commands, e-mail: