Hi Pini,

Thanks for the fix. I checked in a slightly different fix taken from our bug tracker. It also had a few tests. Let us know if there's anything else left to fix, and feel free to add your own tests.


Itamar.


On 23/12/2010 7:41 PM, pini shamgar wrote:

Hi,

I found a bug in the StandardAnalyzer. Due to it I could not search and find an IP address.

The bug is in the reuse of StandardTokenizer object.

Bellow a fixed presented:

The fix is in 3 flies:

1)In core\CLucene\analysis\standard\StandardTokenizer.cpp

void StandardTokenizer::reset(Reader* _input) {

rdPos= -1;

tokenStart = -1;

this->input = _input;

if (rd->input==NULL) {

rd->reset(_input->__asBufferedReader());

}

}

2)In core\CLucene\util\_FastCharStream.h

Add the method

void reset(BufferedReader* reader);

3)In core\CLucene\util\FastCharStream.cpp

FastCharStream::FastCharStream(BufferedReader* reader)

{

reset(reader);

input->setMinBufSize(maxRewindSize);

}

FastCharStream::~FastCharStream(){

}

void FastCharStream::reset(BufferedReader* reader)

{

pos = 0;

rewindPos = 0;

resetPos = 0;

col = 1;

line = 1;

input = reader;

}

Cheers

Pini Shamgar





------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl


_______________________________________________
CLucene-developers mailing list
CLucene-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/clucene-developers
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
CLucene-developers mailing list
CLucene-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/clucene-developers

Reply via email to