Hi Borek,
Yes, it works.
Thanks a lot.
BTW, do I need delete Field to free the memory?
Thanks a lot for your reply and help. wish you have a great day.
Yours,
Michael zhang
----- Original Message -----
From: kos...@tovek.cz
To: MICHAEL ZHANG (BLOOMBERG/ 731 LEXIN),
clucene-developers@lists.sourceforge.net
At: Oct 9 2013 14:34:05
You should pass dynamically allocated Field object, as you can see e.g. in
TestIndexWriter code:
doc.add ( *_CLNEW Field(_T("field0"),fld,Field::STORE_YES |
Field::INDEX_TOKENIZED) );
Hope this helps
Borek
From: Michael Zhang (BLOOMBERG/ 731 LEXIN) [mailto:mzhang...@bloomberg.net]
Sent: Wednesday, October 09, 2013 4:38 PM
To: clucene-developers@lists.sourceforge.net
Subject: [CLucene-dev] crash -- R6025 pure virtual function call
I try to write a test application in Microsoft VS 2010 as following.
and when I debug the code, it crash at:
writer.addDocument(&doc);
and I get an error message, it shows:
Runtime Error!
Program: C:...
R6025
- pure virtual function call
Anybody knows how to fix it?
Thanks.
___________________________________________________________________
RAMDirectory directory;
StandardAnalyzer analyzer;
IndexWriter writer(&directory, &analyzer, true);
lucene::document::Document doc;
doc.add(lucene::document::Field(L"content", L"abcd",
lucene::document::Field::STORE_YES| lucene::document::Field::INDEX_TOKENIZED,
true));
writer.addDocument(&doc);
writer.optimize();
writer.close();
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
CLucene-developers mailing list
CLucene-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/clucene-developers