From kde-commits Tue May 20 21:57:57 2008 From: "Jos van den Oever" Date: Tue, 20 May 2008 21:57:57 +0000 To: kde-commits Subject: Re: kdesupport/strigi/src/luceneindexer Message-Id: X-MARC-Message: https://marc.info/?l=kde-commits&m=121132072511719 2008/5/20 Patrick Spendrin : > Jos van den Oever schrieb: >> >> SVN commit 809919 by vandenoever: >> >> When an empty query is sent, return all documents, since none are filtered >> out. >> >> M +51 -0 cluceneindexreader.cpp M +5 -0 cluceneindexreader.h >> > > >> >> +CLuceneIndexReader::getDocuments(const std::vector& >> fullFields, >> + const std::vector& types, >> + std::vector >& result, int off, int >> max) { >> + int pos = 0; >> + int maxDoc = reader->maxDoc(); >> + for (int i=0; i> + while (pos < maxDoc && reader->isDeleted(pos)) pos++; >> + if (pos == maxDoc) return; >> + pos++; >> + } >> + if (max < 0) max = 0; >> + result.resize(max); >> + Document* d = new Document(); >> + for (int i = 0; i < max && pos < maxDoc; ++i) { >> + while (pos < maxDoc && reader->isDeleted(pos)) pos++; >> + d->clear(); >> + if (pos == maxDoc || !reader->document(pos++, d)) { > > Note: > windows(msvc) build breaks at the last two lines here: > first error is "lucene::document::Document has no function clear()" > second error is "function lucene::index::IndexReader::document doesn't > accept two arguments". > > I don't have to much time to fix that right away. What version of CLucene is this? Can you point me to the files CLucene/document/Document.h and CLucene/index/IndexReader.h that you are using? Cheers, Jos