--- a/qcpix/bwins/cpixsearchu.def Mon Jul 26 12:27:31 2010 +0530
+++ b/qcpix/bwins/cpixsearchu.def Mon Aug 09 10:51:30 2010 +0530
@@ -16,58 +16,61 @@
??_ECpixDocument@@UAE@I@Z @ 15 NONAME ; CpixDocument::~CpixDocument(unsigned int)
?newInstance@CpixDocumentField@@SAPAV1@VQString@@0H@Z @ 16 NONAME ; class CpixDocumentField * CpixDocumentField::newInstance(class QString, class QString, int)
??_ECpixSearcher@@UAE@I@Z @ 17 NONAME ; CpixSearcher::~CpixSearcher(unsigned int)
- ?d_func@CpixDocument@@ABEPBVCpixDocumentPrivate@@XZ @ 18 NONAME ; class CpixDocumentPrivate const * CpixDocument::d_func(void) const
- ?trUtf8@CpixDocumentField@@SA?AVQString@@PBD0H@Z @ 19 NONAME ; class QString CpixDocumentField::trUtf8(char const *, char const *, int)
- ?getStaticMetaObject@CpixDocumentField@@SAABUQMetaObject@@XZ @ 20 NONAME ; struct QMetaObject const & CpixDocumentField::getStaticMetaObject(void)
- ?staticMetaObject@CpixDocument@@2UQMetaObject@@B @ 21 NONAME ; struct QMetaObject const CpixDocument::staticMetaObject
- ??_ECpixDocumentField@@UAE@I@Z @ 22 NONAME ; CpixDocumentField::~CpixDocumentField(unsigned int)
- ?config@CpixDocumentField@@QBEHXZ @ 23 NONAME ; int CpixDocumentField::config(void) const
- ?tr@CpixSearcher@@SA?AVQString@@PBD0H@Z @ 24 NONAME ; class QString CpixSearcher::tr(char const *, char const *, int)
- ?d_func@CpixDocument@@AAEPAVCpixDocumentPrivate@@XZ @ 25 NONAME ; class CpixDocumentPrivate * CpixDocument::d_func(void)
- ?trUtf8@CpixDocument@@SA?AVQString@@PBD0H@Z @ 26 NONAME ; class QString CpixDocument::trUtf8(char const *, char const *, int)
- ?setValue@CpixDocumentField@@QAEXVQString@@@Z @ 27 NONAME ; void CpixDocumentField::setValue(class QString)
- ?qt_metacall@CpixSearcher@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 28 NONAME ; int CpixSearcher::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?qt_metacall@CpixDocument@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 29 NONAME ; int CpixDocument::qt_metacall(enum QMetaObject::Call, int, void * *)
- ??1CpixDocument@@UAE@XZ @ 30 NONAME ; CpixDocument::~CpixDocument(void)
- ?handleDatabaseSet@CpixSearcher@@IAEXH@Z @ 31 NONAME ; void CpixSearcher::handleDatabaseSet(int)
- ??0CpixDocumentField@@AAE@VQString@@0H@Z @ 32 NONAME ; CpixDocumentField::CpixDocumentField(class QString, class QString, int)
- ?trUtf8@CpixSearcher@@SA?AVQString@@PBD0@Z @ 33 NONAME ; class QString CpixSearcher::trUtf8(char const *, char const *)
- ?newInstance@CpixDocument@@SAPAV1@XZ @ 34 NONAME ; class CpixDocument * CpixDocument::newInstance(void)
- ?setDatabaseAsync@CpixSearcher@@QAEXVQString@@@Z @ 35 NONAME ; void CpixSearcher::setDatabaseAsync(class QString)
- ?value@CpixDocumentField@@QBE?AVQString@@XZ @ 36 NONAME ; class QString CpixDocumentField::value(void) const
- ?name@CpixDocumentField@@QBE?AVQString@@XZ @ 37 NONAME ; class QString CpixDocumentField::name(void) const
- ?search@CpixSearcher@@QAEHVQString@@0@Z @ 38 NONAME ; int CpixSearcher::search(class QString, class QString)
- ?tr@CpixDocumentField@@SA?AVQString@@PBD0@Z @ 39 NONAME ; class QString CpixDocumentField::tr(char const *, char const *)
- ?staticMetaObject@CpixSearcher@@2UQMetaObject@@B @ 40 NONAME ; struct QMetaObject const CpixSearcher::staticMetaObject
- ??1CpixSearcher@@UAE@XZ @ 41 NONAME ; CpixSearcher::~CpixSearcher(void)
- ?excerpt@CpixDocument@@QBE?AVQString@@XZ @ 42 NONAME ; class QString CpixDocument::excerpt(void) const
- ?setName@CpixDocumentField@@QAEXVQString@@@Z @ 43 NONAME ; void CpixDocumentField::setName(class QString)
- ?setDocId@CpixDocument@@QAEXVQString@@@Z @ 44 NONAME ; void CpixDocument::setDocId(class QString)
- ?fieldCount@CpixDocument@@QBEHXZ @ 45 NONAME ; int CpixDocument::fieldCount(void) const
- ?baseAppClass@CpixDocument@@QBE?AVQString@@XZ @ 46 NONAME ; class QString CpixDocument::baseAppClass(void) const
- ?qt_metacast@CpixDocumentField@@UAEPAXPBD@Z @ 47 NONAME ; void * CpixDocumentField::qt_metacast(char const *)
- ?newInstance@CpixSearcher@@SAPAV1@XZ @ 48 NONAME ; class CpixSearcher * CpixSearcher::newInstance(void)
- ?field@CpixDocument@@QBEABVCpixDocumentField@@H@Z @ 49 NONAME ; class CpixDocumentField const & CpixDocument::field(int) const
- ?metaObject@CpixSearcher@@UBEPBUQMetaObject@@XZ @ 50 NONAME ; struct QMetaObject const * CpixSearcher::metaObject(void) const
- ?metaObject@CpixDocumentField@@UBEPBUQMetaObject@@XZ @ 51 NONAME ; struct QMetaObject const * CpixDocumentField::metaObject(void) const
- ?qt_metacast@CpixDocument@@UAEPAXPBD@Z @ 52 NONAME ; void * CpixDocument::qt_metacast(char const *)
- ?document@CpixSearcher@@QAEPAVCpixDocument@@H@Z @ 53 NONAME ; class CpixDocument * CpixSearcher::document(int)
- ?trUtf8@CpixDocument@@SA?AVQString@@PBD0@Z @ 54 NONAME ; class QString CpixDocument::trUtf8(char const *, char const *)
- ?setExcerpt@CpixDocument@@QAEXVQString@@@Z @ 55 NONAME ; void CpixDocument::setExcerpt(class QString)
- ?tr@CpixDocument@@SA?AVQString@@PBD0H@Z @ 56 NONAME ; class QString CpixDocument::tr(char const *, char const *, int)
- ?addField@CpixDocument@@QAEXVQString@@0H@Z @ 57 NONAME ; void CpixDocument::addField(class QString, class QString, int)
- ??0CpixDocument@@AAE@XZ @ 58 NONAME ; CpixDocument::CpixDocument(void)
- ?newInstance@CpixSearcher@@SAPAV1@VQString@@0@Z @ 59 NONAME ; class CpixSearcher * CpixSearcher::newInstance(class QString, class QString)
- ?setDatabase@CpixSearcher@@QAEXVQString@@@Z @ 60 NONAME ; void CpixSearcher::setDatabase(class QString)
- ?setBaseAppClass@CpixDocument@@QAEXVQString@@@Z @ 61 NONAME ; void CpixDocument::setBaseAppClass(class QString)
- ?trUtf8@CpixDocumentField@@SA?AVQString@@PBD0@Z @ 62 NONAME ; class QString CpixDocumentField::trUtf8(char const *, char const *)
- ?tr@CpixSearcher@@SA?AVQString@@PBD0@Z @ 63 NONAME ; class QString CpixSearcher::tr(char const *, char const *)
- ?getStaticMetaObject@CpixSearcher@@SAABUQMetaObject@@XZ @ 64 NONAME ; struct QMetaObject const & CpixSearcher::getStaticMetaObject(void)
- ?d_func@CpixDocumentField@@AAEPAVCpixDocumentFieldPrivate@@XZ @ 65 NONAME ; class CpixDocumentFieldPrivate * CpixDocumentField::d_func(void)
- ?d_func@CpixSearcher@@ABEPBVCpixSearcherPrivate@@XZ @ 66 NONAME ; class CpixSearcherPrivate const * CpixSearcher::d_func(void) const
- ?trUtf8@CpixSearcher@@SA?AVQString@@PBD0H@Z @ 67 NONAME ; class QString CpixSearcher::trUtf8(char const *, char const *, int)
- ??0CpixSearcher@@AAE@XZ @ 68 NONAME ; CpixSearcher::CpixSearcher(void)
- ?d_func@CpixSearcher@@AAEPAVCpixSearcherPrivate@@XZ @ 69 NONAME ; class CpixSearcherPrivate * CpixSearcher::d_func(void)
- ?setConfig@CpixDocumentField@@QAEXH@Z @ 70 NONAME ; void CpixDocumentField::setConfig(int)
- ?staticMetaObject@CpixDocumentField@@2UQMetaObject@@B @ 71 NONAME ; struct QMetaObject const CpixDocumentField::staticMetaObject
+ ?batchdocumentAsync@CpixSearcher@@QAEXHH@Z @ 18 NONAME ; void CpixSearcher::batchdocumentAsync(int, int)
+ ?d_func@CpixDocument@@ABEPBVCpixDocumentPrivate@@XZ @ 19 NONAME ; class CpixDocumentPrivate const * CpixDocument::d_func(void) const
+ ?trUtf8@CpixDocumentField@@SA?AVQString@@PBD0H@Z @ 20 NONAME ; class QString CpixDocumentField::trUtf8(char const *, char const *, int)
+ ?getStaticMetaObject@CpixDocumentField@@SAABUQMetaObject@@XZ @ 21 NONAME ; struct QMetaObject const & CpixDocumentField::getStaticMetaObject(void)
+ ?staticMetaObject@CpixDocument@@2UQMetaObject@@B @ 22 NONAME ; struct QMetaObject const CpixDocument::staticMetaObject
+ ??_ECpixDocumentField@@UAE@I@Z @ 23 NONAME ; CpixDocumentField::~CpixDocumentField(unsigned int)
+ ?config@CpixDocumentField@@QBEHXZ @ 24 NONAME ; int CpixDocumentField::config(void) const
+ ?tr@CpixSearcher@@SA?AVQString@@PBD0H@Z @ 25 NONAME ; class QString CpixSearcher::tr(char const *, char const *, int)
+ ?d_func@CpixDocument@@AAEPAVCpixDocumentPrivate@@XZ @ 26 NONAME ; class CpixDocumentPrivate * CpixDocument::d_func(void)
+ ?trUtf8@CpixDocument@@SA?AVQString@@PBD0H@Z @ 27 NONAME ; class QString CpixDocument::trUtf8(char const *, char const *, int)
+ ?setValue@CpixDocumentField@@QAEXVQString@@@Z @ 28 NONAME ; void CpixDocumentField::setValue(class QString)
+ ?qt_metacall@CpixSearcher@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 29 NONAME ; int CpixSearcher::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@CpixDocument@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 30 NONAME ; int CpixDocument::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ??1CpixDocument@@UAE@XZ @ 31 NONAME ; CpixDocument::~CpixDocument(void)
+ ?handleDatabaseSet@CpixSearcher@@IAEXH@Z @ 32 NONAME ; void CpixSearcher::handleDatabaseSet(int)
+ ??0CpixDocumentField@@AAE@VQString@@0H@Z @ 33 NONAME ; CpixDocumentField::CpixDocumentField(class QString, class QString, int)
+ ?trUtf8@CpixSearcher@@SA?AVQString@@PBD0@Z @ 34 NONAME ; class QString CpixSearcher::trUtf8(char const *, char const *)
+ ?newInstance@CpixDocument@@SAPAV1@XZ @ 35 NONAME ; class CpixDocument * CpixDocument::newInstance(void)
+ ?setDatabaseAsync@CpixSearcher@@QAEXVQString@@@Z @ 36 NONAME ; void CpixSearcher::setDatabaseAsync(class QString)
+ ?value@CpixDocumentField@@QBE?AVQString@@XZ @ 37 NONAME ; class QString CpixDocumentField::value(void) const
+ ?batchdocument@CpixSearcher@@QAEPAPAVCpixDocument@@HAAHH@Z @ 38 NONAME ; class CpixDocument * * CpixSearcher::batchdocument(int, int &, int)
+ ?name@CpixDocumentField@@QBE?AVQString@@XZ @ 39 NONAME ; class QString CpixDocumentField::name(void) const
+ ?search@CpixSearcher@@QAEHVQString@@0@Z @ 40 NONAME ; int CpixSearcher::search(class QString, class QString)
+ ?tr@CpixDocumentField@@SA?AVQString@@PBD0@Z @ 41 NONAME ; class QString CpixDocumentField::tr(char const *, char const *)
+ ?staticMetaObject@CpixSearcher@@2UQMetaObject@@B @ 42 NONAME ; struct QMetaObject const CpixSearcher::staticMetaObject
+ ??1CpixSearcher@@UAE@XZ @ 43 NONAME ; CpixSearcher::~CpixSearcher(void)
+ ?excerpt@CpixDocument@@QBE?AVQString@@XZ @ 44 NONAME ; class QString CpixDocument::excerpt(void) const
+ ?setName@CpixDocumentField@@QAEXVQString@@@Z @ 45 NONAME ; void CpixDocumentField::setName(class QString)
+ ?setDocId@CpixDocument@@QAEXVQString@@@Z @ 46 NONAME ; void CpixDocument::setDocId(class QString)
+ ?fieldCount@CpixDocument@@QBEHXZ @ 47 NONAME ; int CpixDocument::fieldCount(void) const
+ ?baseAppClass@CpixDocument@@QBE?AVQString@@XZ @ 48 NONAME ; class QString CpixDocument::baseAppClass(void) const
+ ?qt_metacast@CpixDocumentField@@UAEPAXPBD@Z @ 49 NONAME ; void * CpixDocumentField::qt_metacast(char const *)
+ ?newInstance@CpixSearcher@@SAPAV1@XZ @ 50 NONAME ; class CpixSearcher * CpixSearcher::newInstance(void)
+ ?field@CpixDocument@@QBEABVCpixDocumentField@@H@Z @ 51 NONAME ; class CpixDocumentField const & CpixDocument::field(int) const
+ ?metaObject@CpixSearcher@@UBEPBUQMetaObject@@XZ @ 52 NONAME ; struct QMetaObject const * CpixSearcher::metaObject(void) const
+ ?metaObject@CpixDocumentField@@UBEPBUQMetaObject@@XZ @ 53 NONAME ; struct QMetaObject const * CpixDocumentField::metaObject(void) const
+ ?qt_metacast@CpixDocument@@UAEPAXPBD@Z @ 54 NONAME ; void * CpixDocument::qt_metacast(char const *)
+ ?document@CpixSearcher@@QAEPAVCpixDocument@@H@Z @ 55 NONAME ; class CpixDocument * CpixSearcher::document(int)
+ ?trUtf8@CpixDocument@@SA?AVQString@@PBD0@Z @ 56 NONAME ; class QString CpixDocument::trUtf8(char const *, char const *)
+ ?setExcerpt@CpixDocument@@QAEXVQString@@@Z @ 57 NONAME ; void CpixDocument::setExcerpt(class QString)
+ ?tr@CpixDocument@@SA?AVQString@@PBD0H@Z @ 58 NONAME ; class QString CpixDocument::tr(char const *, char const *, int)
+ ?addField@CpixDocument@@QAEXVQString@@0H@Z @ 59 NONAME ; void CpixDocument::addField(class QString, class QString, int)
+ ??0CpixDocument@@AAE@XZ @ 60 NONAME ; CpixDocument::CpixDocument(void)
+ ?newInstance@CpixSearcher@@SAPAV1@VQString@@0@Z @ 61 NONAME ; class CpixSearcher * CpixSearcher::newInstance(class QString, class QString)
+ ?setDatabase@CpixSearcher@@QAEXVQString@@@Z @ 62 NONAME ; void CpixSearcher::setDatabase(class QString)
+ ?setBaseAppClass@CpixDocument@@QAEXVQString@@@Z @ 63 NONAME ; void CpixDocument::setBaseAppClass(class QString)
+ ?trUtf8@CpixDocumentField@@SA?AVQString@@PBD0@Z @ 64 NONAME ; class QString CpixDocumentField::trUtf8(char const *, char const *)
+ ?tr@CpixSearcher@@SA?AVQString@@PBD0@Z @ 65 NONAME ; class QString CpixSearcher::tr(char const *, char const *)
+ ?getStaticMetaObject@CpixSearcher@@SAABUQMetaObject@@XZ @ 66 NONAME ; struct QMetaObject const & CpixSearcher::getStaticMetaObject(void)
+ ?d_func@CpixDocumentField@@AAEPAVCpixDocumentFieldPrivate@@XZ @ 67 NONAME ; class CpixDocumentFieldPrivate * CpixDocumentField::d_func(void)
+ ?d_func@CpixSearcher@@ABEPBVCpixSearcherPrivate@@XZ @ 68 NONAME ; class CpixSearcherPrivate const * CpixSearcher::d_func(void) const
+ ?trUtf8@CpixSearcher@@SA?AVQString@@PBD0H@Z @ 69 NONAME ; class QString CpixSearcher::trUtf8(char const *, char const *, int)
+ ??0CpixSearcher@@AAE@XZ @ 70 NONAME ; CpixSearcher::CpixSearcher(void)
+ ?handleBatchDocuments@CpixSearcher@@IAEXHHPAPAVCpixDocument@@@Z @ 71 NONAME ; void CpixSearcher::handleBatchDocuments(int, int, class CpixDocument * *)
+ ?d_func@CpixSearcher@@AAEPAVCpixSearcherPrivate@@XZ @ 72 NONAME ; class CpixSearcherPrivate * CpixSearcher::d_func(void)
+ ?setConfig@CpixDocumentField@@QAEXH@Z @ 73 NONAME ; void CpixDocumentField::setConfig(int)
+ ?staticMetaObject@CpixDocumentField@@2UQMetaObject@@B @ 74 NONAME ; struct QMetaObject const CpixDocumentField::staticMetaObject
--- a/qcpix/cpix.pro Mon Jul 26 12:27:31 2010 +0530
+++ b/qcpix/cpix.pro Mon Aug 09 10:51:30 2010 +0530
@@ -16,7 +16,8 @@
TEMPLATE = subdirs
CONFIG += ordered
-SUBDIRS += cpixsearch.pro \
- tsrc/SampleSearch/SampleSearch.pro \
- tsrc/orbitsearch/orbitsearch.pro \
- tsrc/qtcpixunittests/qtcpixunittests.pro
+SUBDIRS += cpixsearch.pro
+ #Removing test components
+ #tsrc/SampleSearch/SampleSearch.pro \
+ #tsrc/orbitsearch/orbitsearch.pro \
+ #tsrc/qtcpixunittests/qtcpixunittests.pro
\ No newline at end of file
--- a/qcpix/eabi/cpixsearchu.def Mon Jul 26 12:27:31 2010 +0530
+++ b/qcpix/eabi/cpixsearchu.def Mon Aug 09 10:51:30 2010 +0530
@@ -20,48 +20,51 @@
_ZN12CpixSearcher11searchAsyncE7QStringS0_ @ 19 NONAME
_ZN12CpixSearcher11setDatabaseE7QString @ 20 NONAME
_ZN12CpixSearcher12cancelSearchEv @ 21 NONAME
- _ZN12CpixSearcher13documentAsyncEi @ 22 NONAME
- _ZN12CpixSearcher14handleDocumentEiP12CpixDocument @ 23 NONAME
- _ZN12CpixSearcher16setDatabaseAsyncE7QString @ 24 NONAME
- _ZN12CpixSearcher16staticMetaObjectE @ 25 NONAME DATA 16
- _ZN12CpixSearcher17handleDatabaseSetEi @ 26 NONAME
- _ZN12CpixSearcher19getStaticMetaObjectEv @ 27 NONAME
- _ZN12CpixSearcher19handleSearchResultsEii @ 28 NONAME
- _ZN12CpixSearcher6searchE7QStringS0_ @ 29 NONAME
- _ZN12CpixSearcher8documentEi @ 30 NONAME
- _ZN12CpixSearcherC1Ev @ 31 NONAME
- _ZN12CpixSearcherC2Ev @ 32 NONAME
- _ZN12CpixSearcherD0Ev @ 33 NONAME
- _ZN12CpixSearcherD1Ev @ 34 NONAME
- _ZN12CpixSearcherD2Ev @ 35 NONAME
- _ZN17CpixDocumentField11newInstanceE7QStringS0_i @ 36 NONAME
- _ZN17CpixDocumentField11qt_metacallEN11QMetaObject4CallEiPPv @ 37 NONAME
- _ZN17CpixDocumentField11qt_metacastEPKc @ 38 NONAME
- _ZN17CpixDocumentField16staticMetaObjectE @ 39 NONAME DATA 16
- _ZN17CpixDocumentField19getStaticMetaObjectEv @ 40 NONAME
- _ZN17CpixDocumentField7setNameE7QString @ 41 NONAME
- _ZN17CpixDocumentField8setValueE7QString @ 42 NONAME
- _ZN17CpixDocumentField9setConfigEi @ 43 NONAME
- _ZN17CpixDocumentFieldC1E7QStringS0_i @ 44 NONAME
- _ZN17CpixDocumentFieldC2E7QStringS0_i @ 45 NONAME
- _ZN17CpixDocumentFieldD0Ev @ 46 NONAME
- _ZN17CpixDocumentFieldD1Ev @ 47 NONAME
- _ZN17CpixDocumentFieldD2Ev @ 48 NONAME
- _ZNK12CpixDocument10fieldCountEv @ 49 NONAME
- _ZNK12CpixDocument10metaObjectEv @ 50 NONAME
- _ZNK12CpixDocument12baseAppClassEv @ 51 NONAME
- _ZNK12CpixDocument5docIdEv @ 52 NONAME
- _ZNK12CpixDocument5fieldEi @ 53 NONAME
- _ZNK12CpixDocument7excerptEv @ 54 NONAME
- _ZNK12CpixSearcher10metaObjectEv @ 55 NONAME
- _ZNK17CpixDocumentField10metaObjectEv @ 56 NONAME
- _ZNK17CpixDocumentField4nameEv @ 57 NONAME
- _ZNK17CpixDocumentField5valueEv @ 58 NONAME
- _ZNK17CpixDocumentField6configEv @ 59 NONAME
- _ZTI12CpixDocument @ 60 NONAME
- _ZTI12CpixSearcher @ 61 NONAME
- _ZTI17CpixDocumentField @ 62 NONAME
- _ZTV12CpixDocument @ 63 NONAME
- _ZTV12CpixSearcher @ 64 NONAME
- _ZTV17CpixDocumentField @ 65 NONAME
+ _ZN12CpixSearcher13batchdocumentEiRii @ 22 NONAME
+ _ZN12CpixSearcher13documentAsyncEi @ 23 NONAME
+ _ZN12CpixSearcher14handleDocumentEiP12CpixDocument @ 24 NONAME
+ _ZN12CpixSearcher16setDatabaseAsyncE7QString @ 25 NONAME
+ _ZN12CpixSearcher16staticMetaObjectE @ 26 NONAME DATA 16
+ _ZN12CpixSearcher17handleDatabaseSetEi @ 27 NONAME
+ _ZN12CpixSearcher18batchdocumentAsyncEii @ 28 NONAME
+ _ZN12CpixSearcher19getStaticMetaObjectEv @ 29 NONAME
+ _ZN12CpixSearcher19handleSearchResultsEii @ 30 NONAME
+ _ZN12CpixSearcher20handleBatchDocumentsEiiPP12CpixDocument @ 31 NONAME
+ _ZN12CpixSearcher6searchE7QStringS0_ @ 32 NONAME
+ _ZN12CpixSearcher8documentEi @ 33 NONAME
+ _ZN12CpixSearcherC1Ev @ 34 NONAME
+ _ZN12CpixSearcherC2Ev @ 35 NONAME
+ _ZN12CpixSearcherD0Ev @ 36 NONAME
+ _ZN12CpixSearcherD1Ev @ 37 NONAME
+ _ZN12CpixSearcherD2Ev @ 38 NONAME
+ _ZN17CpixDocumentField11newInstanceE7QStringS0_i @ 39 NONAME
+ _ZN17CpixDocumentField11qt_metacallEN11QMetaObject4CallEiPPv @ 40 NONAME
+ _ZN17CpixDocumentField11qt_metacastEPKc @ 41 NONAME
+ _ZN17CpixDocumentField16staticMetaObjectE @ 42 NONAME DATA 16
+ _ZN17CpixDocumentField19getStaticMetaObjectEv @ 43 NONAME
+ _ZN17CpixDocumentField7setNameE7QString @ 44 NONAME
+ _ZN17CpixDocumentField8setValueE7QString @ 45 NONAME
+ _ZN17CpixDocumentField9setConfigEi @ 46 NONAME
+ _ZN17CpixDocumentFieldC1E7QStringS0_i @ 47 NONAME
+ _ZN17CpixDocumentFieldC2E7QStringS0_i @ 48 NONAME
+ _ZN17CpixDocumentFieldD0Ev @ 49 NONAME
+ _ZN17CpixDocumentFieldD1Ev @ 50 NONAME
+ _ZN17CpixDocumentFieldD2Ev @ 51 NONAME
+ _ZNK12CpixDocument10fieldCountEv @ 52 NONAME
+ _ZNK12CpixDocument10metaObjectEv @ 53 NONAME
+ _ZNK12CpixDocument12baseAppClassEv @ 54 NONAME
+ _ZNK12CpixDocument5docIdEv @ 55 NONAME
+ _ZNK12CpixDocument5fieldEi @ 56 NONAME
+ _ZNK12CpixDocument7excerptEv @ 57 NONAME
+ _ZNK12CpixSearcher10metaObjectEv @ 58 NONAME
+ _ZNK17CpixDocumentField10metaObjectEv @ 59 NONAME
+ _ZNK17CpixDocumentField4nameEv @ 60 NONAME
+ _ZNK17CpixDocumentField5valueEv @ 61 NONAME
+ _ZNK17CpixDocumentField6configEv @ 62 NONAME
+ _ZTI12CpixDocument @ 63 NONAME
+ _ZTI12CpixSearcher @ 64 NONAME
+ _ZTI17CpixDocumentField @ 65 NONAME
+ _ZTV12CpixDocument @ 66 NONAME
+ _ZTV12CpixSearcher @ 67 NONAME
+ _ZTV17CpixDocumentField @ 68 NONAME
--- a/qcpix/src/cpixsearcher.cpp Mon Jul 26 12:27:31 2010 +0530
+++ b/qcpix/src/cpixsearcher.cpp Mon Aug 09 10:51:30 2010 +0530
@@ -136,12 +136,27 @@
PERF_GETDOC_ENDLOG
return tmp;
}
+
+CpixDocument** CpixSearcher::batchdocument( int aIndex,int& aReturnDoc, int aCount )
+ {
+ PERF_GETDOC_RESTART_TIMER
+ CpixDocument** tmp = 0;
+ QT_TRAP_THROWING( tmp = CpixBatchDocFromCSearchDocument( aReturnDoc, iPvtImpl->iSearcher->GetBatchDocumentL( aIndex, aReturnDoc, aCount )) );
+ PERF_GETDOC_ENDLOG
+ return tmp;
+ }
void CpixSearcher::documentAsync( int aIndex )
{
PERF_TIME_NOW("Async get document start")
QT_TRAP_THROWING( iPvtImpl->iSearcher->GetDocumentL( aIndex, *iPvtImpl ) );
}
+
+void CpixSearcher::batchdocumentAsync( int aIndex, int aCount )
+ {
+ PERF_TIME_NOW("Async batch get document start")
+ QT_TRAP_THROWING( iPvtImpl->iSearcher->GetBatchDocumentL( aIndex, *iPvtImpl, aCount ) );
+ }
void CpixSearcher::cancelSearch()
{
--- a/qcpix/src/platform/s60/inc/cpixsearcherprivate.h Mon Jul 26 12:27:31 2010 +0530
+++ b/qcpix/src/platform/s60/inc/cpixsearcherprivate.h Mon Aug 09 10:51:30 2010 +0530
@@ -44,6 +44,7 @@
public :
void HandleSearchResultsL(TInt aError, TInt aEstimatedResultCount); //from MCPixSearchRequestObserver
void HandleDocumentL(TInt aError, CSearchDocument* aDocument); // from MCPixNextDocumentRequestObserver
+ void HandleBatchDocumentL(TInt aError,TInt aRetCount, CSearchDocument** aDocument); // from MCPixNextDocumentRequestObserver
void HandleOpenDatabaseResultL( TInt aError ); //MCPixOpenDatabaseRequestObserver
void HandleSetAnalyzerResultL( TInt aError ); //MCPixSetAnalyzerRequestObserver
--- a/qcpix/src/platform/s60/inc/cpixutils.h Mon Jul 26 12:27:31 2010 +0530
+++ b/qcpix/src/platform/s60/inc/cpixutils.h Mon Aug 09 10:51:30 2010 +0530
@@ -32,4 +32,12 @@
*/
CpixDocument* CpixDocFromCSearchDocument( CSearchDocument* aDoc );
+/**
+ * Gets array of QCPixDocuments from batch of CSearchDocuments
+ * @param aDoc batch of CSearchDocuments to be converted to QCPixDocuments. Takes ownership of aDoc.
+ * @param aReturnDoc number of CSearchDocuments in the aDoc
+ * @return QCPixDocument representation of aDoc. Ownership transferred to caller.
+ */
+CpixDocument** CpixBatchDocFromCSearchDocument(TInt aReturnDoc, CSearchDocument** aDoc );
+
#endif /* QCPIXUTILS_H_ */
--- a/qcpix/src/platform/s60/src/cpixsearcherprivate.cpp Mon Jul 26 12:27:31 2010 +0530
+++ b/qcpix/src/platform/s60/src/cpixsearcherprivate.cpp Mon Aug 09 10:51:30 2010 +0530
@@ -58,6 +58,12 @@
PERF_TIME_NOW("Async get document complete")
emit iSearchParent->handleDocument( aError, CpixDocFromCSearchDocument( aDocument ) );
}
+
+void CpixSearcherPrivate::HandleBatchDocumentL(TInt aError,TInt aRetCount, CSearchDocument** aDocument)
+ {
+ PERF_TIME_NOW("Async get batch document complete")
+ emit iSearchParent->handleBatchDocuments( aError, aRetCount,CpixBatchDocFromCSearchDocument( aRetCount, aDocument) );
+ }
void CpixSearcherPrivate::HandleOpenDatabaseResultL( TInt aError )
{
--- a/qcpix/src/platform/s60/src/cpixutils.cpp Mon Jul 26 12:27:31 2010 +0530
+++ b/qcpix/src/platform/s60/src/cpixutils.cpp Mon Aug 09 10:51:30 2010 +0530
@@ -43,3 +43,29 @@
delete aDoc;
return cpixDoc;
}
+
+CpixDocument** CpixBatchDocFromCSearchDocument( TInt aReturnDoc, CSearchDocument** aDoc )
+ {
+ if( aDoc == NULL ) return NULL;
+ CpixDocument** cpixBatchDocs = NULL;
+ cpixBatchDocs = (CpixDocument**)malloc ( sizeof(CpixDocument*) * (aReturnDoc));
+ for (int count = 0; count < aReturnDoc; count++)
+ {
+ CpixDocument* cpixDoc = CpixDocument::newInstance();
+ cpixDoc->setBaseAppClass( QStringFromDescriptor( aDoc[count]->AppClass() ) );
+ cpixDoc->setDocId( QStringFromDescriptor( aDoc[count]->Id() ) );
+ cpixDoc->setExcerpt( QStringFromDescriptor( aDoc[count]->Excerpt() ) );
+
+ int fieldCount = aDoc[count]->FieldCount();
+ for( int i=0; i< fieldCount; i++ )
+ {
+ const CDocumentField& field = aDoc[count]->Field( i );
+ cpixDoc->addField( QStringFromDescriptor( field.Name() ), QStringFromDescriptor( field.Value() ), field.Config() );
+ }
+ cpixBatchDocs[count]= cpixDoc;
+ delete aDoc[count];
+ aDoc[count] = NULL;
+ }
+ delete aDoc;
+ return cpixBatchDocs;
+ }
--- a/qcpix/tsrc/orbitsearch/searchhelper.cpp Mon Jul 26 12:27:31 2010 +0530
+++ b/qcpix/tsrc/orbitsearch/searchhelper.cpp Mon Aug 09 10:51:30 2010 +0530
@@ -18,8 +18,8 @@
#include "searchhelper.h"
#include <cpixdocument.h>
-SearchHelper::SearchHelper(HbLineEdit* searchBx, HbPushButton* searchBtn, HbTextEdit* searchRslt)
- :searchBox( searchBx ), searchButton( searchBtn ), resultsBox( searchRslt )
+SearchHelper::SearchHelper(HbLineEdit* searchBx, HbPushButton* searchBtn, HbTextEdit* searchRslt, HbLineEdit* indexBox, HbLineEdit* countBox, HbPushButton* getdocbutton)
+ :searchBox( searchBx ), searchButton( searchBtn ), resultsBox( searchRslt ), indexBox(indexBox), countBox(countBox), getdocbutton(getdocbutton)
{
searcher = CpixSearcher::newInstance("root","_aggregate");
resultsBox->setReadOnly( true );
@@ -35,9 +35,7 @@
void SearchHelper::doSearch()
{
resultsBox->setPlainText("Search button clicked!");
-
- int hits = 0;
- QString resultString("");
+ resultString = "";
resultsBox->setPlainText( resultString );
searchTime.restart();
QString searchString;
@@ -51,27 +49,70 @@
searchString += searchBox->text();
searchString += "*";
#elif NO_STAR_SEARCH
+ searchString = searchBox->text();
;//do nothing
#endif
-
- hits = searcher->search( searchString );
+ iHits = 0;
+ iHits = searcher->search( searchString );
if (searchTime.elapsed() >= 0)
resultString = "SearchTime: " + QString().setNum( searchTime.elapsed() ) + " ms \r\n";
- resultString += "Hits: " + QString().setNum( hits ) + "\r\n";
+ resultString += "Hits: " + QString().setNum( iHits ) + "\r\n";
resultsBox->setPlainText( resultString );
#if !DONT_SHOW_RESULTS
- if( hits > 0 )
+ if( iHits > 0 )
{
- CpixDocument* temp = NULL;
- int docCount = 0;
- do{
- temp = searcher->document( docCount++ );
- resultString += temp->baseAppClass() + " " + temp->docId() + " " + temp->excerpt() + "\r\n\r\n";
- delete temp;
- }while( hits > docCount );
+ resultString += "Enter Index,count values and press GetDocs button to get the results";
+ resultString +="\r\n";
+ resultsBox->setPlainText( resultString );
}
- resultsBox->setPlainText( resultString );
#endif //DONT_SHOW_RESULTS
}
+
+void SearchHelper::showdocs()
+ {
+ QString indexstring = indexBox->text();
+ bool ok = false;
+ int index = indexstring.toInt(&ok);
+ if (ok)
+ {
+ QString countstring = countBox->text();
+ int count = countstring.toInt(&ok);
+ if (ok)
+ {
+ if ( index <= iHits )
+ {
+ if ( count == 1)
+ {
+ //call the normal get doc API
+ CpixDocument* temp = NULL;
+ do{
+ temp = searcher->document( index++ );
+ resultString += temp->baseAppClass() + " " + temp->docId() + " " + temp->excerpt() + "\r\n\r\n";
+ delete temp;
+ }while( iHits > index );
+ }
+ else
+ {
+ //call batch doc API
+ CpixDocument** temp = NULL;
+ do{
+ int retdoccount = 0;
+ temp = searcher->batchdocument(index,retdoccount,count);
+ for (int i=0; i< retdoccount; i++)
+ {
+ resultString += temp[i]->baseAppClass() + " " + temp[i]->docId() + " " + temp[i]->excerpt() + "\r\n\r\n";
+ delete temp[i];
+ }
+ delete temp;
+ temp = NULL;
+ index += retdoccount;
+ }while (iHits > index);
+ }
+ }
+ else resultString += " Requested document is out of range";
+ resultsBox->setPlainText( resultString );
+ }
+ }
+ }
--- a/qcpix/tsrc/orbitsearch/searchhelper.h Mon Jul 26 12:27:31 2010 +0530
+++ b/qcpix/tsrc/orbitsearch/searchhelper.h Mon Aug 09 10:51:30 2010 +0530
@@ -27,16 +27,19 @@
{
Q_OBJECT
public:
- SearchHelper(HbLineEdit*, HbPushButton*, HbTextEdit* );
+ SearchHelper(HbLineEdit*, HbPushButton*, HbTextEdit*, HbLineEdit*, HbLineEdit*, HbPushButton* );
~SearchHelper();
public slots:
void doSearch();
+ void showdocs();
private:
ORBIT_SEARCH_CONTROLS //Not owned.
CpixSearcher* searcher;//Owned
QTime searchTime;
+ QString resultString;
+ int iHits;
};
#endif /* HELPER_H_ */
--- a/qcpix/tsrc/orbitsearch/testsearch.cpp Mon Jul 26 12:27:31 2010 +0530
+++ b/qcpix/tsrc/orbitsearch/testsearch.cpp Mon Aug 09 10:51:30 2010 +0530
@@ -48,11 +48,30 @@
searchButton = new HbPushButton( "Search" );
layout->addItem( searchButton );
+ QGraphicsLinearLayout *getdoclayout = new QGraphicsLinearLayout;
+ getdoclayout->setOrientation(Qt::Horizontal);
+
+ indexBox = new HbLineEdit;
+ indexBox->setInputMethodHints(Qt::ImhPreferNumbers);
+
+ countBox = new HbLineEdit;
+ countBox->setInputMethodHints(Qt::ImhPreferNumbers);
+
+ getdocbutton = new HbPushButton("GetDocs");
+
+#if !DONT_SHOW_RESULTS
+ getdoclayout->addItem(indexBox);
+ getdoclayout->addItem(countBox);
+ getdoclayout->addItem(getdocbutton);
+ layout->addItem(getdoclayout);
+#endif //!DONT_SHOW_RESULTS
+
resultsBox = new HbTextEdit;
layout->addItem( resultsBox );
- SearchHelper* sh = new SearchHelper(searchBox, searchButton, resultsBox);
+ SearchHelper* sh = new SearchHelper(searchBox, searchButton, resultsBox, indexBox, countBox,getdocbutton);
QObject::connect( searchButton, SIGNAL( clicked() ), sh, SLOT(doSearch()) );
+ QObject::connect( getdocbutton, SIGNAL( clicked() ), sh, SLOT(showdocs()) );
w->setLayout( layout );
BigScreen->addView ( w );
--- a/qcpix/tsrc/orbitsearch/uicontrols.h Mon Jul 26 12:27:31 2010 +0530
+++ b/qcpix/tsrc/orbitsearch/uicontrols.h Mon Aug 09 10:51:30 2010 +0530
@@ -33,12 +33,12 @@
#define STAR_SEARCH 0
//Vanilla search. Send search string to engine "as-is".
-#define NO_STAR_SEARCH 0
+#define NO_STAR_SEARCH 1
//Enable the prefix_search macro to enable Prefix query feature. This will add $prefix to the query
//string.
-#define PREFIX_SEARCH 1
+#define PREFIX_SEARCH 0
//If you dont want to see results, define this flag.
#define DONT_SHOW_RESULTS 0
@@ -48,6 +48,9 @@
#define ORBIT_SEARCH_CONTROLS \
HbLineEdit* searchBox; \
HbPushButton* searchButton; \
+ HbLineEdit* indexBox; \
+ HbLineEdit* countBox; \
+ HbPushButton* getdocbutton; \
HbTextEdit* resultsBox;
#endif /* UICONTROLS_H_ */
--- a/searchengine/cpix/cpix/inc/private/cpixhits.h Mon Jul 26 12:27:31 2010 +0530
+++ b/searchengine/cpix/cpix/inc/private/cpixhits.h Mon Aug 09 10:51:30 2010 +0530
@@ -70,6 +70,8 @@
* having the worst match.
*/
virtual Document * getDocument(int32_t index) = 0;
+
+ virtual int resetDocumentCache(int32_t index, int32_t count) = 0;
/**
* Returns the amount of hits
@@ -110,7 +112,7 @@
typedef std::map<int32_t, Document*> WrapperMap;
WrapperMap wrappers_;
- void destroyWrappers();
+ void destroyWrappers(int32_t index);
/**
@@ -134,6 +136,8 @@
Document * getDocument(int32_t index);
+
+ int resetDocumentCache(int32_t index, int32_t count);
/**
--- a/searchengine/cpix/cpix/inc/public/appclass-hierarchy.txt Mon Jul 26 12:27:31 2010 +0530
+++ b/searchengine/cpix/cpix/inc/public/appclass-hierarchy.txt Mon Aug 09 10:51:30 2010 +0530
@@ -56,6 +56,7 @@
| +-- folder
| [ Name ] {EStoreYes | EIndexTokenized | EIndexFreeText} {ExcerptNo}
| [ Extension ] {EStoreYes | EIndexTokenized | EIndexFreeText} {ExcerptNo}
+ | [ IsFolder ] {EStoreYes | EIndexTokenized | EIndexFreeText} {ExcerptNo}
|
|
+-- media
--- a/searchengine/cpix/cpix/inc/public/cpix_async.h Mon Jul 26 12:27:31 2010 +0530
+++ b/searchengine/cpix/cpix/inc/public/cpix_async.h Mon Aug 09 10:51:30 2010 +0530
@@ -486,9 +486,10 @@
*/
cpix_JobId cpix_Hits_asyncDoc(cpix_Hits * thisHits,
int32_t index,
- cpix_Document * target,
+ cpix_Document ** target,
void * cookie,
- cpix_AsyncCallback * callback);
+ cpix_AsyncCallback * callback,
+ int32_t count);
/**
--- a/searchengine/cpix/cpix/inc/public/cpixerror.h Mon Jul 26 12:27:31 2010 +0530
+++ b/searchengine/cpix/cpix/inc/public/cpixerror.h Mon Aug 09 10:51:30 2010 +0530
@@ -106,9 +106,16 @@
* Clears the error state of cpixObj.
*/
#define cpix_ClearError(cpixObj) ((cpixObj)->err_ = cpix_Error_destroy((cpixObj)->err_))
-
-
-
+ /*
+ * Determines to what extent the cpix_hits_docs() is able to fetch available hits
+ * Previously a check on cpix_Failed/Suceeded(hits) suffices, but with the batch_get_doc
+ * implementation a request for N results may results in X fetches where (X <= N) To
+ * correctly determine how many actual results are fetched a check on _err is not enough
+ * and _ptr too have to cheked for NULL
+ */
+#define doc_Fetch_Succeeded(docObj) ((docObj)->ptr_ != NULL)
+#define doc_Fetch_Failed(docObj) ((docObj)->ptr_ == NULL)
+
/**
* Any "static" calls will give the result back via this
* structure.
--- a/searchengine/cpix/cpix/inc/public/cpixsearch.h Mon Jul 26 12:27:31 2010 +0530
+++ b/searchengine/cpix/cpix/inc/public/cpixsearch.h Mon Aug 09 10:51:30 2010 +0530
@@ -296,7 +296,8 @@
*/
void cpix_Hits_doc(cpix_Hits * thisHits,
int32_t index,
- cpix_Document * target);
+ cpix_Document ** target,
+ int32_t count);
--- a/searchengine/cpix/cpix/src/common/gpssort.cpp Mon Jul 26 12:27:31 2010 +0530
+++ b/searchengine/cpix/cpix/src/common/gpssort.cpp Mon Aug 09 10:51:30 2010 +0530
@@ -422,19 +422,19 @@
for (int32_t i = 0; i < count; ++i)
{
- cpix_Document
- cpixDoc;
+ cpix_Document* cpixDoc = new cpix_Document;
cpix_Hits_doc(unsortedHits,
i,
- &cpixDoc);
+ &cpixDoc,
+ 1);
float
gpsLat,
gpsLong;
auto_ptr<lucene::document::Document>
- clone(cloneAndGetGps(&Cast2Native<cpix_Document>(&cpixDoc)->native(),
+ clone(cloneAndGetGps(&Cast2Native<cpix_Document>(cpixDoc)->native(),
&gpsLat,
&gpsLong));
GpsDistance
@@ -447,6 +447,8 @@
clone.release();
locations.push_back(gdp);
+
+ delete cpixDoc;
}
}
}
--- a/searchengine/cpix/cpix/src/cpix_async.cpp Mon Jul 26 12:27:31 2010 +0530
+++ b/searchengine/cpix/cpix/src/cpix_async.cpp Mon Aug 09 10:51:30 2010 +0530
@@ -1107,7 +1107,8 @@
//
cpix_Hits * hits_;
int32_t index_;
- cpix_Document * target_;
+ cpix_Document ** target_;
+ int32_t count_;
public:
@@ -1116,16 +1117,18 @@
//
static cpix_JobId CreateJob(cpix_Hits * hits,
int32_t index,
- cpix_Document * target,
+ cpix_Document ** target,
void * cookie,
- cpix_AsyncCallback * callback)
+ cpix_AsyncCallback * callback,
+ int32_t count)
{
std::auto_ptr<AsyncJob>
job(new AsyncHitsDocJob(hits,
index,
target,
cookie,
- callback));
+ callback,
+ count ));
cpix_JobId
rv = job->id();
@@ -1167,15 +1170,17 @@
//
AsyncHitsDocJob(cpix_Hits * hits,
int32_t index,
- cpix_Document * target,
+ cpix_Document ** target,
void * cookie,
- cpix_AsyncCallback * callback)
+ cpix_AsyncCallback * callback,
+ int32_t count)
: AsyncJob(IdxDbHndl(), // default value for handlers
cookie,
callback),
hits_(NULL),
index_(index),
- target_(target)
+ target_(target),
+ count_(count)
{
// We must make sure that these native objects live even
// if the client calls cancel in the middle of operation
@@ -1217,7 +1222,8 @@
cpix_Hits_doc(&hits,
index_,
- target_);
+ target_,
+ count_);
return hits.err_;
}
@@ -1841,9 +1847,10 @@
cpix_JobId cpix_Hits_asyncDoc(cpix_Hits * thisHits,
int32_t index,
- cpix_Document * target,
+ cpix_Document ** target,
void * cookie,
- cpix_AsyncCallback * callback)
+ cpix_AsyncCallback * callback,
+ int32_t count)
{
return XlateExc(thisHits,
CallFreeFunc(&AsyncHitsDocJob::CreateJob,
@@ -1851,7 +1858,8 @@
index,
target,
cookie,
- callback));
+ callback,
+ count));
}
--- a/searchengine/cpix/cpix/src/cpixhits.cpp Mon Jul 26 12:27:31 2010 +0530
+++ b/searchengine/cpix/cpix/src/cpixhits.cpp Mon Aug 09 10:51:30 2010 +0530
@@ -36,18 +36,27 @@
}
- void HitsBase::destroyWrappers()
+ void HitsBase::destroyWrappers(int32_t index)
{
WrapperMap::iterator
- i = wrappers_.begin(),
- end = wrappers_.end();
+ i = wrappers_.begin();
- for (; i != end; ++i)
+ if (index == -1) {
+ for (; i != wrappers_.end(); ++i)
{
delete i->second;
+ wrappers_.clear();
}
+ } else {
+ for (; i != wrappers_.find(index); ++i)
+ {
+ delete i->second;
+
+ }
+ wrappers_.erase(wrappers_.begin(),wrappers_.find(index));
+ }
- wrappers_.clear();
+
}
@@ -61,16 +70,26 @@
void HitsBase::wrapDocument(int32_t index,
lucene::document::Document * doc)
{
- if (wrappers_.find(index) != wrappers_.end())
+// if (wrappers_.find(index) != wrappers_.end())
+// {
+// delete wrappers_[index];
+// wrappers_[index] = NULL;
+// }
+//
+// Cpix::Document
+// * cpixDoc = new Cpix::Document(doc,
+// docsOwnedByClucene_);
+// wrappers_[index] = cpixDoc;
+
+ if (wrappers_.find(index) == wrappers_.end())
{
- delete wrappers_[index];
- wrappers_[index] = NULL;
+ Cpix::Document
+ * cpixDoc = new Cpix::Document(doc,
+ docsOwnedByClucene_);
+ wrappers_[index] = cpixDoc;
}
- Cpix::Document
- * cpixDoc = new Cpix::Document(doc,
- docsOwnedByClucene_);
- wrappers_[index] = cpixDoc;
+
}
@@ -89,7 +108,19 @@
return rv;
}
-
+ int HitsBase::resetDocumentCache(int32_t index, int32_t count)
+ {
+ int32_t reqCount = index + count;
+ int rv = 0;
+ int i = (wrappers_.begin()->first)+ (int32_t) wrappers_.size();
+ if ((i < reqCount) || (index < wrappers_.begin()->first))
+ {
+ getDocument_(index);
+
+ }
+ rv = (int32_t) wrappers_.size();
+ return rv;
+ }
/**
* Class ClhDocumentConsumer
@@ -144,7 +175,8 @@
clHits_.length());
}
- beginIndex_ = index - (index % pageSize_);
+ //beginIndex_ = index - (index % pageSize_);
+ beginIndex_ = index;
endIndex_ = beginIndex_ + pageSize_;
endIndex_ = std::min(clHits_.length(),
@@ -234,7 +266,7 @@
delete hits_;
hits_ = 0;
- destroyWrappers();
+ destroyWrappers(0);
delete docConsumer_;
@@ -245,7 +277,7 @@
void LuceneHits::getDocument_(int32_t index)
{
// check if we have tried to fetch it before and failed
- docConsumer_->throwIfFailedDocIndex(index);
+ //docConsumer_->throwIfFailedDocIndex(index);
// common usage pattern is to enumerate hits, never to access
// them at true random manner. That means that we never need
@@ -253,7 +285,7 @@
// fetch the next page we can discard all other wrapped
// documents. Merely an memory consumption optimization
// measure, can be commented out.
- destroyWrappers();
+ destroyWrappers(index);
// if we get here, then it means we don't have the page of hit
// docs we need, but it may still throw if the hits is an
@@ -304,12 +336,12 @@
HitDocumentList::~HitDocumentList()
{
- destroyWrappers();
+ destroyWrappers(0);
for (std::vector<lucene::document::Document*>::iterator i = documents_.begin();
i != documents_.end();
i++)
{
- _CLDELETE(*i);
+ _CLDELETE(*i);
}
}
--- a/searchengine/cpix/cpix/src/cpixsearch.cpp Mon Jul 26 12:27:31 2010 +0530
+++ b/searchengine/cpix/cpix/src/cpixsearch.cpp Mon Aug 09 10:51:30 2010 +0530
@@ -235,25 +235,36 @@
void cpix_Hits_doc(cpix_Hits * thisHits,
int32_t index,
- cpix_Document * target)
+ cpix_Document ** target,
+ int32_t count )
{
- Cpix::Document
- * pDoc = XlateExc(thisHits,
+
+ int result = XlateExc(thisHits,
Caller(thisHits,
- &Cpix::IHits::getDocument,
- index));
- if (cpix_Succeeded(thisHits))
- {
- target->ptr_ = pDoc;
- target->err_ = NULL;
-
- // TEMP (?) post-condition code
- if (target->ptr_ == NULL)
- {
- thisHits->err_
- = CreateError(ET_CPIX_EXC,
- L"PANIC PANIC PANIC - NULL doc returned without any error message!");
- }
+ &Cpix::IHits::resetDocumentCache,
+ index,
+ count));
+
+ for (int32_t i = 0; i < count && i < result ; i++) {
+ Cpix::Document
+ * pDoc = XlateExc(thisHits,
+ Caller(thisHits,
+ &Cpix::IHits::getDocument,
+ index++));
+ if (cpix_Succeeded(thisHits))
+ {
+ target[i]->ptr_ = pDoc;
+ target[i]->err_ = NULL;
+
+ // TEMP (?) post-condition code
+ if (target[i]->ptr_ == NULL)
+ {
+ thisHits->err_
+ = CreateError(ET_CPIX_EXC,
+ L"PANIC PANIC PANIC - NULL doc returned without any error message!");
+ }
+ //target ++;
+ }
}
}
--- a/searchengine/cpix/cpix/src/prefixqueryparser.cpp Mon Jul 26 12:27:31 2010 +0530
+++ b/searchengine/cpix/cpix/src/prefixqueryparser.cpp Mon Aug 09 10:51:30 2010 +0530
@@ -65,8 +65,8 @@
if ( q_.get() ) {
auto_ptr<BooleanQuery> bq( new BooleanQuery() );
bq_ = bq.get();
- bq_->add( q_.release(), true, true, false );
- bq_->add( q.release(), true, true, false );
+ bq_->add( q_.release(), true, false, false );
+ bq_->add( q.release(), true, false, false );
q_.reset( bq.release() );
} else {
q_ = q;
--- a/searchengine/cpix/tsrc/cpixsample/src/cpixsample.cpp Mon Jul 26 12:27:31 2010 +0530
+++ b/searchengine/cpix/tsrc/cpixsample/src/cpixsample.cpp Mon Aug 09 10:51:30 2010 +0530
@@ -75,7 +75,7 @@
*idxDb_ = cpix_IdxDb_openDb(&result,
TEST_DOCUMENT_QBASEAPPCLASS,
- cpix_IDX_CREATE);
+ cpix_IDX_OPEN);
if (cpix_Failed(&result))
{
printf("Failed to open indexDb\n");
@@ -187,17 +187,42 @@
}
cout << "Number of hits: " << hitCount << endl;
-
+ while (1)
+ {
+ int fromDoc;
+ int docCount;
+ printf("\nFrom: ");
+ scanf("%d",&fromDoc);
+ printf("\nHow many doc: ");
+ scanf("%d",&docCount);
+
cpix_Document
- doc;
-
- for (int32_t i = 0; i < hitCount; ++i)
+ **doc;
+
+ doc = (cpix_Document **) malloc (sizeof(cpix_Document *) * docCount);
+ for(int j = 0 ; j < docCount; j++)
{
+ doc[j] = (cpix_Document *) malloc (sizeof(cpix_Document));
+ doc[j]->ptr_ = NULL;
+ }
+
cpix_Hits_doc(hits,
- i,
- &doc);
+ fromDoc,
+ doc,
+ docCount);
+
+ for(int j = 0 ; docCount>j && doc[j]->ptr_ != NULL; j++)
+ {
+ printf("%d \n", j);
+ printHit(doc[j]);
+ }
+
+ for(int j = 0 ; j < docCount; j++)
+ free(doc[j]);
- printHit(&doc);
+
+ free(doc);
+
}
logDbgMsg("Shankar Ha hahah");
}
@@ -212,11 +237,14 @@
cpix_IdxDb * idxDb_ = NULL;
cpix_Hits * hits_;
- printf("Press a character to exit!\n");
+
- testInit(&analyzer_,&idxDb_);
+ testInit(&analyzer_,&idxDb_);
+ for(int j = 0; j < 10; j++)
+ {
createDocument(LDOCUID1,DOC1CONTENT, &analyzer_,&idxDb_);
createDocument(LDOCUID2,DOC2CONTENT, &analyzer_,&idxDb_);
+ }
queryParser_ = cpix_QueryParser_create(&result,
--- a/searchengine/cpix/tsrc/cpixunittest/inc/suggestion.h Mon Jul 26 12:27:31 2010 +0530
+++ b/searchengine/cpix/tsrc/cpixunittest/inc/suggestion.h Mon Aug 09 10:51:30 2010 +0530
@@ -34,7 +34,7 @@
const Suggestion & right);
public:
- Suggestion(cpix_Document & doc,
+ Suggestion(cpix_Document * doc,
Itk::TestMgr * testMgr);
--- a/searchengine/cpix/tsrc/cpixunittest/inc/testutils.h Mon Jul 26 12:27:31 2010 +0530
+++ b/searchengine/cpix/tsrc/cpixunittest/inc/testutils.h Mon Aug 09 10:51:30 2010 +0530
@@ -210,5 +210,11 @@
extern const Volume Volumes[];
+#define ALLOC_DOC(DOC, COUNT) DOC = (cpix_Document**)malloc (sizeof(cpix_Document*)* COUNT); \
+ for (int i = 0; i < COUNT; i++) { \
+ (DOC[i]) = (cpix_Document*)malloc (sizeof(cpix_Document)); \
+ DOC[i]->ptr_ = NULL; \
+ }
+#define FREE_DOC(DOC, COUNT) for (int i=0; i< COUNT; i++) free(DOC[i]); free (DOC);
#endif // CPIXUNITTEST_TESTUTILS_H_
--- a/searchengine/cpix/tsrc/cpixunittest/src/asynctests.cpp Mon Jul 26 12:27:31 2010 +0530
+++ b/searchengine/cpix/tsrc/cpixunittest/src/asynctests.cpp Mon Aug 09 10:51:30 2010 +0530
@@ -36,7 +36,7 @@
#include "testutils.h"
#include "testcorpus.h"
#include "setupsentry.h"
-
+#include "testutils.h"
#include "std_log_result.h"
// TODO PROPER, EXAMPLARY error clearing (cpix_ClearError())
@@ -587,7 +587,7 @@
bool call(cpix_Hits * hits,
int32_t index,
- cpix_Document * target,
+ cpix_Document ** target,
Itk::TestMgr * testMgr,
bool cancel)
{
@@ -605,7 +605,8 @@
index,
target,
this,
- &callback);
+ &callback,
+ 1);
}
ITK_ASSERT(testMgr,
@@ -725,7 +726,7 @@
SyncedDoc syncedDoc_;
- cpix_Document targetDoc_;
+ cpix_Document **targetDoc_;
Cpt::Mutex & cpixMutex_;
@@ -736,9 +737,13 @@
syncedDoc_(cpixMutex),
cpixMutex_(cpixMutex)
{
- ;
+ ALLOC_DOC(targetDoc_, 1);
}
-
+
+ ~SyncedSearch() {
+ FREE_DOC(targetDoc_, 1);
+ }
+
void call(cpix_IdxSearcher * searcher,
cpix_Query * query,
Itk::TestMgr * testMgr,
@@ -905,7 +910,7 @@
bool
succeeded = syncedDoc_.call(hits,
i,
- &targetDoc_,
+ targetDoc_,
testMgr,
(i%4) == 1); // cancel or not
@@ -914,7 +919,7 @@
Cpt::SyncRegion
sr(cpixMutex_);
- PrintHit(&targetDoc_,
+ PrintHit(targetDoc_[0],
testMgr);
}
}
--- a/searchengine/cpix/tsrc/cpixunittest/src/destructivetests.cpp Mon Jul 26 12:27:31 2010 +0530
+++ b/searchengine/cpix/tsrc/cpixunittest/src/destructivetests.cpp Mon Aug 09 10:51:30 2010 +0530
@@ -216,47 +216,59 @@
printf("Accessing hits after closing... \n");
cpix_Document
- doc;
-
+ **doc;
+ ALLOC_DOC(doc, 1);
+
printf("doc #0: ");
cpix_Hits_doc(hits,
0,
- &doc);
+ doc,
+ 1);
+ if (doc[0]->ptr_ != NULL) {
ITK_EXPECT( testMgr,
- cpix_Succeeded( hits ),
- "Accessing hit(0) should succeeded for closed database (hits still holds a reference to its originator)." );
+ cpix_Succeeded( hits ),
+ "Accessing hit(0) should succeeded for closed database (hits still holds a reference to its originator)." );
if (cpix_Failed(hits))
{
- wchar_t
- buf[256];
- cpix_Error_report(hits->err_,
- buf,
- sizeof(buf) / sizeof(wchar_t));
- printf("%S\n", buf);
- cpix_ClearError(hits);
-
+ wchar_t
+ buf[256];
+ cpix_Error_report(hits->err_,
+ buf,
+ sizeof(buf) / sizeof(wchar_t));
+ printf("%S\n", buf);
+ cpix_ClearError(hits);
+
}
+ }
+ FREE_DOC(doc, 1);
+
+ ALLOC_DOC(doc, 1)
printf("\ndoc #20: ");
cpix_Hits_doc(hits,
20,
- &doc);
+ doc,
+ 1);
+ if (doc[0]->ptr_ != NULL) {
ITK_EXPECT( testMgr,
- cpix_Failed( hits ),
- "Accessing hit(20) should NOT succeeded for closed database (hits still holds a reference to its originator)." );
+ cpix_Failed( hits ),
+ "Accessing hit(20) should NOT succeeded for closed database (hits still holds a reference to its originator)." );
if (cpix_Failed(hits))
{
- wchar_t
- buf[256];
- cpix_Error_report(hits->err_,
- buf,
- sizeof(buf) / sizeof(wchar_t));
- printf("%S\n", buf);
- cpix_ClearError(hits);
- assert_failed = 1;
+ wchar_t
+ buf[256];
+ cpix_Error_report(hits->err_,
+ buf,
+ sizeof(buf) / sizeof(wchar_t));
+ printf("%S\n", buf);
+ cpix_ClearError(hits);
+ assert_failed = 1;
}
+ }
+
+ FREE_DOC(doc, 1)
testResultXml(xml_file);
cpix_Hits_destroy( hits );
cpix_Query_destroy( query );
--- a/searchengine/cpix/tsrc/cpixunittest/src/documenttest.cpp Mon Jul 26 12:27:31 2010 +0530
+++ b/searchengine/cpix/tsrc/cpixunittest/src/documenttest.cpp Mon Aug 09 10:51:30 2010 +0530
@@ -375,53 +375,68 @@
// EXPECTED result is that doc2 first, doc1 second.
cpix_Document
- returnedDoc1;
+ **returnedDoc1;
- cpix_Hits_doc(hits_, 0, &returnedDoc1);
+ ALLOC_DOC(returnedDoc1, 1);
+ cpix_Hits_doc(hits_, 0, returnedDoc1, 1);
+ if (returnedDoc1[0]->ptr_ != NULL) {
- const wchar_t* id = cpix_Document_getFieldValue(&returnedDoc1,
- LCPIX_DOCUID_FIELD);
+ const wchar_t* id = cpix_Document_getFieldValue(returnedDoc1[0],
+ LCPIX_DOCUID_FIELD);
if (id)
- {
- std::wstring str(id);
- ITK_ASSERT(testMgr,
+ {
+ std::wstring str(id);
+ ITK_ASSERT(testMgr,
str.compare(LDOCUID2) == 0,
"wrong document");
- if(str.compare(LDOCUID2) != 0)
- {
- assert_failed = 1;
- }
+ if(str.compare(LDOCUID2) != 0)
+ {
+ assert_failed = 1;
+ }
+ }
+ else
+ {
+ assert_failed = 1;
+ ITK_PANIC("failed to get _docuid");
+ }
+ } else {
+ ITK_PANIC("could not fetch requested doc");
+ assert_failed = 1;
}
- else
- {
- assert_failed = 1;
- ITK_PANIC("failed to get _docuid");
- }
+ FREE_DOC(returnedDoc1, 1);
+
+ cpix_Document
+ **returnedDoc2;
+ ALLOC_DOC(returnedDoc2, 1)
+
+ cpix_Hits_doc(hits_, 1, returnedDoc2, 1);
+ if (returnedDoc2[0]->ptr_ != NULL) {
+ const wchar_t* id = NULL;
- cpix_Document
- returnedDoc2;
-
- cpix_Hits_doc(hits_, 1, &returnedDoc2);
- id = NULL;
-
- id = cpix_Document_getFieldValue(&returnedDoc2, LCPIX_DOCUID_FIELD);
+ id = cpix_Document_getFieldValue(returnedDoc2[0], LCPIX_DOCUID_FIELD);
if (id)
- {
- std::wstring str(id);
- ITK_ASSERT(testMgr,
+ {
+ std::wstring str(id);
+ ITK_ASSERT(testMgr,
str.compare(LDOCUID1) == 0,
"wrong document");
- if(str.compare(LDOCUID1) != 0)
- {
- assert_failed = 1;
- }
- }
+ if(str.compare(LDOCUID1) != 0)
+ {
+ assert_failed = 1;
+ }
+ }
else
- {
+ {
assert_failed = 1;
- ITK_PANIC("failed to get _docuid");
+ ITK_PANIC("failed to get _docuid");
+ }
+ } else {
+ ITK_PANIC("could not fetch requested doc");
+ assert_failed = 1;
}
+ FREE_DOC(returnedDoc2, 1);
testResultXml(xml_file);
+
}
@@ -455,52 +470,66 @@
// EXPECTED result is that doc1 first, doc2 second.
cpix_Document
- returnedDoc1;
+ **returnedDoc1;
+ ALLOC_DOC(returnedDoc1, 1)
- cpix_Hits_doc(hits_, 0, &returnedDoc1);
+ cpix_Hits_doc(hits_, 0, returnedDoc1, 1);
+ if (returnedDoc1[0]->ptr_ != NULL) {
- const wchar_t* id = cpix_Document_getFieldValue(&returnedDoc1,
- LCPIX_DOCUID_FIELD);
+ const wchar_t* id = cpix_Document_getFieldValue(returnedDoc1[0],
+ LCPIX_DOCUID_FIELD);
if ( id )
- {
- std::wstring str( id );
- ITK_ASSERT(testMgr,
+ {
+ std::wstring str( id );
+ ITK_ASSERT(testMgr,
str.compare(LDOCUID1) == 0,
"wrong document");
- if(str.compare(LDOCUID1) != 0)
- {
- assert_failed = 1;
- }
- }
+ if(str.compare(LDOCUID1) != 0)
+ {
+ assert_failed = 1;
+ }
+ }
else
- {
- ITK_PANIC("failed to get _docuid");
+ {
+ ITK_PANIC("failed to get _docuid");
+ assert_failed = 1;
+ }
+ } else {
+ ITK_PANIC("could not fetch requested doc");
assert_failed = 1;
}
+ FREE_DOC(returnedDoc1, 1);
cpix_Document
- returnedDoc2;
-
- cpix_Hits_doc(hits_, 1, &returnedDoc2);
- id = NULL;
+ **returnedDoc2;
+ ALLOC_DOC(returnedDoc2, 1);
- id = cpix_Document_getFieldValue(&returnedDoc2, LCPIX_DOCUID_FIELD );
+ cpix_Hits_doc(hits_, 1, returnedDoc2, 1);
+ if (returnedDoc2[0]->ptr_ != NULL) {
+ const wchar_t* id = NULL;
+
+ id = cpix_Document_getFieldValue(returnedDoc2[0], LCPIX_DOCUID_FIELD );
if ( id )
- {
- std::wstring str( id );
- ITK_ASSERT(testMgr,
+ {
+ std::wstring str( id );
+ ITK_ASSERT(testMgr,
str.compare(LDOCUID2) == 0,
"wrong document");
- if(str.compare(LDOCUID2) != 0)
- {
- assert_failed = 1;
- }
- }
+ if(str.compare(LDOCUID2) != 0)
+ {
+ assert_failed = 1;
+ }
+ }
else
- {
- ITK_PANIC("failed to get _docuid");
+ {
+ ITK_PANIC("failed to get _docuid");
+ assert_failed = 1;
+ }
+ } else {
+ ITK_PANIC("could not fetch requested doc");
assert_failed = 1;
}
+ FREE_DOC(returnedDoc2, 1);
testResultXml(xml_file);
}
@@ -532,52 +561,66 @@
// EXPECTED result is that doc1 first, doc2 second.
cpix_Document
- returnedDoc1;
+ **returnedDoc1;
+ ALLOC_DOC(returnedDoc1, 1);
- cpix_Hits_doc(hits_, 0, &returnedDoc1);
+ cpix_Hits_doc(hits_, 0, returnedDoc1, 1);
+ if (returnedDoc1[0]->ptr_ != NULL) {
- const wchar_t* id = cpix_Document_getFieldValue(&returnedDoc1,
- LCPIX_DOCUID_FIELD);
+ const wchar_t* id = cpix_Document_getFieldValue(returnedDoc1[0],
+ LCPIX_DOCUID_FIELD);
if (id)
- {
- std::wstring str(id);
- ITK_ASSERT(testMgr,
+ {
+ std::wstring str(id);
+ ITK_ASSERT(testMgr,
str.compare(LDOCUID1) == 0,
"wrong document");
- if(str.compare(LDOCUID1) != 0)
- {
- assert_failed = 1;
- }
- }
+ if(str.compare(LDOCUID1) != 0)
+ {
+ assert_failed = 1;
+ }
+ }
else
- {
- ITK_PANIC("failed to get _docuid");
+ {
+ ITK_PANIC("failed to get _docuid");
+ assert_failed = 1;
+ }
+ } else {
+ ITK_PANIC("could not fetch requested doc");
assert_failed = 1;
}
+ FREE_DOC(returnedDoc1, 1);
cpix_Document
- returnedDoc2;
-
- cpix_Hits_doc(hits_, 1, &returnedDoc2);
- id = NULL;
+ **returnedDoc2;
+ ALLOC_DOC(returnedDoc2, 1);
- id = cpix_Document_getFieldValue(&returnedDoc2, LCPIX_DOCUID_FIELD);
+ cpix_Hits_doc(hits_, 1, returnedDoc2, 1);
+ if (returnedDoc2[0]->ptr_ != NULL) {
+ const wchar_t* id = NULL;
+
+ id = cpix_Document_getFieldValue(returnedDoc2[0], LCPIX_DOCUID_FIELD);
if (id)
- {
- std::wstring str(id);
- ITK_ASSERT(testMgr,
+ {
+ std::wstring str(id);
+ ITK_ASSERT(testMgr,
str.compare(LDOCUID2) == 0,
"wrong document");
- if(str.compare(LDOCUID2) != 0)
- {
- assert_failed = 1;
- }
- }
+ if(str.compare(LDOCUID2) != 0)
+ {
+ assert_failed = 1;
+ }
+ }
else
- {
- ITK_PANIC("failed to get _docuid");
+ {
+ ITK_PANIC("failed to get _docuid");
+ assert_failed = 1;
+ }
+ } else {
+ ITK_PANIC("could not fetch requested doc");
assert_failed = 1;
}
+ FREE_DOC(returnedDoc2, 1);
testResultXml(xml_file);
}
@@ -625,52 +668,66 @@
// EXPECTED result is that doc2 first.
cpix_Document
- returnedDoc1;
+ **returnedDoc1;
+ ALLOC_DOC(returnedDoc1, 1);
- cpix_Hits_doc(hits_, 0, &returnedDoc1);
+ cpix_Hits_doc(hits_, 0, returnedDoc1, 1);
+ if (returnedDoc1[0]->ptr_ != NULL) {
- const wchar_t* id = cpix_Document_getFieldValue(&returnedDoc1,
- LCPIX_DOCUID_FIELD);
+ const wchar_t* id = cpix_Document_getFieldValue(returnedDoc1[0],
+ LCPIX_DOCUID_FIELD);
if (id)
- {
- std::wstring str(id);
- ITK_ASSERT(testMgr,
+ {
+ std::wstring str(id);
+ ITK_ASSERT(testMgr,
str.compare(LDOCUID1) == 0,
"wrong document");
- if(str.compare(LDOCUID2) != 0)
- {
- assert_failed = 1;
- }
- }
+ if(str.compare(LDOCUID2) != 0)
+ {
+ assert_failed = 1;
+ }
+ }
else
- {
- ITK_PANIC("failed to get _docuid");
+ {
+ ITK_PANIC("failed to get _docuid");
+ assert_failed = 1;
+ }
+ } else {
+ ITK_PANIC("could not fetch requested doc");
assert_failed = 1;
}
+ FREE_DOC(returnedDoc1, 1);
cpix_Document
- returnedDoc2;
-
- cpix_Hits_doc(hits_, 1, &returnedDoc2);
- id = NULL;
+ **returnedDoc2;
+ ALLOC_DOC(returnedDoc2, 1);
- id = cpix_Document_getFieldValue(&returnedDoc2, LCPIX_DOCUID_FIELD);
+ cpix_Hits_doc(hits_, 1, returnedDoc2, 1);
+ if (returnedDoc2[0]->ptr_ != NULL) {
+ const wchar_t* id = NULL;
+
+ id = cpix_Document_getFieldValue(returnedDoc2[0], LCPIX_DOCUID_FIELD);
if (id)
- {
- std::wstring str(id);
- ITK_ASSERT(testMgr,
+ {
+ std::wstring str(id);
+ ITK_ASSERT(testMgr,
str.compare(LDOCUID2) == 0,
"wrong document");
- if(str.compare(LDOCUID2) != 0)
- {
- assert_failed = 1;
- }
- }
+ if(str.compare(LDOCUID2) != 0)
+ {
+ assert_failed = 1;
+ }
+ }
else
- {
- ITK_PANIC("failed to get _docuid");
+ {
+ ITK_PANIC("failed to get _docuid");
+ assert_failed = 1;
+ }
+ } else {
+ ITK_PANIC("could not fetch requested doc");
assert_failed = 1;
}
+ FREE_DOC(returnedDoc2, 1);
testResultXml(xml_file);
}
};
--- a/searchengine/cpix/tsrc/cpixunittest/src/randomtest.cpp Mon Jul 26 12:27:31 2010 +0530
+++ b/searchengine/cpix/tsrc/cpixunittest/src/randomtest.cpp Mon Aug 09 10:51:30 2010 +0530
@@ -20,6 +20,7 @@
#include <sstream>
#include <time.h>
#include "std_log_result.h"
+#include "testutils.h"
using namespace std;
using namespace Itk;
@@ -456,10 +457,11 @@
bool found = false;
for ( int i = 0; i < cpix_Hits_length( hits ); i++ )
{
- cpix_Document doc;
- cpix_Hits_doc( hits, i, &doc );
-
- const wchar_t* id = cpix_Document_getFieldValue( &doc, LCPIX_DOCUID_FIELD );
+ cpix_Document **doc;
+ ALLOC_DOC (doc, 1);
+ cpix_Hits_doc( hits, i, doc, 1 );
+ if (doc[0]->ptr_ != NULL) {
+ const wchar_t* id = cpix_Document_getFieldValue( doc[0], LCPIX_DOCUID_FIELD );
if ( id )
{
@@ -470,6 +472,8 @@
break;
}
}
+ }
+ FREE_DOC(doc, 1);
}
if ( !found )
{
@@ -538,27 +542,33 @@
if ( hits )
{
- for ( int i = 0; i < cpix_Hits_length( hits ); i++ )
- {
- cpix_Document doc;
- cpix_Hits_doc( hits, i, &doc );
+ for ( int i = 0; i < cpix_Hits_length( hits ); i++ ) {
+
+ cpix_Document **doc;
+ ALLOC_DOC(doc, 1);
+ cpix_Hits_doc( hits, i, doc, 1 );
- const wchar_t* id = cpix_Document_getFieldValue( &doc, LCPIX_DOCUID_FIELD );
+ if (doc[0]->ptr_ != NULL) {
+
+ const wchar_t* id = cpix_Document_getFieldValue(doc[0],
+ LCPIX_DOCUID_FIELD);
- if ( id )
- {
- wstring str( id );
- size_t index = GetItemIndex( str.c_str() );
- wstring content( testCorpus_.item( index ) );
+ if (id)
+ {
+ wstring str(id);
+ size_t index = GetItemIndex(str.c_str());
+ wstring content(testCorpus_.item(index));
- // TODO expect instead of
- // assert otherwise cpix_Hits
- // instance leaks
- ITK_ASSERT( testMgr,
- containsTerm( content, term ),
- "False positive? Term %S not found in %S", term.c_str(), content.c_str() );
- matches++;
- }
+ // TODO expect instead of
+ // assert otherwise cpix_Hits
+ // instance leaks
+ ITK_ASSERT( testMgr,
+ containsTerm( content, term ),
+ "False positive? Term %S not found in %S", term.c_str(), content.c_str() );
+ matches++;
+ }
+ }
+ FREE_DOC(doc, 1);
}
cpix_Hits_destroy( hits );
}
--- a/searchengine/cpix/tsrc/cpixunittest/src/suggestion.cpp Mon Jul 26 12:27:31 2010 +0530
+++ b/searchengine/cpix/tsrc/cpixunittest/src/suggestion.cpp Mon Aug 09 10:51:30 2010 +0530
@@ -22,16 +22,17 @@
#include "suggestion.h"
#include "config.h"
+#include "testutils.h"
-Suggestion::Suggestion(cpix_Document & doc,
+Suggestion::Suggestion(cpix_Document * doc,
Itk::TestMgr * testMgr)
{
const wchar_t
- * value = cpix_Document_getFieldValue(&doc,
+ * value = cpix_Document_getFieldValue(doc,
LTERM_TEXT_FIELD);
- if (cpix_Failed(&doc))
+ if (cpix_Failed(doc))
{
ITK_EXPECT(testMgr,
false,
@@ -43,9 +44,9 @@
term_ = value;
}
- value = cpix_Document_getFieldValue(&doc,
+ value = cpix_Document_getFieldValue(doc,
LTERM_DOCFREQ_FIELD);
- if (cpix_Failed(&doc))
+ if (cpix_Failed(doc))
{
ITK_EXPECT(testMgr,
false,
@@ -128,23 +129,28 @@
for (int32_t i = 0; i < hitCount; ++i)
{
cpix_Document
- doc;
+ **doc;
+ ALLOC_DOC(doc, 1);
cpix_Hits_doc(hits,
i,
- &doc);
+ doc,
+ 1);
+ if (doc[0]->ptr_ != NULL) {
if (cpix_Failed(hits))
{
- ITK_EXPECT(testMgr,
- false,
- "Failed to get doc %d",
- i);
- cpix_ClearError(hits);
- goOn = false;
- break;
+ ITK_EXPECT(testMgr,
+ false,
+ "Failed to get doc %d",
+ i);
+ cpix_ClearError(hits);
+ goOn = false;
+ break;
}
- suggestions.push_back(Suggestion(doc,
- testMgr));
+ suggestions.push_back(Suggestion(doc[0],
+ testMgr));
+ }
+ FREE_DOC(doc, 1);
}
if (goOn)
--- a/searchengine/cpix/tsrc/cpixunittest/src/testutils.cpp Mon Jul 26 12:27:31 2010 +0530
+++ b/searchengine/cpix/tsrc/cpixunittest/src/testutils.cpp Mon Aug 09 10:51:30 2010 +0530
@@ -151,15 +151,17 @@
cout << "Number of hits: " << hitCount << endl;
cpix_Document
- doc;
+ **doc;
+ ALLOC_DOC(doc, 1);
for (int32_t i = 0; i < hitCount; ++i)
{
cpix_Hits_doc(hits,
i,
- &doc);
+ doc,
+ 1);
- if (cpix_Failed(hits))
+ if (cpix_Failed(hits) || (doc_Fetch_Failed(doc[0])))
{
ITK_EXPECT(testMgr,
false,
@@ -169,9 +171,11 @@
break;
}
// OBS PrintHit(&doc,
- printHitFunc(&doc,
+ printHitFunc(doc[0],
testMgr);
}
+
+ FREE_DOC(doc, 1);
}
@@ -329,15 +333,17 @@
cout << "Number of hits: " << hitCount << endl;
cpix_Document
- doc;
+ **doc;
+ ALLOC_DOC(doc, 1);
for (int32_t i = 0; i < hitCount; ++i)
{
cpix_Hits_doc(hits,
i,
- &doc);
+ doc,
+ 1);
- if (cpix_Failed(hits))
+ if (cpix_Failed(hits) || (doc_Fetch_Failed(doc[0])))
{
if (allowFailure)
{
@@ -355,9 +361,10 @@
cpix_ClearError(hits);
break;
}
- printHit(&doc,
+ printHit(doc[0],
testMgr);
}
+ FREE_DOC(doc, 1);
}
--- a/searchengine/cpix/tsrc/cpixunittest/src/whiteboxtests.cpp Mon Jul 26 12:27:31 2010 +0530
+++ b/searchengine/cpix/tsrc/cpixunittest/src/whiteboxtests.cpp Mon Aug 09 10:51:30 2010 +0530
@@ -514,13 +514,15 @@
for (int32_t hitDocIdx = from; hitDocIdx < to; ++hitDocIdx)
{
cpix_Document
- doc;
+ **doc;
+ ALLOC_DOC(doc, 1);
cpix_Hits_doc(hits,
hitDocIdx,
- &doc);
+ doc,
+ 1);
- if (cpix_Failed(hits))
+ if (cpix_Failed(hits) || (doc_Fetch_Failed(doc[0])))
{
wchar_t
buf[92];
@@ -534,8 +536,9 @@
break;
}
- util_->printHit(&doc,
+ util_->printHit(doc[0],
mgr);
+ FREE_DOC(doc, 1);
}
}
--- a/searcher/searchclient/bwins/cpixsearchclientu.def Mon Jul 26 12:27:31 2010 +0530
+++ b/searcher/searchclient/bwins/cpixsearchclientu.def Mon Aug 09 10:51:30 2010 +0530
@@ -1,97 +1,102 @@
EXPORTS
- ??0RSearchServerSession@@QAE@XZ @ 1 NONAME ; RSearchServerSession::RSearchServerSession(void)
- ??1CCPixIndexer@@UAE@XZ @ 2 NONAME ; CCPixIndexer::~CCPixIndexer(void)
- ??1CCPixSearcher@@UAE@XZ @ 3 NONAME ; CCPixSearcher::~CCPixSearcher(void)
- ??1CDocumentField@@UAE@XZ @ 4 NONAME ; CDocumentField::~CDocumentField(void)
- ??1CSearchDocument@@UAE@XZ @ 5 NONAME ; CSearchDocument::~CSearchDocument(void)
- ?Add@RSearchServerSubSession@@QAEXABVTDesC8@@AAVTRequestStatus@@@Z @ 6 NONAME ; void RSearchServerSubSession::Add(class TDesC8 const &, class TRequestStatus &)
- ?AddExcerptL@CSearchDocument@@QAEXABVTDesC16@@@Z @ 7 NONAME ; void CSearchDocument::AddExcerptL(class TDesC16 const &)
- ?AddFieldL@CSearchDocument@@QAEAAVCDocumentField@@ABVTDesC16@@0H@Z @ 8 NONAME ; class CDocumentField & CSearchDocument::AddFieldL(class TDesC16 const &, class TDesC16 const &, int)
- ?AddL@CCPixIndexer@@QAEXAAVMCPixIndexingRequestObserver@@ABVCSearchDocument@@@Z @ 9 NONAME ; void CCPixIndexer::AddL(class MCPixIndexingRequestObserver &, class CSearchDocument const &)
- ?AddL@CCPixIndexer@@QAEXABVCSearchDocument@@@Z @ 10 NONAME ; void CCPixIndexer::AddL(class CSearchDocument const &)
- ?AddL@RSearchServerSubSession@@QAEXABVTDesC8@@@Z @ 11 NONAME ; void RSearchServerSubSession::AddL(class TDesC8 const &)
- ?AppClass@CSearchDocument@@QBEABVTDesC16@@XZ @ 12 NONAME ; class TDesC16 const & CSearchDocument::AppClass(void) const
- ?Boost@CDocumentField@@QBEMXZ @ 13 NONAME ; float CDocumentField::Boost(void) const
- ?Boost@CSearchDocument@@QBEMXZ @ 14 NONAME ; float CSearchDocument::Boost(void) const
- ?CancelAll@RSearchServerSubSession@@QBEXXZ @ 15 NONAME ; void RSearchServerSubSession::CancelAll(void) const
- ?Close@RSearchServerSession@@QAEXXZ @ 16 NONAME ; void RSearchServerSession::Close(void)
- ?Config@CDocumentField@@QBEHXZ @ 17 NONAME ; int CDocumentField::Config(void) const
- ?Connect@RSearchServerSession@@QAEHXZ @ 18 NONAME ; int RSearchServerSession::Connect(void)
- ?DefineVolume@RSearchServerSession@@QAEHABVTDesC16@@0@Z @ 19 NONAME ; int RSearchServerSession::DefineVolume(class TDesC16 const &, class TDesC16 const &)
- ?Delete@RSearchServerSubSession@@QAEXABVTDesC16@@AAVTRequestStatus@@@Z @ 20 NONAME ; void RSearchServerSubSession::Delete(class TDesC16 const &, class TRequestStatus &)
- ?DeleteL@CCPixIndexer@@QAEXAAVMCPixIndexingRequestObserver@@ABVTDesC16@@@Z @ 21 NONAME ; void CCPixIndexer::DeleteL(class MCPixIndexingRequestObserver &, class TDesC16 const &)
- ?DeleteL@CCPixIndexer@@QAEXABVTDesC16@@@Z @ 22 NONAME ; void CCPixIndexer::DeleteL(class TDesC16 const &)
- ?DeleteL@RSearchServerSubSession@@QAEXABVTDesC16@@@Z @ 23 NONAME ; void RSearchServerSubSession::DeleteL(class TDesC16 const &)
- ?Excerpt@CSearchDocument@@QBEABVTDesC16@@XZ @ 24 NONAME ; class TDesC16 const & CSearchDocument::Excerpt(void) const
- ?ExternalizeL@CDocumentField@@QBEXAAVRWriteStream@@@Z @ 25 NONAME ; void CDocumentField::ExternalizeL(class RWriteStream &) const
- ?ExternalizeL@CSearchDocument@@QBEXAAVRWriteStream@@@Z @ 26 NONAME ; void CSearchDocument::ExternalizeL(class RWriteStream &) const
- ?Field@CSearchDocument@@QBEABVCDocumentField@@H@Z @ 27 NONAME ; class CDocumentField const & CSearchDocument::Field(int) const
- ?Field@CSearchDocument@@QBEPBVCDocumentField@@ABVTDesC16@@@Z @ 28 NONAME ; class CDocumentField const * CSearchDocument::Field(class TDesC16 const &) const
- ?FieldCount@CSearchDocument@@QBEHXZ @ 29 NONAME ; int CSearchDocument::FieldCount(void) const
- ?Flush@RSearchServerSubSession@@QAEXAAVTRequestStatus@@@Z @ 30 NONAME ; void RSearchServerSubSession::Flush(class TRequestStatus &)
- ?FlushL@CCPixIndexer@@QAEXAAVMCPixIndexingRequestObserver@@@Z @ 31 NONAME ; void CCPixIndexer::FlushL(class MCPixIndexingRequestObserver &)
- ?FlushL@CCPixIndexer@@QAEXXZ @ 32 NONAME ; void CCPixIndexer::FlushL(void)
- ?FlushL@RSearchServerSubSession@@QAEXXZ @ 33 NONAME ; void RSearchServerSubSession::FlushL(void)
- ?GetBaseAppClass@CCPixIndexer@@QBEABVTDesC16@@XZ @ 34 NONAME ; class TDesC16 const & CCPixIndexer::GetBaseAppClass(void) const
- ?GetBaseAppClass@CCPixSearcher@@QBEABVTDesC16@@XZ @ 35 NONAME ; class TDesC16 const & CCPixSearcher::GetBaseAppClass(void) const
- ?GetDocument@RSearchServerSubSession@@QAEXHAAVTRequestStatus@@@Z @ 36 NONAME ; void RSearchServerSubSession::GetDocument(int, class TRequestStatus &)
- ?GetDocumentL@CCPixSearcher@@QAEPAVCSearchDocument@@H@Z @ 37 NONAME ; class CSearchDocument * CCPixSearcher::GetDocumentL(int)
- ?GetDocumentL@CCPixSearcher@@QAEXHAAVMCPixNextDocumentRequestObserver@@@Z @ 38 NONAME ; void CCPixSearcher::GetDocumentL(int, class MCPixNextDocumentRequestObserver &)
- ?GetDocumentL@RSearchServerSubSession@@QAEPAVCSearchDocument@@H@Z @ 39 NONAME ; class CSearchDocument * RSearchServerSubSession::GetDocumentL(int)
- ?GetDocumentObjectL@RSearchServerSubSession@@QAEPAVCSearchDocument@@XZ @ 40 NONAME ; class CSearchDocument * RSearchServerSubSession::GetDocumentObjectL(void)
- ?Id@CSearchDocument@@QBEABVTDesC16@@XZ @ 41 NONAME ; class TDesC16 const & CSearchDocument::Id(void) const
- ?InternalizeL@CDocumentField@@QAEXAAVRReadStream@@@Z @ 42 NONAME ; void CDocumentField::InternalizeL(class RReadStream &)
- ?InternalizeL@CSearchDocument@@QAEXAAVRReadStream@@@Z @ 43 NONAME ; void CSearchDocument::InternalizeL(class RReadStream &)
- ?IsDatabaseOpen@CCPixIndexer@@QBEHXZ @ 44 NONAME ; int CCPixIndexer::IsDatabaseOpen(void) const
- ?IsDatabaseOpen@CCPixSearcher@@QBEHXZ @ 45 NONAME ; int CCPixSearcher::IsDatabaseOpen(void) const
- ?Name@CDocumentField@@QBEABVTDesC16@@XZ @ 46 NONAME ; class TDesC16 const & CDocumentField::Name(void) const
- ?NewL@CCPixIndexer@@SAPAV1@AAVRSearchServerSession@@@Z @ 47 NONAME ; class CCPixIndexer * CCPixIndexer::NewL(class RSearchServerSession &)
- ?NewL@CCPixSearcher@@SAPAV1@AAVRSearchServerSession@@ABVTDesC16@@@Z @ 48 NONAME ; class CCPixSearcher * CCPixSearcher::NewL(class RSearchServerSession &, class TDesC16 const &)
- ?NewL@CDocumentField@@SAPAV1@AAVRReadStream@@@Z @ 49 NONAME ; class CDocumentField * CDocumentField::NewL(class RReadStream &)
- ?NewL@CDocumentField@@SAPAV1@ABVTDesC16@@0H@Z @ 50 NONAME ; class CDocumentField * CDocumentField::NewL(class TDesC16 const &, class TDesC16 const &, int)
- ?NewL@CSearchDocument@@SAPAV1@AAVRReadStream@@@Z @ 51 NONAME ; class CSearchDocument * CSearchDocument::NewL(class RReadStream &)
- ?NewL@CSearchDocument@@SAPAV1@ABVTDesC16@@00W4TFilterId@1@@Z @ 52 NONAME ; class CSearchDocument * CSearchDocument::NewL(class TDesC16 const &, class TDesC16 const &, class TDesC16 const &, enum CSearchDocument::TFilterId)
- ?NewLC@CCPixIndexer@@SAPAV1@AAVRSearchServerSession@@@Z @ 53 NONAME ; class CCPixIndexer * CCPixIndexer::NewLC(class RSearchServerSession &)
- ?NewLC@CCPixSearcher@@SAPAV1@AAVRSearchServerSession@@ABVTDesC16@@@Z @ 54 NONAME ; class CCPixSearcher * CCPixSearcher::NewLC(class RSearchServerSession &, class TDesC16 const &)
- ?NewLC@CDocumentField@@SAPAV1@AAVRReadStream@@@Z @ 55 NONAME ; class CDocumentField * CDocumentField::NewLC(class RReadStream &)
- ?NewLC@CDocumentField@@SAPAV1@ABVTDesC16@@0H@Z @ 56 NONAME ; class CDocumentField * CDocumentField::NewLC(class TDesC16 const &, class TDesC16 const &, int)
- ?NewLC@CSearchDocument@@SAPAV1@AAVRReadStream@@@Z @ 57 NONAME ; class CSearchDocument * CSearchDocument::NewLC(class RReadStream &)
- ?NewLC@CSearchDocument@@SAPAV1@ABVTDesC16@@00W4TFilterId@1@@Z @ 58 NONAME ; class CSearchDocument * CSearchDocument::NewLC(class TDesC16 const &, class TDesC16 const &, class TDesC16 const &, enum CSearchDocument::TFilterId)
- ?OpenDatabaseL@CCPixIndexer@@QAEXAAVMCPixOpenDatabaseRequestObserver@@ABVTDesC16@@@Z @ 59 NONAME ; void CCPixIndexer::OpenDatabaseL(class MCPixOpenDatabaseRequestObserver &, class TDesC16 const &)
- ?OpenDatabaseL@CCPixIndexer@@QAEXABVTDesC16@@@Z @ 60 NONAME ; void CCPixIndexer::OpenDatabaseL(class TDesC16 const &)
- ?OpenDatabaseL@CCPixSearcher@@QAEXAAVMCPixOpenDatabaseRequestObserver@@ABVTDesC16@@@Z @ 61 NONAME ; void CCPixSearcher::OpenDatabaseL(class MCPixOpenDatabaseRequestObserver &, class TDesC16 const &)
- ?OpenDatabaseL@CCPixSearcher@@QAEXABVTDesC16@@@Z @ 62 NONAME ; void CCPixSearcher::OpenDatabaseL(class TDesC16 const &)
- ?RemoveField@CSearchDocument@@QAEHABVTDesC16@@@Z @ 63 NONAME ; int CSearchDocument::RemoveField(class TDesC16 const &)
- ?Reset@RSearchServerSubSession@@QAEXAAVTRequestStatus@@@Z @ 64 NONAME ; void RSearchServerSubSession::Reset(class TRequestStatus &)
- ?ResetL@CCPixIndexer@@QAEXAAVMCPixIndexingRequestObserver@@@Z @ 65 NONAME ; void CCPixIndexer::ResetL(class MCPixIndexingRequestObserver &)
- ?ResetL@CCPixIndexer@@QAEXXZ @ 66 NONAME ; void CCPixIndexer::ResetL(void)
- ?ResetL@RSearchServerSubSession@@QAEXXZ @ 67 NONAME ; void RSearchServerSubSession::ResetL(void)
- ?Search@RSearchServerSubSession@@QAEXABVTDesC16@@AAVTRequestStatus@@@Z @ 68 NONAME ; void RSearchServerSubSession::Search(class TDesC16 const &, class TRequestStatus &)
- ?SearchL@CCPixSearcher@@QAEHABVTDesC16@@0@Z @ 69 NONAME ; int CCPixSearcher::SearchL(class TDesC16 const &, class TDesC16 const &)
- ?SearchL@CCPixSearcher@@QAEXAAVMCPixSearchRequestObserver@@ABVTDesC16@@1@Z @ 70 NONAME ; void CCPixSearcher::SearchL(class MCPixSearchRequestObserver &, class TDesC16 const &, class TDesC16 const &)
- ?SearchL@RSearchServerSubSession@@QAEXABVTDesC16@@@Z @ 71 NONAME ; void RSearchServerSubSession::SearchL(class TDesC16 const &)
- ?SetAnalyzer@RSearchServerSubSession@@QAEXABVTDesC16@@AAVTRequestStatus@@@Z @ 72 NONAME ; void RSearchServerSubSession::SetAnalyzer(class TDesC16 const &, class TRequestStatus &)
- ?SetAnalyzerL@CCPixIndexer@@QAEXAAVMCPixSetAnalyzerRequestObserver@@ABVTDesC16@@@Z @ 73 NONAME ; void CCPixIndexer::SetAnalyzerL(class MCPixSetAnalyzerRequestObserver &, class TDesC16 const &)
- ?SetAnalyzerL@CCPixIndexer@@QAEXABVTDesC16@@@Z @ 74 NONAME ; void CCPixIndexer::SetAnalyzerL(class TDesC16 const &)
- ?SetAnalyzerL@CCPixSearcher@@QAEXAAVMCPixSetAnalyzerRequestObserver@@ABVTDesC16@@@Z @ 75 NONAME ; void CCPixSearcher::SetAnalyzerL(class MCPixSetAnalyzerRequestObserver &, class TDesC16 const &)
- ?SetAnalyzerL@CCPixSearcher@@QAEXABVTDesC16@@@Z @ 76 NONAME ; void CCPixSearcher::SetAnalyzerL(class TDesC16 const &)
- ?SetAnalyzerL@RSearchServerSubSession@@QAEXABVTDesC16@@@Z @ 77 NONAME ; void RSearchServerSubSession::SetAnalyzerL(class TDesC16 const &)
- ?SetBoost@CDocumentField@@QAEXM@Z @ 78 NONAME ; void CDocumentField::SetBoost(float)
- ?SetBoost@CSearchDocument@@QAEXM@Z @ 79 NONAME ; void CSearchDocument::SetBoost(float)
- ?Size@CDocumentField@@QBEHXZ @ 80 NONAME ; int CDocumentField::Size(void) const
- ?Size@CSearchDocument@@QBEHXZ @ 81 NONAME ; int CSearchDocument::Size(void) const
- ?UnDefineVolume@RSearchServerSession@@QAEHABVTDesC16@@@Z @ 82 NONAME ; int RSearchServerSession::UnDefineVolume(class TDesC16 const &)
- ?Update@RSearchServerSubSession@@QAEXABVTDesC8@@AAVTRequestStatus@@@Z @ 83 NONAME ; void RSearchServerSubSession::Update(class TDesC8 const &, class TRequestStatus &)
- ?UpdateL@CCPixIndexer@@QAEXAAVMCPixIndexingRequestObserver@@ABVCSearchDocument@@@Z @ 84 NONAME ; void CCPixIndexer::UpdateL(class MCPixIndexingRequestObserver &, class CSearchDocument const &)
- ?UpdateL@CCPixIndexer@@QAEXABVCSearchDocument@@@Z @ 85 NONAME ; void CCPixIndexer::UpdateL(class CSearchDocument const &)
- ?UpdateL@RSearchServerSubSession@@QAEXABVTDesC8@@@Z @ 86 NONAME ; void RSearchServerSubSession::UpdateL(class TDesC8 const &)
- ?Value@CDocumentField@@QBEABVTDesC16@@XZ @ 87 NONAME ; class TDesC16 const & CDocumentField::Value(void) const
- ?Version@RSearchServerSession@@QBE?AVTVersion@@XZ @ 88 NONAME ; class TVersion RSearchServerSession::Version(void) const
- ?ContinueHouseKeeping@RSearchServerSession@@QAEHXZ @ 89 NONAME ; int RSearchServerSession::ContinueHouseKeeping(void)
- ?ForceHouseKeeping@RSearchServerSession@@QAEHXZ @ 90 NONAME ; int RSearchServerSession::ForceHouseKeeping(void)
- ?StopHouseKeeping@RSearchServerSession@@QAEHXZ @ 91 NONAME ; int RSearchServerSession::StopHouseKeeping(void)
- ?SetQueryParserL@RSearchServerSubSession@@QAEXH@Z @ 92 NONAME ; void RSearchServerSubSession::SetQueryParserL(int)
- ?SetQueryParserL@CCPixSearcher@@QAEXW4TQueryParser@1@@Z @ 93 NONAME ; void CCPixSearcher::SetQueryParserL(enum CCPixSearcher::TQueryParser)
- ?SetQueryParserL@CCPixSearcher@@QAEXAAVMCPixSetQueryParserRequestObserver@@W4TQueryParser@1@@Z @ 94 NONAME ; void CCPixSearcher::SetQueryParserL(class MCPixSetQueryParserRequestObserver &, enum CCPixSearcher::TQueryParser)
- ?SetQueryParser@RSearchServerSubSession@@QAEXHAAVTRequestStatus@@@Z @ 95 NONAME ; void RSearchServerSubSession::SetQueryParser(int, class TRequestStatus &)
+ ?OpenDatabaseL@CCPixSearcher@@QAEXAAVMCPixOpenDatabaseRequestObserver@@ABVTDesC16@@@Z @ 1 NONAME ; void CCPixSearcher::OpenDatabaseL(class MCPixOpenDatabaseRequestObserver &, class TDesC16 const &)
+ ?NewL@CSearchDocument@@SAPAV1@ABVTDesC16@@00W4TFilterId@1@@Z @ 2 NONAME ; class CSearchDocument * CSearchDocument::NewL(class TDesC16 const &, class TDesC16 const &, class TDesC16 const &, enum CSearchDocument::TFilterId)
+ ?DeleteL@CCPixIndexer@@QAEXAAVMCPixIndexingRequestObserver@@ABVTDesC16@@@Z @ 3 NONAME ; void CCPixIndexer::DeleteL(class MCPixIndexingRequestObserver &, class TDesC16 const &)
+ ?SetAnalyzerL@RSearchServerSubSession@@QAEXABVTDesC16@@@Z @ 4 NONAME ; void RSearchServerSubSession::SetAnalyzerL(class TDesC16 const &)
+ ?GetDocument@RSearchServerSubSession@@QAEXHAAVTRequestStatus@@@Z @ 5 NONAME ; void RSearchServerSubSession::GetDocument(int, class TRequestStatus &)
+ ?SetAnalyzerL@CCPixIndexer@@QAEXAAVMCPixSetAnalyzerRequestObserver@@ABVTDesC16@@@Z @ 6 NONAME ; void CCPixIndexer::SetAnalyzerL(class MCPixSetAnalyzerRequestObserver &, class TDesC16 const &)
+ ?SearchL@CCPixSearcher@@QAEHABVTDesC16@@0@Z @ 7 NONAME ; int CCPixSearcher::SearchL(class TDesC16 const &, class TDesC16 const &)
+ ?Update@RSearchServerSubSession@@QAEXABVTDesC8@@AAVTRequestStatus@@@Z @ 8 NONAME ; void RSearchServerSubSession::Update(class TDesC8 const &, class TRequestStatus &)
+ ?OpenDatabaseL@CCPixSearcher@@QAEXABVTDesC16@@@Z @ 9 NONAME ; void CCPixSearcher::OpenDatabaseL(class TDesC16 const &)
+ ?GetBatchDocumentL@RSearchServerSubSession@@QAEPAPAVCSearchDocument@@HAAHH@Z @ 10 NONAME ; class CSearchDocument * * RSearchServerSubSession::GetBatchDocumentL(int, int &, int)
+ ?Delete@RSearchServerSubSession@@QAEXABVTDesC16@@AAVTRequestStatus@@@Z @ 11 NONAME ; void RSearchServerSubSession::Delete(class TDesC16 const &, class TRequestStatus &)
+ ?SetAnalyzerL@CCPixSearcher@@QAEXABVTDesC16@@@Z @ 12 NONAME ; void CCPixSearcher::SetAnalyzerL(class TDesC16 const &)
+ ?SetAnalyzer@RSearchServerSubSession@@QAEXABVTDesC16@@AAVTRequestStatus@@@Z @ 13 NONAME ; void RSearchServerSubSession::SetAnalyzer(class TDesC16 const &, class TRequestStatus &)
+ ?Size@CSearchDocument@@QBEHXZ @ 14 NONAME ; int CSearchDocument::Size(void) const
+ ?AppClass@CSearchDocument@@QBEABVTDesC16@@XZ @ 15 NONAME ; class TDesC16 const & CSearchDocument::AppClass(void) const
+ ?NewL@CCPixSearcher@@SAPAV1@AAVRSearchServerSession@@ABVTDesC16@@@Z @ 16 NONAME ; class CCPixSearcher * CCPixSearcher::NewL(class RSearchServerSession &, class TDesC16 const &)
+ ?ForceHouseKeeping@RSearchServerSession@@QAEHXZ @ 17 NONAME ; int RSearchServerSession::ForceHouseKeeping(void)
+ ?DeleteL@RSearchServerSubSession@@QAEXABVTDesC16@@@Z @ 18 NONAME ; void RSearchServerSubSession::DeleteL(class TDesC16 const &)
+ ?GetDocumentL@CCPixSearcher@@QAEPAVCSearchDocument@@H@Z @ 19 NONAME ; class CSearchDocument * CCPixSearcher::GetDocumentL(int)
+ ?SetQueryParserL@RSearchServerSubSession@@QAEXH@Z @ 20 NONAME ; void RSearchServerSubSession::SetQueryParserL(int)
+ ?GetBatchDocument@RSearchServerSubSession@@QAEXHAAVTRequestStatus@@H@Z @ 21 NONAME ; void RSearchServerSubSession::GetBatchDocument(int, class TRequestStatus &, int)
+ ??1CDocumentField@@UAE@XZ @ 22 NONAME ; CDocumentField::~CDocumentField(void)
+ ??1CSearchDocument@@UAE@XZ @ 23 NONAME ; CSearchDocument::~CSearchDocument(void)
+ ?Value@CDocumentField@@QBEABVTDesC16@@XZ @ 24 NONAME ; class TDesC16 const & CDocumentField::Value(void) const
+ ?UpdateL@CCPixIndexer@@QAEXAAVMCPixIndexingRequestObserver@@ABVCSearchDocument@@@Z @ 25 NONAME ; void CCPixIndexer::UpdateL(class MCPixIndexingRequestObserver &, class CSearchDocument const &)
+ ?ResetL@CCPixIndexer@@QAEXAAVMCPixIndexingRequestObserver@@@Z @ 26 NONAME ; void CCPixIndexer::ResetL(class MCPixIndexingRequestObserver &)
+ ?NewLC@CDocumentField@@SAPAV1@AAVRReadStream@@@Z @ 27 NONAME ; class CDocumentField * CDocumentField::NewLC(class RReadStream &)
+ ?Connect@RSearchServerSession@@QAEHXZ @ 28 NONAME ; int RSearchServerSession::Connect(void)
+ ?IsDatabaseOpen@CCPixSearcher@@QBEHXZ @ 29 NONAME ; int CCPixSearcher::IsDatabaseOpen(void) const
+ ?AddL@CCPixIndexer@@QAEXABVCSearchDocument@@@Z @ 30 NONAME ; void CCPixIndexer::AddL(class CSearchDocument const &)
+ ?CancelAll@RSearchServerSubSession@@QBEXXZ @ 31 NONAME ; void RSearchServerSubSession::CancelAll(void) const
+ ?SetQueryParserL@CCPixSearcher@@QAEXW4TQueryParser@1@@Z @ 32 NONAME ; void CCPixSearcher::SetQueryParserL(enum CCPixSearcher::TQueryParser)
+ ?SearchL@CCPixSearcher@@QAEXAAVMCPixSearchRequestObserver@@ABVTDesC16@@1@Z @ 33 NONAME ; void CCPixSearcher::SearchL(class MCPixSearchRequestObserver &, class TDesC16 const &, class TDesC16 const &)
+ ?Close@RSearchServerSession@@QAEXXZ @ 34 NONAME ; void RSearchServerSession::Close(void)
+ ?Id@CSearchDocument@@QBEABVTDesC16@@XZ @ 35 NONAME ; class TDesC16 const & CSearchDocument::Id(void) const
+ ?GetDocumentObjectL@RSearchServerSubSession@@QAEPAVCSearchDocument@@XZ @ 36 NONAME ; class CSearchDocument * RSearchServerSubSession::GetDocumentObjectL(void)
+ ?UpdateL@CCPixIndexer@@QAEXABVCSearchDocument@@@Z @ 37 NONAME ; void CCPixIndexer::UpdateL(class CSearchDocument const &)
+ ?GetBaseAppClass@CCPixSearcher@@QBEABVTDesC16@@XZ @ 38 NONAME ; class TDesC16 const & CCPixSearcher::GetBaseAppClass(void) const
+ ?OpenDatabaseL@CCPixIndexer@@QAEXAAVMCPixOpenDatabaseRequestObserver@@ABVTDesC16@@@Z @ 39 NONAME ; void CCPixIndexer::OpenDatabaseL(class MCPixOpenDatabaseRequestObserver &, class TDesC16 const &)
+ ?InternalizeL@CDocumentField@@QAEXAAVRReadStream@@@Z @ 40 NONAME ; void CDocumentField::InternalizeL(class RReadStream &)
+ ??0RSearchServerSession@@QAE@XZ @ 41 NONAME ; RSearchServerSession::RSearchServerSession(void)
+ ?NewL@CCPixIndexer@@SAPAV1@AAVRSearchServerSession@@@Z @ 42 NONAME ; class CCPixIndexer * CCPixIndexer::NewL(class RSearchServerSession &)
+ ?GetBatchDocumentL@CCPixSearcher@@QAEXHAAVMCPixNextDocumentRequestObserver@@H@Z @ 43 NONAME ; void CCPixSearcher::GetBatchDocumentL(int, class MCPixNextDocumentRequestObserver &, int)
+ ?Version@RSearchServerSession@@QBE?AVTVersion@@XZ @ 44 NONAME ; class TVersion RSearchServerSession::Version(void) const
+ ?AddExcerptL@CSearchDocument@@QAEXABVTDesC16@@@Z @ 45 NONAME ; void CSearchDocument::AddExcerptL(class TDesC16 const &)
+ ?Config@CDocumentField@@QBEHXZ @ 46 NONAME ; int CDocumentField::Config(void) const
+ ?Boost@CDocumentField@@QBEMXZ @ 47 NONAME ; float CDocumentField::Boost(void) const
+ ?GetDocumentL@RSearchServerSubSession@@QAEPAVCSearchDocument@@H@Z @ 48 NONAME ; class CSearchDocument * RSearchServerSubSession::GetDocumentL(int)
+ ?FlushL@CCPixIndexer@@QAEXAAVMCPixIndexingRequestObserver@@@Z @ 49 NONAME ; void CCPixIndexer::FlushL(class MCPixIndexingRequestObserver &)
+ ?FlushL@RSearchServerSubSession@@QAEXXZ @ 50 NONAME ; void RSearchServerSubSession::FlushL(void)
+ ?ResetL@CCPixIndexer@@QAEXXZ @ 51 NONAME ; void CCPixIndexer::ResetL(void)
+ ?ExternalizeL@CSearchDocument@@QBEXAAVRWriteStream@@@Z @ 52 NONAME ; void CSearchDocument::ExternalizeL(class RWriteStream &) const
+ ?Search@RSearchServerSubSession@@QAEXABVTDesC16@@AAVTRequestStatus@@@Z @ 53 NONAME ; void RSearchServerSubSession::Search(class TDesC16 const &, class TRequestStatus &)
+ ?Size@CDocumentField@@QBEHXZ @ 54 NONAME ; int CDocumentField::Size(void) const
+ ?NewL@CDocumentField@@SAPAV1@AAVRReadStream@@@Z @ 55 NONAME ; class CDocumentField * CDocumentField::NewL(class RReadStream &)
+ ?NewLC@CSearchDocument@@SAPAV1@ABVTDesC16@@00W4TFilterId@1@@Z @ 56 NONAME ; class CSearchDocument * CSearchDocument::NewLC(class TDesC16 const &, class TDesC16 const &, class TDesC16 const &, enum CSearchDocument::TFilterId)
+ ?DeleteL@CCPixIndexer@@QAEXABVTDesC16@@@Z @ 57 NONAME ; void CCPixIndexer::DeleteL(class TDesC16 const &)
+ ?NewLC@CDocumentField@@SAPAV1@ABVTDesC16@@0H@Z @ 58 NONAME ; class CDocumentField * CDocumentField::NewLC(class TDesC16 const &, class TDesC16 const &, int)
+ ?GetBatchDocumentObjectL@RSearchServerSubSession@@QAEPAPAVCSearchDocument@@AAH@Z @ 59 NONAME ; class CSearchDocument * * RSearchServerSubSession::GetBatchDocumentObjectL(int &)
+ ??1CCPixSearcher@@UAE@XZ @ 60 NONAME ; CCPixSearcher::~CCPixSearcher(void)
+ ?SetBoost@CSearchDocument@@QAEXM@Z @ 61 NONAME ; void CSearchDocument::SetBoost(float)
+ ?IsDatabaseOpen@CCPixIndexer@@QBEHXZ @ 62 NONAME ; int CCPixIndexer::IsDatabaseOpen(void) const
+ ?NewL@CDocumentField@@SAPAV1@ABVTDesC16@@0H@Z @ 63 NONAME ; class CDocumentField * CDocumentField::NewL(class TDesC16 const &, class TDesC16 const &, int)
+ ?Flush@RSearchServerSubSession@@QAEXAAVTRequestStatus@@@Z @ 64 NONAME ; void RSearchServerSubSession::Flush(class TRequestStatus &)
+ ?Field@CSearchDocument@@QBEPBVCDocumentField@@ABVTDesC16@@@Z @ 65 NONAME ; class CDocumentField const * CSearchDocument::Field(class TDesC16 const &) const
+ ?NewLC@CSearchDocument@@SAPAV1@AAVRReadStream@@@Z @ 66 NONAME ; class CSearchDocument * CSearchDocument::NewLC(class RReadStream &)
+ ?StopHouseKeeping@RSearchServerSession@@QAEHXZ @ 67 NONAME ; int RSearchServerSession::StopHouseKeeping(void)
+ ?AddFieldL@CSearchDocument@@QAEAAVCDocumentField@@ABVTDesC16@@0H@Z @ 68 NONAME ; class CDocumentField & CSearchDocument::AddFieldL(class TDesC16 const &, class TDesC16 const &, int)
+ ?Field@CSearchDocument@@QBEABVCDocumentField@@H@Z @ 69 NONAME ; class CDocumentField const & CSearchDocument::Field(int) const
+ ?SetAnalyzerL@CCPixIndexer@@QAEXABVTDesC16@@@Z @ 70 NONAME ; void CCPixIndexer::SetAnalyzerL(class TDesC16 const &)
+ ?ResetL@RSearchServerSubSession@@QAEXXZ @ 71 NONAME ; void RSearchServerSubSession::ResetL(void)
+ ?FieldCount@CSearchDocument@@QBEHXZ @ 72 NONAME ; int CSearchDocument::FieldCount(void) const
+ ?NewLC@CCPixSearcher@@SAPAV1@AAVRSearchServerSession@@ABVTDesC16@@@Z @ 73 NONAME ; class CCPixSearcher * CCPixSearcher::NewLC(class RSearchServerSession &, class TDesC16 const &)
+ ?Excerpt@CSearchDocument@@QBEABVTDesC16@@XZ @ 74 NONAME ; class TDesC16 const & CSearchDocument::Excerpt(void) const
+ ?GetBaseAppClass@CCPixIndexer@@QBEABVTDesC16@@XZ @ 75 NONAME ; class TDesC16 const & CCPixIndexer::GetBaseAppClass(void) const
+ ?OpenDatabaseL@CCPixIndexer@@QAEXABVTDesC16@@@Z @ 76 NONAME ; void CCPixIndexer::OpenDatabaseL(class TDesC16 const &)
+ ?SetAnalyzerL@CCPixSearcher@@QAEXAAVMCPixSetAnalyzerRequestObserver@@ABVTDesC16@@@Z @ 77 NONAME ; void CCPixSearcher::SetAnalyzerL(class MCPixSetAnalyzerRequestObserver &, class TDesC16 const &)
+ ?Boost@CSearchDocument@@QBEMXZ @ 78 NONAME ; float CSearchDocument::Boost(void) const
+ ?SearchL@RSearchServerSubSession@@QAEXABVTDesC16@@@Z @ 79 NONAME ; void RSearchServerSubSession::SearchL(class TDesC16 const &)
+ ?DefineVolume@RSearchServerSession@@QAEHABVTDesC16@@0@Z @ 80 NONAME ; int RSearchServerSession::DefineVolume(class TDesC16 const &, class TDesC16 const &)
+ ?InternalizeL@CSearchDocument@@QAEXAAVRReadStream@@@Z @ 81 NONAME ; void CSearchDocument::InternalizeL(class RReadStream &)
+ ?Name@CDocumentField@@QBEABVTDesC16@@XZ @ 82 NONAME ; class TDesC16 const & CDocumentField::Name(void) const
+ ?Reset@RSearchServerSubSession@@QAEXAAVTRequestStatus@@@Z @ 83 NONAME ; void RSearchServerSubSession::Reset(class TRequestStatus &)
+ ?AddL@CCPixIndexer@@QAEXAAVMCPixIndexingRequestObserver@@ABVCSearchDocument@@@Z @ 84 NONAME ; void CCPixIndexer::AddL(class MCPixIndexingRequestObserver &, class CSearchDocument const &)
+ ?SetQueryParserL@CCPixSearcher@@QAEXAAVMCPixSetQueryParserRequestObserver@@W4TQueryParser@1@@Z @ 85 NONAME ; void CCPixSearcher::SetQueryParserL(class MCPixSetQueryParserRequestObserver &, enum CCPixSearcher::TQueryParser)
+ ?RemoveField@CSearchDocument@@QAEHABVTDesC16@@@Z @ 86 NONAME ; int CSearchDocument::RemoveField(class TDesC16 const &)
+ ?Add@RSearchServerSubSession@@QAEXABVTDesC8@@AAVTRequestStatus@@@Z @ 87 NONAME ; void RSearchServerSubSession::Add(class TDesC8 const &, class TRequestStatus &)
+ ?SetQueryParser@RSearchServerSubSession@@QAEXHAAVTRequestStatus@@@Z @ 88 NONAME ; void RSearchServerSubSession::SetQueryParser(int, class TRequestStatus &)
+ ?FlushL@CCPixIndexer@@QAEXXZ @ 89 NONAME ; void CCPixIndexer::FlushL(void)
+ ?ContinueHouseKeeping@RSearchServerSession@@QAEHXZ @ 90 NONAME ; int RSearchServerSession::ContinueHouseKeeping(void)
+ ?GetDocumentL@CCPixSearcher@@QAEXHAAVMCPixNextDocumentRequestObserver@@@Z @ 91 NONAME ; void CCPixSearcher::GetDocumentL(int, class MCPixNextDocumentRequestObserver &)
+ ?NewLC@CCPixIndexer@@SAPAV1@AAVRSearchServerSession@@@Z @ 92 NONAME ; class CCPixIndexer * CCPixIndexer::NewLC(class RSearchServerSession &)
+ ?SetBoost@CDocumentField@@QAEXM@Z @ 93 NONAME ; void CDocumentField::SetBoost(float)
+ ??1CCPixIndexer@@UAE@XZ @ 94 NONAME ; CCPixIndexer::~CCPixIndexer(void)
+ ?GetBatchDocumentL@CCPixSearcher@@QAEPAPAVCSearchDocument@@HAAHH@Z @ 95 NONAME ; class CSearchDocument * * CCPixSearcher::GetBatchDocumentL(int, int &, int)
+ ?NewL@CSearchDocument@@SAPAV1@AAVRReadStream@@@Z @ 96 NONAME ; class CSearchDocument * CSearchDocument::NewL(class RReadStream &)
+ ?UpdateL@RSearchServerSubSession@@QAEXABVTDesC8@@@Z @ 97 NONAME ; void RSearchServerSubSession::UpdateL(class TDesC8 const &)
+ ?UnDefineVolume@RSearchServerSession@@QAEHABVTDesC16@@@Z @ 98 NONAME ; int RSearchServerSession::UnDefineVolume(class TDesC16 const &)
+ ?ExternalizeL@CDocumentField@@QBEXAAVRWriteStream@@@Z @ 99 NONAME ; void CDocumentField::ExternalizeL(class RWriteStream &) const
+ ?AddL@RSearchServerSubSession@@QAEXABVTDesC8@@@Z @ 100 NONAME ; void RSearchServerSubSession::AddL(class TDesC8 const &)
--- a/searcher/searchclient/eabi/cpixsearchclientu.def Mon Jul 26 12:27:31 2010 +0530
+++ b/searcher/searchclient/eabi/cpixsearchclientu.def Mon Aug 09 10:51:30 2010 +0530
@@ -24,91 +24,96 @@
_ZN13CCPixSearcher12SetAnalyzerLERK7TDesC16 @ 23 NONAME
_ZN13CCPixSearcher13OpenDatabaseLER32MCPixOpenDatabaseRequestObserverRK7TDesC16 @ 24 NONAME
_ZN13CCPixSearcher13OpenDatabaseLERK7TDesC16 @ 25 NONAME
- _ZN13CCPixSearcher4NewLER20RSearchServerSessionRK7TDesC16 @ 26 NONAME
- _ZN13CCPixSearcher5NewLCER20RSearchServerSessionRK7TDesC16 @ 27 NONAME
- _ZN13CCPixSearcher7SearchLER26MCPixSearchRequestObserverRK7TDesC16S4_ @ 28 NONAME
- _ZN13CCPixSearcher7SearchLERK7TDesC16S2_ @ 29 NONAME
- _ZN13CCPixSearcherD0Ev @ 30 NONAME
- _ZN13CCPixSearcherD1Ev @ 31 NONAME
- _ZN13CCPixSearcherD2Ev @ 32 NONAME
- _ZN14CDocumentField12InternalizeLER11RReadStream @ 33 NONAME
- _ZN14CDocumentField4NewLER11RReadStream @ 34 NONAME
- _ZN14CDocumentField4NewLERK7TDesC16S2_i @ 35 NONAME
- _ZN14CDocumentField5NewLCER11RReadStream @ 36 NONAME
- _ZN14CDocumentField5NewLCERK7TDesC16S2_i @ 37 NONAME
- _ZN14CDocumentField8SetBoostEf @ 38 NONAME
- _ZN14CDocumentFieldD0Ev @ 39 NONAME
- _ZN14CDocumentFieldD1Ev @ 40 NONAME
- _ZN14CDocumentFieldD2Ev @ 41 NONAME
- _ZN15CSearchDocument11AddExcerptLERK7TDesC16 @ 42 NONAME
- _ZN15CSearchDocument11RemoveFieldERK7TDesC16 @ 43 NONAME
- _ZN15CSearchDocument12InternalizeLER11RReadStream @ 44 NONAME
- _ZN15CSearchDocument4NewLER11RReadStream @ 45 NONAME
- _ZN15CSearchDocument4NewLERK7TDesC16S2_S2_NS_9TFilterIdE @ 46 NONAME
- _ZN15CSearchDocument5NewLCER11RReadStream @ 47 NONAME
- _ZN15CSearchDocument5NewLCERK7TDesC16S2_S2_NS_9TFilterIdE @ 48 NONAME
- _ZN15CSearchDocument8SetBoostEf @ 49 NONAME
- _ZN15CSearchDocument9AddFieldLERK7TDesC16S2_i @ 50 NONAME
- _ZN15CSearchDocumentD0Ev @ 51 NONAME
- _ZN15CSearchDocumentD1Ev @ 52 NONAME
- _ZN15CSearchDocumentD2Ev @ 53 NONAME
- _ZN20RSearchServerSession12DefineVolumeERK7TDesC16S2_ @ 54 NONAME
- _ZN20RSearchServerSession14UnDefineVolumeERK7TDesC16 @ 55 NONAME
- _ZN20RSearchServerSession5CloseEv @ 56 NONAME
- _ZN20RSearchServerSession7ConnectEv @ 57 NONAME
- _ZN20RSearchServerSessionC1Ev @ 58 NONAME
- _ZN20RSearchServerSessionC2Ev @ 59 NONAME
- _ZN23RSearchServerSubSession11GetDocumentEiR14TRequestStatus @ 60 NONAME
- _ZN23RSearchServerSubSession11SetAnalyzerERK7TDesC16R14TRequestStatus @ 61 NONAME
- _ZN23RSearchServerSubSession12GetDocumentLEi @ 62 NONAME
- _ZN23RSearchServerSubSession12SetAnalyzerLERK7TDesC16 @ 63 NONAME
- _ZN23RSearchServerSubSession18GetDocumentObjectLEv @ 64 NONAME
- _ZN23RSearchServerSubSession3AddERK6TDesC8R14TRequestStatus @ 65 NONAME
- _ZN23RSearchServerSubSession4AddLERK6TDesC8 @ 66 NONAME
- _ZN23RSearchServerSubSession5FlushER14TRequestStatus @ 67 NONAME
- _ZN23RSearchServerSubSession5ResetER14TRequestStatus @ 68 NONAME
- _ZN23RSearchServerSubSession6DeleteERK7TDesC16R14TRequestStatus @ 69 NONAME
- _ZN23RSearchServerSubSession6FlushLEv @ 70 NONAME
- _ZN23RSearchServerSubSession6ResetLEv @ 71 NONAME
- _ZN23RSearchServerSubSession6SearchERK7TDesC16R14TRequestStatus @ 72 NONAME
- _ZN23RSearchServerSubSession6UpdateERK6TDesC8R14TRequestStatus @ 73 NONAME
- _ZN23RSearchServerSubSession7DeleteLERK7TDesC16 @ 74 NONAME
- _ZN23RSearchServerSubSession7SearchLERK7TDesC16 @ 75 NONAME
- _ZN23RSearchServerSubSession7UpdateLERK6TDesC8 @ 76 NONAME
- _ZNK12CCPixIndexer14IsDatabaseOpenEv @ 77 NONAME
- _ZNK12CCPixIndexer15GetBaseAppClassEv @ 78 NONAME
- _ZNK13CCPixSearcher14IsDatabaseOpenEv @ 79 NONAME
- _ZNK13CCPixSearcher15GetBaseAppClassEv @ 80 NONAME
- _ZNK14CDocumentField12ExternalizeLER12RWriteStream @ 81 NONAME
- _ZNK14CDocumentField4NameEv @ 82 NONAME
- _ZNK14CDocumentField4SizeEv @ 83 NONAME
- _ZNK14CDocumentField5BoostEv @ 84 NONAME
- _ZNK14CDocumentField5ValueEv @ 85 NONAME
- _ZNK14CDocumentField6ConfigEv @ 86 NONAME
- _ZNK15CSearchDocument10FieldCountEv @ 87 NONAME
- _ZNK15CSearchDocument12ExternalizeLER12RWriteStream @ 88 NONAME
- _ZNK15CSearchDocument2IdEv @ 89 NONAME
- _ZNK15CSearchDocument4SizeEv @ 90 NONAME
- _ZNK15CSearchDocument5BoostEv @ 91 NONAME
- _ZNK15CSearchDocument5FieldERK7TDesC16 @ 92 NONAME
- _ZNK15CSearchDocument5FieldEi @ 93 NONAME
- _ZNK15CSearchDocument7ExcerptEv @ 94 NONAME
- _ZNK15CSearchDocument8AppClassEv @ 95 NONAME
- _ZNK20RSearchServerSession7VersionEv @ 96 NONAME
- _ZNK23RSearchServerSubSession9CancelAllEv @ 97 NONAME
- _ZTI12CCPixIndexer @ 98 NONAME ; #<TI>#
- _ZTI13CCPixSearcher @ 99 NONAME ; #<TI>#
- _ZTI14CDocumentField @ 100 NONAME ; #<TI>#
- _ZTI15CSearchDocument @ 101 NONAME ; #<TI>#
- _ZTV12CCPixIndexer @ 102 NONAME ; #<VT>#
- _ZTV13CCPixSearcher @ 103 NONAME ; #<VT>#
- _ZTV14CDocumentField @ 104 NONAME ; #<VT>#
- _ZTV15CSearchDocument @ 105 NONAME ; #<VT>#
- _ZN20RSearchServerSession16StopHouseKeepingEv @ 106 NONAME
- _ZN20RSearchServerSession17ForceHouseKeepingEv @ 107 NONAME
- _ZN20RSearchServerSession20ContinueHouseKeepingEv @ 108 NONAME
- _ZN13CCPixSearcher15SetQueryParserLENS_12TQueryParserE @ 109 NONAME
- _ZN13CCPixSearcher15SetQueryParserLER34MCPixSetQueryParserRequestObserverNS_12TQueryParserE @ 110 NONAME
- _ZN23RSearchServerSubSession14SetQueryParserEiR14TRequestStatus @ 111 NONAME
- _ZN23RSearchServerSubSession15SetQueryParserLEi @ 112 NONAME
+ _ZN13CCPixSearcher15SetQueryParserLENS_12TQueryParserE @ 26 NONAME
+ _ZN13CCPixSearcher15SetQueryParserLER34MCPixSetQueryParserRequestObserverNS_12TQueryParserE @ 27 NONAME
+ _ZN13CCPixSearcher17GetBatchDocumentLEiR32MCPixNextDocumentRequestObserveri @ 28 NONAME
+ _ZN13CCPixSearcher17GetBatchDocumentLEiRii @ 29 NONAME
+ _ZN13CCPixSearcher4NewLER20RSearchServerSessionRK7TDesC16 @ 30 NONAME
+ _ZN13CCPixSearcher5NewLCER20RSearchServerSessionRK7TDesC16 @ 31 NONAME
+ _ZN13CCPixSearcher7SearchLER26MCPixSearchRequestObserverRK7TDesC16S4_ @ 32 NONAME
+ _ZN13CCPixSearcher7SearchLERK7TDesC16S2_ @ 33 NONAME
+ _ZN13CCPixSearcherD0Ev @ 34 NONAME
+ _ZN13CCPixSearcherD1Ev @ 35 NONAME
+ _ZN13CCPixSearcherD2Ev @ 36 NONAME
+ _ZN14CDocumentField12InternalizeLER11RReadStream @ 37 NONAME
+ _ZN14CDocumentField4NewLER11RReadStream @ 38 NONAME
+ _ZN14CDocumentField4NewLERK7TDesC16S2_i @ 39 NONAME
+ _ZN14CDocumentField5NewLCER11RReadStream @ 40 NONAME
+ _ZN14CDocumentField5NewLCERK7TDesC16S2_i @ 41 NONAME
+ _ZN14CDocumentField8SetBoostEf @ 42 NONAME
+ _ZN14CDocumentFieldD0Ev @ 43 NONAME
+ _ZN14CDocumentFieldD1Ev @ 44 NONAME
+ _ZN14CDocumentFieldD2Ev @ 45 NONAME
+ _ZN15CSearchDocument11AddExcerptLERK7TDesC16 @ 46 NONAME
+ _ZN15CSearchDocument11RemoveFieldERK7TDesC16 @ 47 NONAME
+ _ZN15CSearchDocument12InternalizeLER11RReadStream @ 48 NONAME
+ _ZN15CSearchDocument4NewLER11RReadStream @ 49 NONAME
+ _ZN15CSearchDocument4NewLERK7TDesC16S2_S2_NS_9TFilterIdE @ 50 NONAME
+ _ZN15CSearchDocument5NewLCER11RReadStream @ 51 NONAME
+ _ZN15CSearchDocument5NewLCERK7TDesC16S2_S2_NS_9TFilterIdE @ 52 NONAME
+ _ZN15CSearchDocument8SetBoostEf @ 53 NONAME
+ _ZN15CSearchDocument9AddFieldLERK7TDesC16S2_i @ 54 NONAME
+ _ZN15CSearchDocumentD0Ev @ 55 NONAME
+ _ZN15CSearchDocumentD1Ev @ 56 NONAME
+ _ZN15CSearchDocumentD2Ev @ 57 NONAME
+ _ZN20RSearchServerSession12DefineVolumeERK7TDesC16S2_ @ 58 NONAME
+ _ZN20RSearchServerSession14UnDefineVolumeERK7TDesC16 @ 59 NONAME
+ _ZN20RSearchServerSession16StopHouseKeepingEv @ 60 NONAME
+ _ZN20RSearchServerSession17ForceHouseKeepingEv @ 61 NONAME
+ _ZN20RSearchServerSession20ContinueHouseKeepingEv @ 62 NONAME
+ _ZN20RSearchServerSession5CloseEv @ 63 NONAME
+ _ZN20RSearchServerSession7ConnectEv @ 64 NONAME
+ _ZN20RSearchServerSessionC1Ev @ 65 NONAME
+ _ZN20RSearchServerSessionC2Ev @ 66 NONAME
+ _ZN23RSearchServerSubSession11GetDocumentEiR14TRequestStatus @ 67 NONAME
+ _ZN23RSearchServerSubSession11SetAnalyzerERK7TDesC16R14TRequestStatus @ 68 NONAME
+ _ZN23RSearchServerSubSession12GetDocumentLEi @ 69 NONAME
+ _ZN23RSearchServerSubSession12SetAnalyzerLERK7TDesC16 @ 70 NONAME
+ _ZN23RSearchServerSubSession14SetQueryParserEiR14TRequestStatus @ 71 NONAME
+ _ZN23RSearchServerSubSession15SetQueryParserLEi @ 72 NONAME
+ _ZN23RSearchServerSubSession16GetBatchDocumentEiR14TRequestStatusi @ 73 NONAME
+ _ZN23RSearchServerSubSession17GetBatchDocumentLEiRii @ 74 NONAME
+ _ZN23RSearchServerSubSession18GetDocumentObjectLEv @ 75 NONAME
+ _ZN23RSearchServerSubSession23GetBatchDocumentObjectLERi @ 76 NONAME
+ _ZN23RSearchServerSubSession3AddERK6TDesC8R14TRequestStatus @ 77 NONAME
+ _ZN23RSearchServerSubSession4AddLERK6TDesC8 @ 78 NONAME
+ _ZN23RSearchServerSubSession5FlushER14TRequestStatus @ 79 NONAME
+ _ZN23RSearchServerSubSession5ResetER14TRequestStatus @ 80 NONAME
+ _ZN23RSearchServerSubSession6DeleteERK7TDesC16R14TRequestStatus @ 81 NONAME
+ _ZN23RSearchServerSubSession6FlushLEv @ 82 NONAME
+ _ZN23RSearchServerSubSession6ResetLEv @ 83 NONAME
+ _ZN23RSearchServerSubSession6SearchERK7TDesC16R14TRequestStatus @ 84 NONAME
+ _ZN23RSearchServerSubSession6UpdateERK6TDesC8R14TRequestStatus @ 85 NONAME
+ _ZN23RSearchServerSubSession7DeleteLERK7TDesC16 @ 86 NONAME
+ _ZN23RSearchServerSubSession7SearchLERK7TDesC16 @ 87 NONAME
+ _ZN23RSearchServerSubSession7UpdateLERK6TDesC8 @ 88 NONAME
+ _ZNK12CCPixIndexer14IsDatabaseOpenEv @ 89 NONAME
+ _ZNK12CCPixIndexer15GetBaseAppClassEv @ 90 NONAME
+ _ZNK13CCPixSearcher14IsDatabaseOpenEv @ 91 NONAME
+ _ZNK13CCPixSearcher15GetBaseAppClassEv @ 92 NONAME
+ _ZNK14CDocumentField12ExternalizeLER12RWriteStream @ 93 NONAME
+ _ZNK14CDocumentField4NameEv @ 94 NONAME
+ _ZNK14CDocumentField4SizeEv @ 95 NONAME
+ _ZNK14CDocumentField5BoostEv @ 96 NONAME
+ _ZNK14CDocumentField5ValueEv @ 97 NONAME
+ _ZNK14CDocumentField6ConfigEv @ 98 NONAME
+ _ZNK15CSearchDocument10FieldCountEv @ 99 NONAME
+ _ZNK15CSearchDocument12ExternalizeLER12RWriteStream @ 100 NONAME
+ _ZNK15CSearchDocument2IdEv @ 101 NONAME
+ _ZNK15CSearchDocument4SizeEv @ 102 NONAME
+ _ZNK15CSearchDocument5BoostEv @ 103 NONAME
+ _ZNK15CSearchDocument5FieldERK7TDesC16 @ 104 NONAME
+ _ZNK15CSearchDocument5FieldEi @ 105 NONAME
+ _ZNK15CSearchDocument7ExcerptEv @ 106 NONAME
+ _ZNK15CSearchDocument8AppClassEv @ 107 NONAME
+ _ZNK20RSearchServerSession7VersionEv @ 108 NONAME
+ _ZNK23RSearchServerSubSession9CancelAllEv @ 109 NONAME
+ _ZTI12CCPixIndexer @ 110 NONAME
+ _ZTI13CCPixSearcher @ 111 NONAME
+ _ZTI14CDocumentField @ 112 NONAME
+ _ZTI15CSearchDocument @ 113 NONAME
+ _ZTV12CCPixIndexer @ 114 NONAME
+ _ZTV13CCPixSearcher @ 115 NONAME
+ _ZTV14CDocumentField @ 116 NONAME
+ _ZTV15CSearchDocument @ 117 NONAME
--- a/searcher/searchclient/inc/searchservercommon.h Mon Jul 26 12:27:31 2010 +0530
+++ b/searcher/searchclient/inc/searchservercommon.h Mon Aug 09 10:51:30 2010 +0530
@@ -62,6 +62,8 @@
ESearchServerSearch,
ESearchServerGetDocument,
ESearchServerGetDocumentObject,
+ ESearchServerGetBatchDocument,
+ ESearchServerGetBatchDocumentObject,
ESearchServerAdd,
ESearchServerUpdate,
ESearchServerDelete,
--- a/searcher/searchclient/src/ccpixsearcher.cpp Mon Jul 26 12:27:31 2010 +0530
+++ b/searcher/searchclient/src/ccpixsearcher.cpp Mon Aug 09 10:51:30 2010 +0530
@@ -279,6 +279,37 @@
SetActive();
}
+EXPORT_C CSearchDocument** CCPixSearcher::GetBatchDocumentL(TInt aIndex, TInt& aReturnDoc, TInt aCount)
+ {
+ PERFORMANCE_LOG_START("CCPixSearcher::GetBatchDocumentL");
+
+ if ( !iIsDatabaseOpen ) User::Leave( KErrNotReady );
+ if ( IsActive() )
+ {
+ User::Leave(KErrInUse);
+ }
+
+ return iSubSession.GetBatchDocumentL(aIndex,aReturnDoc, aCount);
+ }
+
+EXPORT_C void CCPixSearcher::GetBatchDocumentL(TInt aIndex, MCPixNextDocumentRequestObserver& aObserver, TInt aCount)
+ {
+ PERFORMANCE_LOG_START("CCPixSearcher::GetBatchDocumentL");
+
+ if ( !iIsDatabaseOpen ) User::Leave( KErrNotReady );
+ if ( IsActive() )
+ {
+ User::Leave(KErrInUse); // Need ::RunError to handle this
+ }
+
+ iObserver.iNextDocument = &aObserver;
+
+ iState = EStateGetBatchDocument;
+ iSubSession.GetBatchDocument(aIndex, iStatus, aCount);
+ SetActive();
+ }
+
+
// CCPixSearcher::RunL()
// Invoked to handle responses from the server.
void CCPixSearcher::RunL()
@@ -341,6 +372,27 @@
}
}
break;
+
+ case EStateGetBatchDocument:
+ {
+ // Fetch search results and call back at the observer
+ CSearchDocument** document = 0;
+ TInt retCount = 0;
+ TRAPD( err, document = iSubSession.GetBatchDocumentObjectL( retCount ) );
+ if ( observer.iNextDocument )
+ {
+ if ( err == KErrNone )
+ {
+ observer.iNextDocument->HandleBatchDocumentL(iStatus.Int(),retCount, document);
+ }
+ else
+ {
+ observer.iNextDocument->HandleBatchDocumentL(err, retCount, document);
+ }
+ }
+ }
+ break;
+
case EStateNone:
// Do nothing, dont panic.
--- a/searcher/searchclient/src/rsearchserversession.cpp Mon Jul 26 12:27:31 2010 +0530
+++ b/searcher/searchclient/src/rsearchserversession.cpp Mon Aug 09 10:51:30 2010 +0530
@@ -153,6 +153,11 @@
void RSearchServerSubSession::Close()
{
+ if (iSizeList)
+ {
+ delete iSizeList;
+ iSizeList = NULL;
+ }
RSubSessionBase::CloseSubSession(ESearchServerCloseSubSession);
}
@@ -310,6 +315,94 @@
return document;
}
+ // RSearchServerSubSession::GetBatchDocumentL()
+EXPORT_C CSearchDocument** RSearchServerSubSession::GetBatchDocumentL(TInt aIndex, TInt& aReturnDoc, TInt aCount)
+ {
+ PERFORMANCE_LOG_START("RSearchServerSubSession::GetBatchDocumentL");
+
+ if (!aCount) return NULL;
+
+ iDocumentSize = 0;
+ iReqCount = aCount;
+
+ if (iSizeList)
+ {
+ delete iSizeList;
+ iSizeList = NULL;
+ }
+ iSizeList = STATIC_CAST(TInt *, User::AllocZL(iReqCount * sizeof(TInt)));
+ TPtr8 blob((TUint8*)iSizeList, iReqCount * sizeof(TInt));
+ // Message arguments for the server
+ TIpcArgs args(aIndex, iReqCount, &blob);
+ iDocSizeArray.Reset();
+ User::LeaveIfError( SendReceive(ESearchServerGetBatchDocument, args ) );
+
+ return GetBatchDocumentObjectL( aReturnDoc );
+ }
+
+EXPORT_C void RSearchServerSubSession::GetBatchDocument(TInt aIndex, TRequestStatus& aStatus, TInt aCount)
+ {
+ PERFORMANCE_LOG_START("RSearchServerSubSession::GetBatchDocument");
+
+ iDocumentSize = 0;
+ iReqCount = aCount;
+
+ if (iSizeList)
+ {
+ delete iSizeList;
+ iSizeList = NULL;
+ }
+ iSizeList = STATIC_CAST(TInt *, User::AllocZL(iReqCount * sizeof(TInt)));
+ //iDocSizeArray
+ TPtr8 blob((TUint8*)iSizeList, iReqCount * sizeof(TInt));
+
+ // Message arguments for the server
+ TIpcArgs args(aIndex, aCount, &blob);
+
+ SendReceive(ESearchServerGetBatchDocument, args, aStatus );
+ }
+
+EXPORT_C CSearchDocument** RSearchServerSubSession::GetBatchDocumentObjectL( TInt& aRetCount )
+ {
+ PERFORMANCE_LOG_START("CCPixSearcher::GetBatchDocumentObjectL");
+ CSearchDocument** document = NULL;
+ TInt i ,totalsize = 0;
+ for ( i = 0; i< iReqCount; i++ )
+ {
+ if( *(iSizeList+i) )
+ {
+ totalsize += *(iSizeList+i);
+ }
+ else break;
+ }
+ aRetCount = i;
+
+ if ( aRetCount> 0 && totalsize )
+ {
+ //document = (CSearchDocument**)malloc ( sizeof(CSearchDocument*) * (i-1));
+ document = STATIC_CAST(CSearchDocument**, User::AllocL( aRetCount * sizeof(CSearchDocument*)));
+ HBufC8* buf = HBufC8::NewLC(totalsize +2 );
+ TPtr8 ptr = buf->Des();
+ User::LeaveIfError(SendReceive(ESearchServerGetBatchDocumentObject, TIpcArgs(&ptr)));
+ TInt startpos = 0;
+ TInt endpos = 0;
+ for ( TInt arrCount= 0; arrCount < aRetCount ; arrCount++)
+ {
+ endpos = *(iSizeList + arrCount) -4;
+ //endpos = startpos + iDocSizeArray[arrCount];
+ TPtrC8 tempptr = ptr.Mid( startpos , endpos );
+ startpos += endpos;
+ RDesReadStream stream;
+ stream.Open(tempptr);
+ stream.PushL();
+ document[arrCount] = CSearchDocument::NewL(stream);
+ CleanupStack::PopAndDestroy(&stream);
+ }
+ CleanupStack::PopAndDestroy(buf);
+ }
+ return document;
+ }
+
// RSearchServerSubSession::CancelSearch()
// Cancels outstanding search from server
EXPORT_C void RSearchServerSubSession::CancelAll() const
--- a/searcher/searchclient/traces/CCPixSearcherTraces.h Mon Jul 26 12:27:31 2010 +0530
+++ b/searcher/searchclient/traces/CCPixSearcherTraces.h Mon Aug 09 10:51:30 2010 +0530
@@ -1,4 +1,4 @@
-// Created by TraceCompiler 2.1.2
+// Created by TraceCompiler 2.2.3
// DO NOT EDIT, CHANGES WILL BE LOST
#ifndef __CCPIXSEARCHERTRACES_H__
--- a/searcher/searchclient/traces/RSearchServerSessionTraces.h Mon Jul 26 12:27:31 2010 +0530
+++ b/searcher/searchclient/traces/RSearchServerSessionTraces.h Mon Aug 09 10:51:30 2010 +0530
@@ -1,4 +1,4 @@
-// Created by TraceCompiler 2.1.2
+// Created by TraceCompiler 2.2.3
// DO NOT EDIT, CHANGES WILL BE LOST
#ifndef __RSEARCHSERVERSESSIONTRACES_H__
--- a/searcher/searchserver/inc/CCPixAbstractSearcher.h Mon Jul 26 12:27:31 2010 +0530
+++ b/searcher/searchserver/inc/CCPixAbstractSearcher.h Mon Aug 09 10:51:30 2010 +0530
@@ -68,6 +68,20 @@
* @return Document. Ownership is transferred to the caller of this function.
*/
virtual CSearchDocument* GetDocumentCompleteL() = 0;
+
+ /**
+ * Gets list of documents from the current search results.
+ * @param aObserver Observing object for this asyncronous call
+ * @param aMessage The requesting message
+ * @parma aIndex index of the requested document
+ */
+ virtual void GetBatchDocumentL(TInt aIndex, MCPixAsyncronizerObserver* aObserver, const RMessage2& aMessage, TInt count) = 0;
+
+ /**
+ * Complete the previous GetBatchDocumentL
+ * @return array of Documents. Ownership is transferred to the caller of this function.
+ */
+ virtual RPointerArray<CSearchDocument> GetBatchDocumentCompleteL() = 0;
/**
* Creates new database (and destroys existing) if path is given. Otherwise, opens existing database.
@@ -95,7 +109,11 @@
public:
- static CSearchDocument* ConvertDocumentL( cpix_Document* aDocument );
+ static CSearchDocument* ConvertDocumentL( cpix_Document* aDocument );
+
+ static RPointerArray<CSearchDocument> ConvertBatchDocumentL( cpix_Document** aDocument, TInt count );
+
+ static RArray<TInt> docSizeArray;
};
--- a/searcher/searchserver/inc/ccpixasyncronizer.h Mon Jul 26 12:27:31 2010 +0530
+++ b/searcher/searchserver/inc/ccpixasyncronizer.h Mon Aug 09 10:51:30 2010 +0530
@@ -22,6 +22,7 @@
{
ECPixTaskTypeSearch = 0,
ECPixTaskTypeGetDocument,
+ ECPixTaskTypeGetBatchDocument,
ECPixTaskTypeAdd,
ECPixTaskTypeUpdate,
ECPixTaskTypeDelete,
--- a/searcher/searchserver/inc/ccpixsearch.h Mon Jul 26 12:27:31 2010 +0530
+++ b/searcher/searchserver/inc/ccpixsearch.h Mon Aug 09 10:51:30 2010 +0530
@@ -101,6 +101,20 @@
* @return Document. Ownership is transferred to the caller of this function.
*/
CSearchDocument* GetDocumentCompleteL();
+
+ /**
+ * Gets list of documents from the current search results.
+ * @param aObserver Observing object for this asyncronous call
+ * @param aMessage The requesting message
+ * @parma aIndex index of the requested document
+ */
+ void GetBatchDocumentL(TInt aIndex, MCPixAsyncronizerObserver* aObserver, const RMessage2& aMessage, TInt aCount);
+
+ /**
+ * Complete the previous GetBatchDocumentL
+ * @return array of Document. Ownership is transferred to the caller of this function.
+ */
+ RPointerArray<CSearchDocument> GetBatchDocumentCompleteL();
/**
* Creates new database (and destroys existing) if path is given. Otherwise, opens existing database.
@@ -207,11 +221,18 @@
CCPixAsyncronizer* iAsyncronizer;
cpix_JobId iPendingJobId;
TPendingTask iPendingTask;
-
+ /**
+ * stores the requested batch document
+ */
+ cpix_Document** ibatchDocuments;
+ /**
+ * Requested batch document count
+ */
+ TInt ibatchDocCount;
/**
* Needed until the cpix is changed so that the docResults gives out the document
*/
- cpix_Document iCurrentCpixDocument;
+ cpix_Document* iCurrentCpixDocument;
};
--- a/searcher/searchserver/inc/csearchserversubsession.h Mon Jul 26 12:27:31 2010 +0530
+++ b/searcher/searchserver/inc/csearchserversubsession.h Mon Aug 09 10:51:30 2010 +0530
@@ -100,6 +100,26 @@
* @param aMessage Message from client.
*/
void GetDocumentObjectL(const RMessage2& aMessage);
+
+ /**
+ * GetBatchDocumentL.
+ * Client gets the list of documents (result) when SearchL has completed
+ * @param aMessage Message from client.
+ */
+ void GetBatchDocumentL(const RMessage2& aMessage);
+
+ /**
+ * GetBatchDocumentCompleteL.
+ * Completes an previous call to GetBatchDocumentL
+ */
+ void GetBatchDocumentCompleteL(const RMessage2& aMessage);
+
+ /**
+ * GetBatchDocumentObjectL.
+ * Client gets the object after GetBatchDocumentL() has completed
+ * @param aMessage Message from client.
+ */
+ void GetBatchDocumentObjectL(const RMessage2& aMessage);
/**
* AddL.
@@ -176,10 +196,12 @@
void LimitExcerptToMaxLengthL(CSearchDocument* aSearchDocument);
private:
+ TInt count;
CCPixIdxDb* iIndexDb;
CCPixAbstractSearcher* iSearchDb;
CSearchDocument* iNextDocument;
CSearchServerSession* iSession;
+ RPointerArray<CSearchDocument> idocList;
};
#endif /* CSEARCHSERVERSUBSESSION_H_ */
--- a/searcher/searchserver/src/CCPixAbstractSearcher.cpp Mon Jul 26 12:27:31 2010 +0530
+++ b/searcher/searchserver/src/CCPixAbstractSearcher.cpp Mon Aug 09 10:51:30 2010 +0530
@@ -10,7 +10,11 @@
#include "SearchServerHelper.h"
#include "CSearchDocument.h"
-CCPixAbstractSearcher::~CCPixAbstractSearcher() {}
+RArray<TInt> CCPixAbstractSearcher::docSizeArray;
+
+CCPixAbstractSearcher::~CCPixAbstractSearcher() {
+docSizeArray.Close();
+}
namespace {
@@ -93,9 +97,98 @@
document->AddFieldL(namePtr, stringvalue);
}
- CleanupStack::PopAndDestroy(docFieldEnum);
-
+ CleanupStack::PopAndDestroy(docFieldEnum);
CleanupStack::Pop(document);
-
+ delete aDocument;
return document;
}
+
+RPointerArray<CSearchDocument> CCPixAbstractSearcher::ConvertBatchDocumentL( cpix_Document** aDocument, TInt aCount )
+ {
+ // Read first the system fields that are passed as constructor parameters
+ //
+ RPointerArray<CSearchDocument> docArray;
+ docSizeArray.Reset();
+ //docArray.Reset(); // delete each element
+
+ for( TInt i= 0;i< aCount;i++ )
+ {
+ cpix_Document* nextDocument = aDocument[i];
+
+ if( nextDocument->ptr_ )
+ {
+ const wchar_t* documentId = cpix_Document_getFieldValue( nextDocument, LCPIX_DOCUID_FIELD);
+ SearchServerHelper::CheckCpixErrorL(nextDocument, KErrDatabaseQueryFailed);
+
+ TPtrC documentIdPtr(KNullDesC);
+ if (documentId)
+ documentIdPtr.Set(reinterpret_cast<const TUint16*>(documentId));
+
+ const wchar_t* documentAppClass = cpix_Document_getFieldValue(nextDocument, LCPIX_APPCLASS_FIELD);
+ SearchServerHelper::CheckCpixErrorL(nextDocument, KErrDatabaseQueryFailed);
+
+ TPtrC documentAppClassPtr(KNullDesC);
+ if (documentAppClass)
+ documentAppClassPtr.Set(reinterpret_cast<const TUint16*>(documentAppClass));
+
+ const wchar_t* documentExcerpt = cpix_Document_getFieldValue(nextDocument, LCPIX_EXCERPT_FIELD);
+ SearchServerHelper::CheckCpixErrorL(nextDocument, KErrDatabaseQueryFailed);
+
+ TPtrC documentExcerptPtr(KNullDesC);
+ if (documentExcerpt)
+ documentExcerptPtr.Set(reinterpret_cast<const TUint16*>(documentExcerpt));
+
+ // Setup the document
+ //
+
+ CSearchDocument* document = CSearchDocument::NewLC(documentIdPtr, documentAppClassPtr, documentExcerptPtr);
+
+ // Enumerate the field of cpix_Document and add each of them
+ // into the CSearchDocument object.
+ //
+
+ cpix_DocFieldEnum* docFieldEnum = cpix_Document_fields(nextDocument);
+ SearchServerHelper::CheckCpixErrorL(nextDocument, KErrDocumentAccessFailed);
+
+ CleanupStack::PushL( TCleanupItem(CpixDocFieldEnumDestroyer, docFieldEnum) );
+
+ cpix_Field field;
+ while (cpix_DocFieldEnum_hasMore(docFieldEnum))
+ {
+ cpix_DocFieldEnum_next(docFieldEnum, &field);
+ SearchServerHelper::CheckCpixErrorL(docFieldEnum, KErrDatabaseQueryFailed);
+
+ const wchar_t* name = cpix_Field_name(&field);
+ SearchServerHelper::CheckCpixErrorL(&field, KErrDatabaseQueryFailed);
+
+ TPtrC namePtr( reinterpret_cast<const TUint16*>( name ) );
+ if ( namePtr == TPtrC( (TUint16*)LCPIX_DOCUID_FIELD )
+ || namePtr == TPtrC( (TUint16*)LCPIX_APPCLASS_FIELD )
+ || namePtr == TPtrC( (TUint16*)LCPIX_EXCERPT_FIELD ) )
+ {
+ continue; // These fields have already been added
+ }
+
+ const wchar_t* value = cpix_Field_stringValue(&field);
+ SearchServerHelper::CheckCpixErrorL(&field, KErrDatabaseQueryFailed);
+
+ TPtrC stringvalue( reinterpret_cast<const TUint16*>( value ) );
+
+ // NOTE: Also system fields will be iterated. Because
+ // the field name is not checked, all _appclass,
+ // _excerpt etc. fields will be overwritten.
+ document->AddFieldL(namePtr, stringvalue);
+ }
+ CleanupStack::PopAndDestroy(docFieldEnum);
+ CleanupStack::Pop(document);
+ docSizeArray.AppendL( document->Size());
+ docArray.AppendL( document );
+ delete nextDocument;
+ nextDocument = NULL;
+ }
+ else break;
+ }
+ delete aDocument;
+ aDocument = NULL;
+ return docArray;
+ }
--- a/searcher/searchserver/src/ccpixsearch.cpp Mon Jul 26 12:27:31 2010 +0530
+++ b/searcher/searchserver/src/ccpixsearch.cpp Mon Aug 09 10:51:30 2010 +0530
@@ -61,7 +61,7 @@
delete iBaseAppClass;
delete iDefaultSearchFieldZ;
-
+ delete ibatchDocuments;
cpix_Query_destroy(iQuery);
cpix_QueryParser_destroy(iQueryParser);
cpix_Analyzer_destroy(iAnalyzer);
@@ -208,7 +208,10 @@
}
iPendingTask = EPendingTaskDocument;
- iPendingJobId = cpix_Hits_asyncDoc(iHits, aIndex, &iCurrentCpixDocument, (void*)this, &CompletionCallback);
+
+ iCurrentCpixDocument = new cpix_Document;
+ iCurrentCpixDocument->ptr_ = NULL;
+ iPendingJobId = cpix_Hits_asyncDoc(iHits, aIndex, &iCurrentCpixDocument, (void*)this, &CompletionCallback,1);
if ( cpix_Failed(iHits) )
{
SearchServerHelper::LogErrorL(*(iHits->err_));
@@ -218,6 +221,37 @@
iAsyncronizer->Start(ECPixTaskTypeGetDocument, aObserver, aMessage);
OstTraceFunctionExit0( CCPIXSEARCH_GETDOCUMENTL_EXIT );
}
+
+void CCPixSearch::GetBatchDocumentL(TInt aIndex, MCPixAsyncronizerObserver* aObserver, const RMessage2& aMessage, TInt aCount)
+ {
+ PERFORMANCE_LOG_START("CCPixSearch::GetBatchDocumentL");
+
+ if (iPendingTask != EPendingTaskNone)
+ User::Leave(KErrInUse);
+
+ if (aIndex<0 || aIndex >= iDocumentCount )
+ {
+ User::Leave(KErrDocumentAccessFailed);
+ }
+
+ ibatchDocCount = aCount;
+ ibatchDocuments = STATIC_CAST(cpix_Document**, User::AllocZL(aCount * sizeof(cpix_Document*)));
+ for (int i =0; i< aCount; i++)
+ {
+ ibatchDocuments[i] = new cpix_Document;
+ ibatchDocuments[i]->ptr_ = NULL;
+ }
+
+ iPendingTask = EPendingTaskDocument;
+ iPendingJobId = cpix_Hits_asyncDoc(iHits, aIndex, ibatchDocuments, (void*)this, &CompletionCallback, aCount);
+ if ( cpix_Failed(iHits) )
+ {
+ SearchServerHelper::LogErrorL(*(iHits->err_));
+ cpix_ClearError(iHits);
+ User::Leave(KErrDocumentAccessFailed);
+ }
+ iAsyncronizer->Start(ECPixTaskTypeGetBatchDocument, aObserver, aMessage);
+ }
CSearchDocument* CCPixSearch::GetDocumentCompleteL()
{
@@ -230,7 +264,7 @@
cpix_Hits_asyncDocResults(iHits, iPendingJobId);
SearchServerHelper::CheckCpixErrorL(iHits, KErrDocumentAccessFailed);
- return ConvertDocumentL( &iCurrentCpixDocument );
+ return ConvertDocumentL( iCurrentCpixDocument );
#if 0 // TODO XXX TIM
const wchar_t* documentId = cpix_Document_getFieldValue(&iCurrentCpixDocument, LCPIX_DOCUID_FIELD);
SearchServerHelper::CheckCpixErrorL(&iCurrentCpixDocument, KErrDatabaseQueryFailed);
@@ -295,6 +329,19 @@
return document;
#endif // 0
}
+
+RPointerArray<CSearchDocument> CCPixSearch::GetBatchDocumentCompleteL()
+ {
+ PERFORMANCE_LOG_START("CCPixSearch::GetBatchDocumentCompleteL");
+
+ // Request is no more pending
+ iPendingTask = EPendingTaskNone;
+
+ cpix_Hits_asyncDocResults(iHits, iPendingJobId);
+ SearchServerHelper::CheckCpixErrorL(iHits, KErrDocumentAccessFailed);
+
+ return ConvertBatchDocumentL( ibatchDocuments, ibatchDocCount );
+ }
void CCPixSearch::SetAnalyzerL(const TDesC& aAnalyzer)
{
@@ -388,4 +435,4 @@
{
return (iIdxDb != NULL);
}
-
+// End of File
--- a/searcher/searchserver/src/csearchserversession.cpp Mon Jul 26 12:27:31 2010 +0530
+++ b/searcher/searchserver/src/csearchserversession.cpp Mon Aug 09 10:51:30 2010 +0530
@@ -230,6 +230,18 @@
subsession->GetDocumentObjectL(aMessage);
RECORDED_EXECUTION_END("getDocumentObject")
break;
+
+ case ESearchServerGetBatchDocument:
+ RECORDED_EXECUTION_BEGIN
+ subsession->GetBatchDocumentL(aMessage);
+ RECORDED_EXECUTION_END("getDocument")
+ break;
+
+ case ESearchServerGetBatchDocumentObject:
+ RECORDED_EXECUTION_BEGIN
+ subsession->GetBatchDocumentObjectL(aMessage);
+ RECORDED_EXECUTION_END("getDocumentObject")
+ break;
case ESearchServerCancelAll:
RECORDED_EXECUTION_BEGIN
--- a/searcher/searchserver/src/csearchserversubsession.cpp Mon Jul 26 12:27:31 2010 +0530
+++ b/searcher/searchserver/src/csearchserversubsession.cpp Mon Aug 09 10:51:30 2010 +0530
@@ -72,10 +72,13 @@
delete iIndexDb;
delete iSearchDb;
delete iNextDocument;
+ idocList.ResetAndDestroy();
+ idocList.Close();
}
void CSearchServerSubSession::ConstructL()
{
+ count = 0;
iIndexDb = CCPixIdxDb::NewL();
iSearchDb = CCPixSearch::NewL();
}
@@ -259,6 +262,32 @@
OstTraceFunctionExit0( DUP1_CSEARCHSERVERSUBSESSION_GETDOCUMENTL_EXIT );
}
+void CSearchServerSubSession::GetBatchDocumentL(const RMessage2& aMessage)
+ {
+ PERFORMANCE_LOG_START("CSearchServerSubSession::GetBatchDocumentL");
+
+ // Sanity check
+ if (!iSearchDb->IsOpen())
+ {
+ iSession->PanicClient(aMessage, EDatabaseNotOpen);
+ return;
+ }
+
+ // buf for the search terms
+ TInt index = aMessage.Int0();
+ count = aMessage.Int1();
+
+ for (int i =0; i < idocList.Count(); i++)
+ {
+ delete idocList[i];
+ idocList[i] = NULL;
+ }
+ idocList.Reset();
+ LOG_PLAYER_RECORD( CLogPlayerRecorder::LogGetDocumentL( reinterpret_cast<TUint>( this ), index ) );
+
+ iSearchDb->GetBatchDocumentL(index, this, aMessage, count);
+ }
+
void CSearchServerSubSession::GetDocumentCompleteL(const RMessage2& aMessage)
{
OstTraceFunctionEntry0( CSEARCHSERVERSUBSESSION_GETDOCUMENTCOMPLETEL_ENTRY );
@@ -270,6 +299,14 @@
OstTraceFunctionExit0( CSEARCHSERVERSUBSESSION_GETDOCUMENTCOMPLETEL_EXIT );
}
+void CSearchServerSubSession::GetBatchDocumentCompleteL(const RMessage2& aMessage)
+ {
+ PERFORMANCE_LOG_START("CSearchServerSubSession::GetBatchDocumentCompleteL");
+ idocList = iSearchDb->GetBatchDocumentCompleteL();
+ const TPtrC8 ptr((const TUint8*)&(iSearchDb->docSizeArray[0]), sizeof(TInt) * iSearchDb->docSizeArray.Count());
+ aMessage.WriteL(2, ptr);
+ }
+
// CSearchServerSession::GetDocumentObjectL()
// Client gets the object after GetDocumentL() has completed
void CSearchServerSubSession::GetDocumentObjectL(const RMessage2& aMessage)
@@ -319,6 +356,53 @@
aMessage.Complete(KErrNone);
OstTraceFunctionExit0( DUP1_CSEARCHSERVERSUBSESSION_GETDOCUMENTOBJECTL_EXIT );
}
+
+// CSearchServerSession::GetBatchDocumentObjectL()
+// Client gets the object after GetBatchDocumentL() has completed
+void CSearchServerSubSession::GetBatchDocumentObjectL(const RMessage2& aMessage)
+ {
+ PERFORMANCE_LOG_START("CSearchServerSubSession::GetBatchDocumentObjectL");
+
+ // Sanity check
+ if ( !iSearchDb || !iSearchDb->IsOpen() )
+ {
+ iSession->PanicClient(aMessage, EDatabaseNotOpen);
+ return;
+ }
+ TInt totalSize = 0;
+ for ( TInt i= 0; i < iSearchDb->docSizeArray.Count(); i++)
+ totalSize += iSearchDb->docSizeArray[i];
+
+ // Create long enough descriptor for serialized hits
+ HBufC8* buf = HBufC8::NewLC(totalSize +1);
+ TPtr8 ptr = buf->Des();
+ // Initialize a new stream
+ RDesWriteStream stream;
+ stream.Open(ptr);
+ stream.PushL();
+
+ for(TInt i= 0; i < idocList.Count(); i++)
+ {
+ if ( idocList[i] )
+ {
+ // Externalize hits to the stream//
+ idocList[i]->ExternalizeL(stream);
+ }
+ }
+ // Commit and destroy the stream
+ stream.CommitL();
+ TInt len2 = ptr.Length();
+ CleanupStack::PopAndDestroy(&stream);
+
+ // write the serialized hits in to the message
+ aMessage.WriteL(0, ptr);
+
+ // Delete descriptor
+ CleanupStack::PopAndDestroy(buf);
+
+ // Complete the request
+ aMessage.Complete(KErrNone);
+ }
void CSearchServerSubSession::AddL(const RMessage2& aMessage)
{
@@ -360,7 +444,11 @@
void CSearchServerSubSession::LimitExcerptToMaxLengthL(CSearchDocument* aSearchDocument)
{
+ //This is commented because HIGHLIGHTER uses full expcerpt field,
+ //no need to limit excerpt
//check if excerpt is more then maximum allowed
+#ifdef USE_HIGHLIGHTER
+#else
if(aSearchDocument->Excerpt().Length() > MAX_EXCERPT_LENGTH)
{
OstTraceExt1( TRACE_NORMAL, CSEARCHSERVERSUBSESSION_LIMITEXCERPTTOMAXLENGTHL, "CSearchServerSubSession::LimitExcerptToMaxLengthL;docuid=%S", (aSearchDocument->Id()) );
@@ -375,6 +463,7 @@
aSearchDocument->AddExcerptL(*bufExcerpt);
CleanupStack::PopAndDestroy(bufExcerpt);
}
+#endif
}
void CSearchServerSubSession::AddCompleteL(const RMessage2& /*aMessage*/)
@@ -498,6 +587,11 @@
TRAP(aError, GetDocumentCompleteL(aMessage));
break;
}
+ case ECPixTaskTypeGetBatchDocument:
+ {
+ TRAP(aError, GetBatchDocumentCompleteL(aMessage));
+ break;
+ }
case ECPixTaskTypeAdd:
{
TRAP(aError, AddCompleteL(aMessage));
--- a/searcher/searchserver/traces/CCPixIdxDbTraces.h Mon Jul 26 12:27:31 2010 +0530
+++ b/searcher/searchserver/traces/CCPixIdxDbTraces.h Mon Aug 09 10:51:30 2010 +0530
@@ -1,4 +1,4 @@
-// Created by TraceCompiler 2.1.2
+// Created by TraceCompiler 2.2.3
// DO NOT EDIT, CHANGES WILL BE LOST
#ifndef __CCPIXIDXDBTRACES_H__
@@ -15,6 +15,9 @@
#ifndef __KERNEL_MODE__
+#ifndef __OSTTRACEGEN1_TUINT32_CONST_TDESC16REF__
+#define __OSTTRACEGEN1_TUINT32_CONST_TDESC16REF__
+
inline TBool OstTraceGen1( TUint32 aTraceID, const TDesC16& aParam1 )
{
TBool retval;
@@ -49,10 +52,16 @@
}
return retval;
}
+
+#endif // __OSTTRACEGEN1_TUINT32_CONST_TDESC16REF__
+
#endif
#ifndef __KERNEL_MODE__
+#ifndef __OSTTRACEGEN2_TUINT32_CONST_TDESC16REF_CONST_TDESC16REF__
+#define __OSTTRACEGEN2_TUINT32_CONST_TDESC16REF_CONST_TDESC16REF__
+
inline TBool OstTraceGen2( TUint32 aTraceID, const TDesC16& aParam1, const TDesC16& aParam2 )
{
TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
@@ -133,6 +142,9 @@
}
return retval;
}
+
+#endif // __OSTTRACEGEN2_TUINT32_CONST_TDESC16REF_CONST_TDESC16REF__
+
#endif
--- a/searcher/searchserver/traces/CCPixSearchTraces.h Mon Jul 26 12:27:31 2010 +0530
+++ b/searcher/searchserver/traces/CCPixSearchTraces.h Mon Aug 09 10:51:30 2010 +0530
@@ -1,4 +1,4 @@
-// Created by TraceCompiler 2.1.2
+// Created by TraceCompiler 2.2.3
// DO NOT EDIT, CHANGES WILL BE LOST
#ifndef __CCPIXSEARCHTRACES_H__
--- a/searcher/searchserver/traces/CSearchServerSessionTraces.h Mon Jul 26 12:27:31 2010 +0530
+++ b/searcher/searchserver/traces/CSearchServerSessionTraces.h Mon Aug 09 10:51:30 2010 +0530
@@ -1,4 +1,4 @@
-// Created by TraceCompiler 2.1.2
+// Created by TraceCompiler 2.2.3
// DO NOT EDIT, CHANGES WILL BE LOST
#ifndef __CSEARCHSERVERSESSIONTRACES_H__
--- a/searcher/searchserver/traces/CSearchServerSubSessionTraces.h Mon Jul 26 12:27:31 2010 +0530
+++ b/searcher/searchserver/traces/CSearchServerSubSessionTraces.h Mon Aug 09 10:51:30 2010 +0530
@@ -1,4 +1,4 @@
-// Created by TraceCompiler 2.1.2
+// Created by TraceCompiler 2.2.3
// DO NOT EDIT, CHANGES WILL BE LOST
#ifndef __CSEARCHSERVERSUBSESSIONTRACES_H__
@@ -21,11 +21,14 @@
#define CSEARCHSERVERSUBSESSION_GETDOCUMENTCOMPLETEL_ENTRY 0x8a0014
#define CSEARCHSERVERSUBSESSION_GETDOCUMENTCOMPLETEL_EXIT 0x8a0015
#define CSEARCHSERVERSUBSESSION_GETDOCUMENTOBJECTL_ENTRY 0x8a0016
-#define CSEARCHSERVERSUBSESSION_GETDOCUMENTOBJECTL_EXIT 0x8a0017
#define DUP1_CSEARCHSERVERSUBSESSION_GETDOCUMENTOBJECTL_EXIT 0x8a0018
+#define CSEARCHSERVERSUBSESSION_GETDOCUMENTOBJECTL_EXIT 0x8a0019
#ifndef __KERNEL_MODE__
+#ifndef __OSTTRACEGEN1_TUINT32_CONST_TDESC16REF__
+#define __OSTTRACEGEN1_TUINT32_CONST_TDESC16REF__
+
inline TBool OstTraceGen1( TUint32 aTraceID, const TDesC16& aParam1 )
{
TBool retval;
@@ -60,6 +63,9 @@
}
return retval;
}
+
+#endif // __OSTTRACEGEN1_TUINT32_CONST_TDESC16REF__
+
#endif
--- a/searcher/searchserver/traces/CSearchServerTraces.h Mon Jul 26 12:27:31 2010 +0530
+++ b/searcher/searchserver/traces/CSearchServerTraces.h Mon Aug 09 10:51:30 2010 +0530
@@ -1,4 +1,4 @@
-// Created by TraceCompiler 2.1.2
+// Created by TraceCompiler 2.2.3
// DO NOT EDIT, CHANGES WILL BE LOST
#ifndef __CSEARCHSERVERTRACES_H__
--- a/searcher/searchserver/traces/OstTraceDefinitions.h Mon Jul 26 12:27:31 2010 +0530
+++ b/searcher/searchserver/traces/OstTraceDefinitions.h Mon Aug 09 10:51:30 2010 +0530
@@ -2,6 +2,6 @@
#define __OSTTRACEDEFINITIONS_H__
// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler
// REMOVE BEFORE CHECK-IN TO VERSION CONTROL
-//#define OST_TRACE_COMPILER_IN_USE
+#define OST_TRACE_COMPILER_IN_USE
#include <opensystemtrace.h>
#endif
--- a/searcher/searchserver/traces/fixed_id.definitions Mon Jul 26 12:27:31 2010 +0530
+++ b/searcher/searchserver/traces/fixed_id.definitions Mon Aug 09 10:51:30 2010 +0530
@@ -14,7 +14,7 @@
[TRACE]TRACE_FLOW[0x8A]_CSEARCHSERVERSUBSESSION_GETDOCUMENTL_ENTRY=0x11
[TRACE]TRACE_FLOW[0x8A]_CSEARCHSERVERSUBSESSION_GETDOCUMENTL_EXIT=0x12
[TRACE]TRACE_FLOW[0x8A]_CSEARCHSERVERSUBSESSION_GETDOCUMENTOBJECTL_ENTRY=0x16
-[TRACE]TRACE_FLOW[0x8A]_CSEARCHSERVERSUBSESSION_GETDOCUMENTOBJECTL_EXIT=0x17
+[TRACE]TRACE_FLOW[0x8A]_CSEARCHSERVERSUBSESSION_GETDOCUMENTOBJECTL_EXIT=0x19
[TRACE]TRACE_FLOW[0x8A]_CSEARCHSERVERSUBSESSION_SEARCHCOMPLETEL_ENTRY=0xf
[TRACE]TRACE_FLOW[0x8A]_CSEARCHSERVERSUBSESSION_SEARCHCOMPLETEL_EXIT=0x10
[TRACE]TRACE_FLOW[0x8A]_CSEARCHSERVERSUBSESSION_SEARCHL_ENTRY=0xc
@@ -39,3 +39,4 @@
[TRACE]TRACE_NORMAL[0x86]_DUP1_CSEARCHSERVERSUBSESSION_CSEARCHSERVERSUBSESSION=0xc
[TRACE]TRACE_NORMAL[0x86]_DUP1_CSEARCHSERVERSUBSESSION_LIMITEXCERPTTOMAXLENGTHL=0xe
[TRACE]TRACE_NORMAL[0x86]_DUP2_CPIXIDXDB_DUMPDOCUMENT=0x3
+[[OBSOLETE]][TRACE]TRACE_FLOW[0x8A]_CSEARCHSERVERSUBSESSION_GETDOCUMENTOBJECTL_EXIT=0x17
--- a/searcher/tsrc/cpixsearchertest/conf/cpixsearchertest.cfg Mon Jul 26 12:27:31 2010 +0530
+++ b/searcher/tsrc/cpixsearchertest/conf/cpixsearchertest.cfg Mon Aug 09 10:51:30 2010 +0530
@@ -295,4 +295,18 @@
foobar TestExerptLength
delete foobar
[Endtest]
+
+[Test]
+title TestGetBatchdoc
+create cpixsearchertest foobar
+foobar TestGetBatchdoc
+delete foobar
+[Endtest]
+
+[Test]
+title TestAsyncGetBatchdoc
+create cpixsearchertest foobar
+foobar TestAsyncGetBatchdoc
+delete foobar
+[Endtest]
\ No newline at end of file
--- a/searcher/tsrc/cpixsearchertest/group/cpixsearchertest.mmp Mon Jul 26 12:27:31 2010 +0530
+++ b/searcher/tsrc/cpixsearchertest/group/cpixsearchertest.mmp Mon Aug 09 10:51:30 2010 +0530
@@ -82,6 +82,7 @@
USERINCLUDE ./../../../../searchsrv_plat/cpix_utility_api/inc
USERINCLUDE ../../../searchclient/inc
+USERINCLUDE ../../../searchclient/traces
SOURCEPATH ../../../searchclient/src
SOURCE rsearchserversession.cpp
@@ -94,4 +95,6 @@
LIBRARY FLOGGER.lib
LIBRARY estor.lib
LIBRARY efsrv.lib
+
+EPOCALLOWDLLDATA
// End of File
--- a/searcher/tsrc/cpixsearchertest/inc/cpixsearchertest.h Mon Jul 26 12:27:31 2010 +0530
+++ b/searcher/tsrc/cpixsearchertest/inc/cpixsearchertest.h Mon Aug 09 10:51:30 2010 +0530
@@ -180,6 +180,8 @@
virtual TInt TestGetDocumentAsyncL( CStifItemParser& aItem );
virtual TInt TestGetInvalidDocumentAsyncL( CStifItemParser& aItem );
virtual TInt TestExerptLengthL( CStifItemParser& aItem );
+ virtual TInt TestGetBatchdocL( CStifItemParser& aItem );
+ virtual TInt TestAsyncGetBatchdocL( CStifItemParser& aItem );
/**
* Method used to log version of test class
*/
--- a/searcher/tsrc/cpixsearchertest/inc/cpixsearchertester.h Mon Jul 26 12:27:31 2010 +0530
+++ b/searcher/tsrc/cpixsearchertest/inc/cpixsearchertester.h Mon Aug 09 10:51:30 2010 +0530
@@ -60,6 +60,7 @@
public: // From MCPixNextDocumentRequestObserver
void HandleDocumentL(TInt aError, CSearchDocument* aDocument);
+ void HandleBatchDocumentL(TInt aError, TInt aReturnCount, CSearchDocument** aDocument);
public: // From MAOTestObserver
void CallCompleted( int i );
@@ -116,6 +117,11 @@
void testGetInvalidDocumentAsync();
TInt testEcerptLenth();
+
+ void testgetbatchdoc();
+
+ void testasyncgetbatchdoc();
+
private:
CCPixSearcher* iSearcher;
RSearchServerSession iSession;
@@ -128,6 +134,7 @@
CSearchDocument* iDocument;
TBool iHandleDocumentLFunctionCalled; // ETrue if HandleDocumentL called
TBool iHandleSetAnalyzerCalled; // ETrue if HandleSetAnalyzerResultL called
+ TInt iretcount;
};
#endif /* CPIXSEARCHERTESTER_H_ */
--- a/searcher/tsrc/cpixsearchertest/src/cpixsearchertestBlocks.cpp Mon Jul 26 12:27:31 2010 +0530
+++ b/searcher/tsrc/cpixsearchertest/src/cpixsearchertestBlocks.cpp Mon Aug 09 10:51:30 2010 +0530
@@ -164,6 +164,8 @@
ENTRY( "TestGetDocumentAsync", Ccpixsearchertest::TestGetDocumentAsyncL),
ENTRY( "TestGetInvalidDocumentAsync", Ccpixsearchertest::TestGetInvalidDocumentAsyncL),
ENTRY( "TestExerptLength", Ccpixsearchertest::TestExerptLengthL),
+ ENTRY( "TestGetBatchdoc", Ccpixsearchertest::TestGetBatchdocL),
+ ENTRY( "TestAsyncGetBatchdoc", Ccpixsearchertest::TestAsyncGetBatchdocL),
//ADD NEW ENTRY HERE
// [test cases entries] - Do not remove
@@ -982,6 +984,49 @@
doLog( iLog, err, KTestFormBaseAppClassNoError );
return err;
}
+
+// -----------------------------------------------------------------------------
+// Ccpixsearchertest::TestGetBatchdocL
+// -----------------------------------------------------------------------------
+//
+TInt Ccpixsearchertest::TestGetBatchdocL( CStifItemParser& /*aItem*/ )
+ {
+ _LIT( KTestFormBaseAppClassNoError, "TestGetBatchdocL: No Error" );
+ CTestSearcher* testsearcher = new CTestSearcher();
+ testsearcher->initialsetUp();
+ testsearcher->createandinitindexer();
+ testsearcher->createsearcher();
+ testsearcher->harvesttestcontent( 10 );
+ TRAPD ( err , testsearcher->testgetbatchdoc() );
+ testsearcher->ReleaseIndexer();
+ testsearcher->ReleaseSearcher();
+ testsearcher->tearDown();
+ delete testsearcher;
+ doLog( iLog, err, KTestFormBaseAppClassNoError );
+ return err;
+ }
+// -----------------------------------------------------------------------------
+// Ccpixsearchertest::TestAsyncGetBatchdocL
+// -----------------------------------------------------------------------------
+//
+TInt Ccpixsearchertest::TestAsyncGetBatchdocL( CStifItemParser& /*aItem*/ )
+ {
+ _LIT( KTestFormBaseAppClassNoError, "TestAsyncGetBatchdocL: No Error" );
+ CTestSearcher* testsearcher = new CTestSearcher();
+ testsearcher->initialsetUp();
+ testsearcher->createandinitindexer();
+ testsearcher->createsearcher();
+ testsearcher->harvesttestcontent( 10 );
+ testsearcher->InitAsyncComponents();
+ TRAPD ( err , testsearcher->testasyncgetbatchdoc() );
+ testsearcher->ReleaseIndexer();
+ testsearcher->ReleaseSearcher();
+ testsearcher->ReleaseAsyncComponents();
+ testsearcher->tearDown();
+ delete testsearcher;
+ doLog( iLog, err, KTestFormBaseAppClassNoError );
+ return err;
+ }
// -----------------------------------------------------------------------------
// Ccpixsearchertest::?member_function
// ?implementation_description
--- a/searcher/tsrc/cpixsearchertest/src/cpixsearchertester.cpp Mon Jul 26 12:27:31 2010 +0530
+++ b/searcher/tsrc/cpixsearchertest/src/cpixsearchertester.cpp Mon Aug 09 10:51:30 2010 +0530
@@ -234,6 +234,21 @@
iWait->AsyncStop();
}
}
+void CTestSearcher::HandleBatchDocumentL(TInt /*aError*/, TInt aReturnCount, CSearchDocument** aDocument)
+ {
+ iHandleDocumentLFunctionCalled = ETrue;
+
+ if (iWait && iWait->IsStarted())
+ {
+ for (int i=0; i<aReturnCount; i++)
+ delete aDocument[i];
+ delete aDocument;
+
+ TS_ASSERT(aReturnCount == iretcount);
+
+ iWait->AsyncStop();
+ }
+ }
// Timeout callback
void CTestSearcher::CallCompleted( int /* i */ )
@@ -571,3 +586,69 @@
}
return ( length > 125 )?KErrGeneral:KErrNone;
}
+
+void CTestSearcher::testgetbatchdoc()
+ {
+ //Make sure Hit count is 7
+ TInt hitcount = iSearcher->SearchL(KQueryString);
+ CSearchDocument** doc = NULL;
+ if ( hitcount )
+ {
+ TInt retcount=0,count=3;
+ doc = iSearcher->GetBatchDocumentL(0,retcount,count);
+ for (int i=0; i<retcount; i++)
+ delete doc[i];
+ delete doc;
+ doc = NULL;
+ TS_ASSERT(retcount == 3);
+ //check the extreme conditions
+ retcount = 0;
+ doc = iSearcher->GetBatchDocumentL(3,retcount,count);
+ for (int i=0; i<retcount; i++)
+ delete doc[i];
+ delete doc;
+ doc = NULL;
+ TS_ASSERT(retcount == 3);
+
+ retcount = 0;
+ doc = iSearcher->GetBatchDocumentL(4,retcount,count);
+ for (int i=0; i<retcount; i++)
+ delete doc[i];
+ delete doc;
+ doc = NULL;
+ TS_ASSERT(retcount == 2);
+
+ retcount = 0;
+ TRAPD(err, doc = iSearcher->GetBatchDocumentL(11,retcount,count));
+ TS_ASSERT(err == KErrDocumentAccessFailed);
+ TS_ASSERT(retcount == 0);
+ }
+ return;
+ }
+
+void CTestSearcher::testasyncgetbatchdoc()
+ {
+ //Make sure Hit count is 7
+ TInt hitcount = iSearcher->SearchL(KQueryString);
+ if (hitcount)
+ {
+ TInt count =3;
+ iretcount = 3;
+ iSearcher->GetBatchDocumentL(0,*this,count);
+ iWait->Start();
+
+ iretcount = 3;
+ iSearcher->GetBatchDocumentL(3,*this,count);
+ iWait->Start();
+
+ iretcount = 2;
+ iSearcher->GetBatchDocumentL(4,*this,count);
+ iWait->Start();
+
+ iretcount = 0;
+ iSearcher->GetBatchDocumentL(11,*this,count);
+ iWait->Start();
+
+ }
+ return;
+ }
--- a/searcher/tsrc/logplayer/inc/logplayermanager.h Mon Jul 26 12:27:31 2010 +0530
+++ b/searcher/tsrc/logplayer/inc/logplayermanager.h Mon Aug 09 10:51:30 2010 +0530
@@ -94,6 +94,7 @@
// Dummy implementation
void HandleDocumentL(TInt /*aError*/, CSearchDocument* /*aDocument*/) {}
+ void HandleBatchDocumentL(TInt aError, TInt aReturnCount, CSearchDocument** aDocument) {}
public: // New functions
--- a/searcher/tsrc/robustnesstest/inc/csearchingworker.h Mon Jul 26 12:27:31 2010 +0530
+++ b/searcher/tsrc/robustnesstest/inc/csearchingworker.h Mon Aug 09 10:51:30 2010 +0530
@@ -54,6 +54,7 @@
public: // From MCPixNextDocumentRequestObserver
virtual void HandleDocumentL(TInt /*aError*/, CSearchDocument* /*aDocument*/);
+ virtual void HandleBatchDocumentL(TInt aError, TInt aReturnCount, CSearchDocument** aDocument) ;
public: // Statistics
--- a/searcher/tsrc/robustnesstest/src/csearchingworker.cpp Mon Jul 26 12:27:31 2010 +0530
+++ b/searcher/tsrc/robustnesstest/src/csearchingworker.cpp Mon Aug 09 10:51:30 2010 +0530
@@ -230,6 +230,9 @@
void CSearchingWorker::HandleDocumentL(TInt /*aError*/, CSearchDocument* /*aDocument*/)
{
}
+void CSearchingWorker::HandleBatchDocumentL(TInt aError, TInt aReturnCount, CSearchDocument** aDocument)
+ {
+ }
TInt CSearchingWorker::ConsumeSearches()
{
--- a/searchsrv_plat/cpix_framework_api/inc/ccpixsearcher.h Mon Jul 26 12:27:31 2010 +0530
+++ b/searchsrv_plat/cpix_framework_api/inc/ccpixsearcher.h Mon Aug 09 10:51:30 2010 +0530
@@ -235,6 +235,36 @@
* @return Next available document or NULL, if no more documents can be found
*/
IMPORT_C void GetDocumentL(TInt aIndex, MCPixNextDocumentRequestObserver& aObserver);
+
+ /**
+ * GetBatchDocumentL
+ * Iterates throught the search result's document list (hits), that is stored in the
+ * server side. The accessed list is ranked and the best matching document is heading
+ * the result list. First call of this method, return best matching, then second best
+ * matching and so forth until all documents have been found. Method returns NULL,
+ * when no more documents can be found.
+ *
+ * Leaves with KErrInUse, if asynchronous request is pending and
+ * KErrNotReady, if no database has been succefullly opened.
+ *
+ * @todo Having also GetDocumentLC would be nice
+ * @return Next available document or NULL, if no more documents can be found. Ownership is transferred
+ */
+ IMPORT_C CSearchDocument** GetBatchDocumentL(TInt aIndex, TInt& aReturnDoc, TInt aCount = 1);
+
+ /**
+ * GetBatchDocumentL
+ * Iterates throught the search result's document list (hits), that is stored in the
+ * server side. The accessed list is ranked and the best matching document isheading
+ * the result lest. When the request has been completed a callback to
+ * MSearchObserver::HandleDocumentL is issued.
+ *
+ * Leaves with KErrInUse, if asynchronous request is pending and
+ * KErrNotReady, if no database has been succefullly opened.
+ *
+ * @return Next available document or NULL, if no more documents can be found
+ */
+ IMPORT_C void GetBatchDocumentL(TInt aIndex, MCPixNextDocumentRequestObserver& aObserver, TInt aCount = 1);
protected: // Functions from base classes
@@ -287,6 +317,7 @@
EStateOpenDatabase,
EStateSearch,
EStateGetDocument,
+ EStateGetBatchDocument,
EStateSetAnalyzer,
EStateSetQueryParser
};
--- a/searchsrv_plat/cpix_framework_api/inc/mcpixsearcherobserver.h Mon Jul 26 12:27:31 2010 +0530
+++ b/searchsrv_plat/cpix_framework_api/inc/mcpixsearcherobserver.h Mon Aug 09 10:51:30 2010 +0530
@@ -72,6 +72,16 @@
* @aDocument The received document. Ownership of is transfered to the observer. NULL if no more documents.
*/
virtual void HandleDocumentL(TInt aError, CSearchDocument* aDocument) = 0;
+
+ /**
+ * HandleBatchDocumentL.
+ * Handle list of documents received from the server.
+ * @param aError Completion code of a asynchronous request. KErrNone if operation
+ * was succesful, otherwise system wide error code.
+ * @param aReturnCount count of the documents returned.
+ * @aDocument The received document. Ownership of is transfered to the observer. NULL if no more documents.
+ */
+ virtual void HandleBatchDocumentL(TInt aError, TInt aReturnCount, CSearchDocument** aDocument) = 0;
};
--- a/searchsrv_plat/cpix_framework_api/inc/rsearchserversession.h Mon Jul 26 12:27:31 2010 +0530
+++ b/searchsrv_plat/cpix_framework_api/inc/rsearchserversession.h Mon Aug 09 10:51:30 2010 +0530
@@ -203,6 +203,28 @@
* @return The document object. Ownership is transferred to the caller
*/
IMPORT_C CSearchDocument* GetDocumentObjectL();
+
+ /**
+ * GetBatchDocument. Synchronous version.
+ * Gets a list of document from the search results.
+ */
+ IMPORT_C CSearchDocument** GetBatchDocumentL(TInt aIndex, TInt& aReturnDoc, TInt aCount);
+
+ /**
+ * GetBatchDocument. Asynchronous version.
+ * Prepares a list of document from the search results. After this request
+ * complets, document can be read by using GetBatchDocumentObjectL.
+ * @param aStatus The TRequestStatus object to be used for async comms.
+ */
+ IMPORT_C void GetBatchDocument(TInt aIndex, TRequestStatus& aStatus, TInt aCount);
+
+ /**
+ * GetBatchDocumentObjectL.
+ * Get the actual Batch document object prepared by the asynchronous GetDocument request.
+ * @return The document object. Ownership is transferred to the caller
+ * Note: aRetCount will have the count of the documents returned
+ */
+ IMPORT_C CSearchDocument** GetBatchDocumentObjectL( TInt& aRetCount);
/**
* AddL. Synchronous version
@@ -286,11 +308,19 @@
* iDocumentSize, bytes needed for the next document
*/
TInt iDocumentSize;
+ /**
+ * iDocSizeArray, array of docs sizes
+ */
+ RArray<TInt> iDocSizeArray;
/**
* Package for document size.
*/
TPckg<TInt> iDocumentSizePckg;
+
+ TInt* iSizeList;
+
+ TInt iReqCount;
};
--- a/searchsrv_plat/cpix_search_api/inc/cpixsearcher.h Mon Jul 26 12:27:31 2010 +0530
+++ b/searchsrv_plat/cpix_search_api/inc/cpixsearcher.h Mon Aug 09 10:51:30 2010 +0530
@@ -201,12 +201,35 @@
/**
* Asynchronously get the document with index aIndex.
* @param aIndex Index of document to be retrieved
- * @return A pointer to CpixDocument that has been retrieved. Null on error.
*
* @note This should be called only after the synchronous search call has returned
* and aIndex should be between 0 and estimated count returned by Search().
*/
void documentAsync(int aIndex) THROWS_EXCEPTION;
+
+ /**
+ * Synchronously get the count,aCount of batch documens with index aIndex.
+ * @param aIndex starting Index of document to be retrieved
+ * @param aCount number of documents requested
+ * @param aReturnDoc number of documents returned
+ * @return A double pointer to CpixDocument that has been retrieved. Null on error.
+ *
+ * @note This should be called only after the synchronous search call has returned
+ * and aIndex should be between 0 and estimated count returned by Search().
+ * It is the client duty to free the memory allocated for the returned CpixDocument**
+ * deallocation of the memory can be done based on the value returned in aReturnDoc
+ */
+ CpixDocument** batchdocument(int aIndex,int& aReturnDoc, int aCount = 1) THROWS_EXCEPTION;
+
+ /**
+ * Asynchronously get the batch documents with index aIndex.
+ * @param aIndex Starting Index of documents to be retrieved
+ * @param aCount number of documents requested
+ *
+ * @note This should be called only after the synchronous search call has returned
+ * and aIndex should be between 0 and estimated count returned by Search().
+ */
+ void batchdocumentAsync(int aIndex, int aCount = 1) THROWS_EXCEPTION;
/**
* Cancels any outstanding searches.
@@ -228,11 +251,18 @@
void handleSearchResults(int aError, int aEstimatedResultCount);
/**
- * Notify completion of GetDatabaseAsyc
+ * Notify completion of documentAsyc
* @param aError Completion (error) code of GetDatabaseAsyc
* @param aDocument The requested document.
*/
void handleDocument(int aError, CpixDocument* aDocument);
+
+ /**
+ * Notify completion of BatchdocumentAsyc
+ * @param aError Completion (error) code of GetDatabaseAsyc
+ * @param aDocument The requested document.
+ */
+ void handleBatchDocuments(int aError,int aRetCount, CpixDocument** aDocument);
private:
/**