Re: How is incrementToken supposed to detect the lack of reset()?

2014-01-07 Thread Benson Margulies
Yes I Do. On Tue, Jan 7, 2014 at 3:59 PM, Robert Muir wrote: > Benson, do you want to open an issue to fix this constructor to not > take Reader? (there might be one already, but lets make a new one). > > These things are supposed to be reused, and have setReader for that > purpose. i think its

Re: How is incrementToken supposed to detect the lack of reset()?

2014-01-07 Thread Robert Muir
Benson, do you want to open an issue to fix this constructor to not take Reader? (there might be one already, but lets make a new one). These things are supposed to be reused, and have setReader for that purpose. i think its confusing and contributes to bugs that you have to have logic in e.g. the

Re: How is incrementToken supposed to detect the lack of reset()?

2014-01-07 Thread Benson Margulies
For the record of other people who implement tokenizers: Say that your tokenizer has a constructor, like: public MyTokenizer(Reader reader, ) { super(reader); myWrappedInputDevice = new MyWrappedInputDevice(reader); } Not a good idea. Tokenizer carefully manages the da

Re: How is incrementToken supposed to detect the lack of reset()?

2014-01-07 Thread Robert Muir
See Tokenizer.java for the state machine logic. In general you should not have to do anything if the tokenizer is well-behaved (e.g. close calls super.close() and so on). On Tue, Jan 7, 2014 at 2:50 PM, Benson Margulies wrote: > In 4.6.0, > org.apache.lucene.analysis.BaseTokenStreamTestCase#ch

How is incrementToken supposed to detect the lack of reset()?

2014-01-07 Thread Benson Margulies
In 4.6.0, org.apache.lucene.analysis.BaseTokenStreamTestCase#checkResetException fails if incrementToken fails to throw if there's a missing reset. How am I supposed to organize this in a Tokenizer? A quick look at CharTokenizer did not reveal any code for the purpose. --

Re: Slow Index Writes

2014-01-07 Thread Ian Lea
I don't have a working example but I believe it's pretty straightforward. See DirectoryReader.open() and .openIfChanged(). -- Ian. On Tue, Jan 7, 2014 at 1:41 PM, Klaus Schaefers wrote: > Hi, > > > I was looking for some examples but I just found some using an NRTManager > class? In Lucene 4

Re: Slow Index Writes

2014-01-07 Thread Klaus Schaefers
Hi, I was looking for some examples but I just found some using an NRTManager class? In Lucene 4.5 I cannot find the class (missing a maven dependency?). Can anyone point me to a working example? Cheers, Klaus On Fri, Jan 3, 2014 at 11:49 AM, Ian Lea wrote: > You will indeed get poor perfo

Re: Delete a field in old documents

2014-01-07 Thread Ian Lea
You'll have to reindex. -- Ian. On Mon, Jan 6, 2014 at 2:11 PM, manoj raj wrote: > Hi, > > I have stored fields. I want to delete a single field in all documents. Can > i do that without reindexing? if yes, is it costly operations..? > > > Thanks, > Manoj.