My mistake... thanks Yonik On Fri, Nov 25, 2011 at 12:08 PM, <[email protected]> wrote: > Author: yonik > Date: Fri Nov 25 17:08:33 2011 > New Revision: 1206262 > > URL: http://svn.apache.org/viewvc?rev=1206262&view=rev > Log: > LUCENE-3590: fix solr breakage due to bytesref changes > > Modified: > lucene/dev/trunk/solr/webapp/web/admin/analysis.jsp > > Modified: lucene/dev/trunk/solr/webapp/web/admin/analysis.jsp > URL: > http://svn.apache.org/viewvc/lucene/dev/trunk/solr/webapp/web/admin/analysis.jsp?rev=1206262&r1=1206261&r2=1206262&view=diff > ============================================================================== > --- lucene/dev/trunk/solr/webapp/web/admin/analysis.jsp (original) > +++ lucene/dev/trunk/solr/webapp/web/admin/analysis.jsp Fri Nov 25 17:08:33 > 2011 > @@ -159,7 +159,7 @@ > final BytesRef bytes = bytesAtt.getBytesRef(); > while (tstream.incrementToken()) { > bytesAtt.fillBytesRef(); > - matches.add(new BytesRef(bytes)); > + matches.add(BytesRef.deepCopyOf(bytes)); > } > } > > @@ -282,12 +282,12 @@ > Tok(AttributeSource token, int pos, FieldType ft) { > this.pos = pos; > TermToBytesRefAttribute termAtt = > token.getAttribute(TermToBytesRefAttribute.class); > - BytesRef spare = termAtt.getBytesRef(); > - termAtt.fillBytesRef(); > - bytes = new BytesRef(spare); > + BytesRef termBytes = termAtt.getBytesRef(); > + termAtt.fillBytesRef(); > + bytes = BytesRef.deepCopyOf(termBytes); > + text = ft.indexedToReadable(bytes, new CharsRef()).toString(); > rawText = (token.hasAttribute(CharTermAttribute.class)) ? > token.getAttribute(CharTermAttribute.class).toString() : null; > - text = ft.indexedToReadable(bytes, new CharsRef()).toString(); > token.reflectWith(new AttributeReflector() { > public void reflect(Class<? extends Attribute> attClass, String key, > Object value) { > // leave out position and raw term > > >
-- lucidimagination.com --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
