RE: new TokenStream api Question

2009-04-28 Thread Uwe Schindler
] Sent: Tuesday, April 28, 2009 10:23 AM To: java-dev@lucene.apache.org Subject: Re: new TokenStream api Question Hi Eks Dev, I actually started experimenting with changing the new API slightly to overcome one drawback: with the variables now distributed over various Attribute classes (vs. being

Re: new TokenStream api Question

2009-04-28 Thread eks dev
Subject: Re: new TokenStream api Question Hi Eks Dev, I actually started experimenting with changing the new API slightly to overcome one drawback: with the variables now distributed over various Attribute classes (vs. being in a single class Token previously), cloning a Token (i.e. calling

Re: new TokenStream api Question

2009-04-28 Thread Michael McCandless
, easier user code and performance (token filters mainly) - Original Message From: Uwe Schindler u...@thetaphi.de To: java-dev@lucene.apache.org Sent: Sunday, 26 April, 2009 23:03:06 Subject: RE: new TokenStream api Question There is one problem: if you extend TermAttribute

Re: new TokenStream api Question

2009-04-27 Thread eks dev
cases for this are along the lines of my example, smaller, easier user code and performance (token filters mainly) - Original Message From: Uwe Schindler u...@thetaphi.de To: java-dev@lucene.apache.org Sent: Sunday, 26 April, 2009 23:03:06 Subject: RE: new TokenStream api Question

new TokenStream api Question

2009-04-26 Thread eks dev
I am just looking into new TermAttribute usage and wonder what would be the best way to implement PrefixFilter that would filter out some Terms that have some prefix, something like this, where '-' represents my prefix: public final boolean incrementToken() throws IOException { // the

RE: new TokenStream api Question

2009-04-26 Thread Uwe Schindler
[mailto:eks...@yahoo.co.uk] Sent: Sunday, April 26, 2009 10:39 PM To: java-dev@lucene.apache.org Subject: new TokenStream api Question I am just looking into new TermAttribute usage and wonder what would be the best way to implement PrefixFilter that would filter out some Terms that have

Re: new TokenStream api Question

2009-04-26 Thread eks dev
, 26 April, 2009 23:03:06 Subject: RE: new TokenStream api Question There is one problem: if you extend TermAttribute, the class is different (which is the key in the attributes list). So when you initialize the TokenStream and do a YourClass termAtt = (YourClass) addAttribute(YourClass.class

Re: new TokenStream api Question

2009-04-26 Thread eks dev
array. */ public int termLength() { initTermBuffer(); return termLength; } - Original Message From: Uwe Schindler u...@thetaphi.de To: java-dev@lucene.apache.org Sent: Sunday, 26 April, 2009 23:03:06 Subject: RE: new TokenStream api Question There is one problem: if you