Hi,
I have a function
void CouchLuceneUpdater::write_doc(const char* target, Document* doc,
Analyzer* an, bool append)
{
// open in append mode
IndexWriter *writer = _CLNEW IndexWriter(target , an, append);
writer->addDocument(doc); // works fine if I comment this line out!
writer->flush();
writer->optimize();
writer->close();
_CLDELETE(writer);
}
where if I have the addDocument enabled then sooner or later I get an
error (the executable crashes) in the document destructor
Document::~Document(){
//Func - Destructor
//Pre - true
//Post - Instance has been destroyed
boost = 1.0f;
_CLDELETE(_fields);
}
when it tries to delete the fields
I create the document and call the function as
Document config;
config.add(*_CLNEW Field(_T(SEQ_NUM_FIELD),
wseq_string,
Field::STORE_YES | Field::INDEX_TOKENIZED));
write_doc(target, &config, &an, true);
have I done something obviously wrong?
thanks,
Norman
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
CLucene-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/clucene-developers