lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <...@thetaphi.de>
Subject RE: cloning a NumericTermAttributeImpl
Date Sat, 10 Jan 2015 12:23:44 GMT
Hi,

NumericTokenStream is an internal class to implement NumericField. It is only public for historical
reasons (was used by Solr) and because it is in another package. The Attributes it uses do
not implement clone, because they have some internal state. Cloning is also not needed, because
in "standard" Analyzers you would not see those TokenStreams. Lucene also never adds TokenFilters
on top.

Let me check if this TokenStream is really marked as @lucene.internal in Javadocs.

Uwe

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de


> -----Original Message-----
> From: Shaun Senecal [mailto:shaun.senecal@lithium.com]
> Sent: Thursday, January 08, 2015 8:06 PM
> To: java-user@lucene.apache.org
> Subject: cloning a NumericTermAttributeImpl
> 
> It appears that NumericTermAttributeImpl doesn't support cloning.  Is this
> simply an oversight, or is there a reason why this isnt possible?
> 
> 
> I'm trying to clone a State containing a NumericTermAttribute, and I end up
> with all of the BytesRefs being equal to the last instance, since the
> NumericTermAttributeImpl? isn't actually being cloned.  Is there a way
> around this?
> 
> 
> 
> Thanks
> 
> 
> Shaun


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message