://www.thetaphi.de
eMail: u...@thetaphi.de
> -Original Message-
> From: Shai Erera [mailto:ser...@gmail.com]
> Sent: Sunday, November 22, 2009 8:26 PM
> To: java-user@lucene.apache.org
> Subject: Re: How to deal with Token in the new TS API
>
> Ok I see you fixed it at the
gt; Uwe Schindler
>> H.-H.-Meier-Allee 63, D-28213 Bremen
>> http://www.thetaphi.de
>> eMail: u...@thetaphi.de
>>
>>
>> > -Original Message-
>> > From: Uwe Schindler [mailto:u...@thetaphi.de]
>> > Sent: Sunday, November 22, 2009 8:03 PM
&
www.thetaphi.de
> eMail: u...@thetaphi.de
>
>
> > -Original Message-
> > From: Uwe Schindler [mailto:u...@thetaphi.de]
> > Sent: Sunday, November 22, 2009 8:03 PM
> > To: java-user@lucene.apache.org
> > Subject: RE: How to deal with Token in the new TS A
age-
> From: Uwe Schindler [mailto:u...@thetaphi.de]
> Sent: Sunday, November 22, 2009 8:14 PM
> To: java-user@lucene.apache.org
> Subject: RE: How to deal with Token in the new TS API
>
> Another idea, what you can also do is, create an AttributeSource instance
> in
> your
-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: u...@thetaphi.de
> -Original Message-
> From: Shai Erera [mailto:ser...@gmail.com]
> Sent: Sunday, November 22, 2009 8:15 PM
> To: java-user@lucene.apache.org
> Subject: Re: How to deal with Token in the new TS API
&g
>
>
>
> -
>
> Uwe Schindler
>
> H.-H.-Meier-Allee 63, D-28213 Bremen
>
> http://www.thetaphi.de
>
> eMail: u...@thetaphi.de
>
>
>
> > -Original Message-
>
> > From: Shai Erera [mailto:ser...@gmail.com]
>
> > Se
://www.thetaphi.de
eMail: u...@thetaphi.de
> -Original Message-
> From: Uwe Schindler [mailto:u...@thetaphi.de]
> Sent: Sunday, November 22, 2009 8:03 PM
> To: java-user@lucene.apache.org
> Subject: RE: How to deal with Token in the new TS API
>
> I said, you *could* i
://www.thetaphi.de
eMail: u...@thetaphi.de
> -Original Message-
> From: Shai Erera [mailto:ser...@gmail.com]
> Sent: Sunday, November 22, 2009 7:53 PM
> To: java-user@lucene.apache.org
> Subject: Re: How to deal with Token in the new TS API
>
> Yes I can clo
> > Uwe Schindler
> > > H.-H.-Meier-Allee 63, D-28213 Bremen
> > > http://www.thetaphi.de
> > > eMail: u...@thetaphi.de
> > >
> > >
> > > > -Original Message-
> > > > From: Shai Erera [mailto:ser...@gmail.com]
> > > &
a
> TermAttribute.
> > > Any
> > > > ideas?
> > > >
> > > > Shai
> > > >
> > > >
> > > > On Sun, Nov 22, 2009 at 3:33 PM, Uwe Schindler
> > wrote:
> > > >
> > > >> Use captureState
gt; Boolean is set.
>
> Uwe
>
> -
> Uwe Schindler
> H.-H.-Meier-Allee 63, D-28213 Bremen
> http://www.thetaphi.de
> eMail: u...@thetaphi.de
>
>
> > -Original Message-
> > From: Shai Erera [mailto:ser...@gmail.com]
> > Sent: Sunday, Nove
D-28213 Bremen
http://www.thetaphi.de
eMail: u...@thetaphi.de
> -Original Message-
> From: Shai Erera [mailto:ser...@gmail.com]
> Sent: Sunday, November 22, 2009 3:28 PM
> To: java-user@lucene.apache.org
> Subject: Re: How to deal with Token in the new TS API
>
TokenStream. CachingTokenFilter does this.
>>
>> So the new API uses the State object to put away tokens for later
>> reference.
>>
>> -
>> Uwe Schindler
>> H.-H.-Meier-Allee 63, D-28213 Bremen
>> http://www.thetaphi.de
>> eMail: u...@thetaphi
.-H.-Meier-Allee 63, D-28213 Bremen
> http://www.thetaphi.de
> eMail: u...@thetaphi.de
>
> > -Original Message-
> > From: Shai Erera [mailto:ser...@gmail.com]
> > Sent: Sunday, November 22, 2009 2:29 PM
> > To: java-user@lucene.apache.org
> > Subject: Re:
://www.thetaphi.de
eMail: u...@thetaphi.de
> -Original Message-
> From: Shai Erera [mailto:ser...@gmail.com]
> Sent: Sunday, November 22, 2009 2:29 PM
> To: java-user@lucene.apache.org
> Subject: Re: How to deal with Token in the new TS API
>
> ok so from what I understand, I should
ok so from what I understand, I should stop working w/ Token, and move to
working w/ the Attributes.
addAttribute indeed does not work. Even though it does not through an
exception, if I call in.addAttribute(Token.class), I get a new instance of
Token and not the once that was added by in. So this
> But I do use addAttribute(Token.class), so I don't understand why you say
> it's not possible. And I completely don't understand why the new API
> allows
> me to just work w/ interfaces and not impls ... A while ago I got the
> impression that we're trying to get rid of interfaces because they're
But I do use addAttribute(Token.class), so I don't understand why you say
it's not possible. And I completely don't understand why the new API allows
me to just work w/ interfaces and not impls ... A while ago I got the
impression that we're trying to get rid of interfaces because they're not
easy
>
> I want to add Token.class, and then work w/ Token. Not TermAttribute,
> PosIncrAttribute, OffsetAttribute, PayloadAttribute and TypeAttribute
> (these
> are the five attributes I'm using from Token). Why can't the code add
> Token
> to the attributes map? If all of these are anyway mapped to t
> I started to migrate my Analyzers, Tokenizer, TokenStreams and
> TokenFilters
> to the new API. Since the entire set of classes handled Token before, I
> decided to not change it for now, and was happy to discover that Token
> extends AttributeImpl, which makes the migration easier.
>
> So I sta
Thanks Uwe for the response, however that doesn't get me anywhere. I already
know that Token is added once, and that after I add Token I cannot add more
of them. And I understand why the double printing.
I want to add Token.class, and then work w/ Token. Not TermAttribute,
PosIncrAttribute, Offset
> To add to my previous email, If I do the following:
>
> StringReader sr = new StringReader("hello world");
> TokenStream ts = new WhitespaceTokenizer(Token.TOKEN_ATTRIBUTE_FACTORY,
> sr);
>
> for (Iterator> iter =
> ts.getAttributeClassesIterator(); iter.hasNext();) {
> Class< ? extends Attri
To add to my previous email, If I do the following:
StringReader sr = new StringReader("hello world");
TokenStream ts = new WhitespaceTokenizer(Token.TOKEN_ATTRIBUTE_FACTORY, sr);
for (Iterator> iter =
ts.getAttributeClassesIterator(); iter.hasNext();) {
Class< ? extends Attribute> type = iter.
23 matches
Mail list logo