Hi Otis, Won't that delete all documents with term1, then all documents with term2...rather than deleting all documents that contain only term1 and term2...or am I missing the obvious and doing something wrong?
Thanks, Josh Otis Gospodnetic wrote: > Heh, I have to try the obvious - two reader.delete(term) calls? > > Otis > > ----- Original Message ---- > From: Josh Joy <[EMAIL PROTECTED]> > To: java-user@lucene.apache.org > Sent: Tuesday, September 26, 2006 10:04:13 PM > Subject: Multiple Terms, Delete From Index > > Hi All, > > I need to delete from the index where 2 terms are > matching, rather than > just one term. > For example, > > IndexReader reader =ndexReader.open(dir); > Term[] terms =ew Term[2]; > terms[0] =ew Term("city","city1"); > terms[1] =ew Term("state","state1"); > reader.delete(terms); > reader.close(); > > Any suggestions? > > Thanks in advance, > Josh > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]