IndexWriter.deleteDocuments(Term) only deletes one at a time

2012-05-17 Thread Edward W. Rouse
urn writer; } } Edward W. Rouse Comsquared System, Inc. 770-734-5301 - To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org

RE: IndexWriter.deleteDocuments(Term) only deletes one at a time

2012-05-17 Thread Edward W. Rouse
Never mind, turns out the Term isn't matching for some as yet unknown reason and the feedback in my logs was misleading. Sorry for the noise. > -Original Message- > From: Edward W. Rouse [mailto:ero...@comsquared.com] > Sent: Thursday, May 17, 2012 10:19 AM &

NullPointerException using IndexReader.termDocs when there are no matches

2012-05-17 Thread Edward W. Rouse
. Instead I get the NPE when trying td.doc(). I can wrap the code in a try/catch for that line, but I think there must be a better way to determine if I got any matches for a Term. Edward W. Rouse Comsquared System, Inc. 770-734-5301

RE: NullPointerException using IndexReader.termDocs when there are no matches

2012-05-18 Thread Edward W. Rouse
> > Mike McCandless > > http://blog.mikemccandless.com > > On Thu, May 17, 2012 at 5:52 PM, Edward W. Rouse > wrote: > > Lucene 3.6, java 1.6 I get the following: > > > > java.lang.NullPointerException at > > > org.apache.lucene.index.DirectoryReader$Multi

RE: old fashioned....."Too many open files"!

2012-05-18 Thread Edward W. Rouse
Have you tried adding im.commit() after adding a document? Could be all of the uncommitted documents are leaving files open. > -Original Message- > From: Michel Blase [mailto:mblas...@gmail.com] > Sent: Friday, May 18, 2012 1:24 PM > To: java-user@lucene.apache.org > Subject: Re: old fashi

RE: old fashioned....."Too many open files"!

2012-05-18 Thread Edward W. Rouse
commit after each insert should be really expensive and > unnecessary! no? > > On Fri, May 18, 2012 at 10:31 AM, Edward W. Rouse > wrote: > > > Have you tried adding im.commit() after adding a document? Could be > all of > > the uncommitted documents are leaving fi

RE: IndexReader.deleteDocument in Lucene 3.6

2012-05-25 Thread Edward W. Rouse
To ensure deletion I use a while loop with a counter (to prevent an endless loop if there's a problem) Term term = this.createIdTerm(id); Int count = 0; while(readDocument(indexName, id) != null) { count++; log.debug("deleting document " + id + " from index " + indexN

RE: delete by docid in lucene 4

2012-07-12 Thread Edward W. Rouse
I get around this by creating an id based term like: new Term(Constants.DEFAULT_ID_FIELD, id) > -Original Message- > From: Sean Bridges [mailto:sean.brid...@gmail.com] > Sent: Wednesday, July 11, 2012 9:09 PM > To: java-user@lucene.apache.org > Subject: delete by docid in lucene 4 > > Is

RE: delete by docid in lucene 4

2012-07-12 Thread Edward W. Rouse
> Sent: Thursday, July 12, 2012 11:50 AM > To: java-user@lucene.apache.org > Subject: Re: delete by docid in lucene 4 > > Does that return a Term which matches the lucene docId? What is the > value of Constants.DEFAULT_ID_FIELD ? > > Thanks, > Sean > > On Thu, J

short search terms

2012-09-26 Thread Edward W. Rouse
acter search string. There is one setMinWordLen, but it isn't applicable here. I did see a TokenStream LengthFilter, but can't figure out if I can apply it in this case. How do I set Lucene to allow for results from short search strings?

RE: short search terms

2012-09-26 Thread Edward W. Rouse
ry-methods. > > Best regards, > > Arjen > > On 26-9-2012 22:47 Edward W. Rouse wrote: > > I have a key field that will only ever have a length of 3 characters. > I am > > using a StandardAnalyzer and a QueryParser to create the Query > > (parser.parse(string)

RE: short search terms

2012-09-26 Thread Edward W. Rouse
I have an index and one of the items to search for is an identifier that will always be 3 characters, like ABC or XYZ. If I do a search for ABC I get no matches. If I add 1 more character so that ABC becomes ABCD and search for ABCD, it matches. I have been looking through the code (I inherited and

RE: short search terms

2012-09-27 Thread Edward W. Rouse
to do a > wildcard search. Add * at the end of the search query (ABC*). > > Regards > Aditya > www.findbestopensource.com > > > On Thu, Sep 27, 2012 at 3:05 AM, Edward W. Rouse > wrote: > > > I have an index and one of the items to search for is an identifi