Hi.

I've got a question about indexing documents with CLucene.

I've got an exception (*Unhandled exception at 0x02f9d58a (autoreply.dll) in
miranda32.exe: 0xC0000005: Access violation reading location 0xccccccd0.*)
when I've called my method to index a text for me.

That's my method:

void Index::NewDoc (const char *contents)
{
    Document* doc = _CLNEW Document();

    doc->add(*_CLNEW Field(_T("contents"), _T(contents), Field::STORE_YES |
Field::INDEX_TOKENIZED));

    this->writer->addDocument(doc);
    _CLDELETE(doc);
}

Consider this->writer already instanciated in my class Index. I debuged
until I couldn't go deeper and O stopped in the line which is throwing the
exception: line 282 from DocumentWriter.cpp method invertDocument().

void DocumentWriter::invertDocument(const Document* doc) {
...
    CL_NS(analysis)::TokenStream* stream = analyzer->tokenStream(fieldName,
reader);
...
}

Have you ever faced this before? What have I missed?

[]'s
Emerson de Lira Espínola
** <emersonespin...@gmail.com>
<https://profiles.google.com/emersonespinola/buzz?hl=pt-BR>
<http://www.quora.com/emersonespinola>
<http://www.facebook.com/emersonespinola>
<http://www.linkedin.com/in/emersonespinola>
<http://spaces.live.com/profile.aspx?mem=emersonespin...@hotmail.com>
<http://emersonespinola.blogspot.com> <http://twitter.com/emersonespinola>
<http://www.myebook.com/emersonespinola/>

 <http://www.myebook.com/emersonespinola/>
------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
CLucene-developers mailing list
CLucene-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/clucene-developers

Reply via email to