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