[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: Re: kdesupport/strigi/src/luceneindexer
From: Patrick Spendrin <ps_ml () gmx ! de>
Date: 2008-05-20 14:00:12
Message-ID: 4832D96C.3000903 () gmx ! de
[Download RAW message or body]
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
<snip>
> +CLuceneIndexReader::getDocuments(const std::vector<std::string>& fullFields,
> + const std::vector<Strigi::Variant::Type>& types,
> + std::vector<std::vector<Strigi::Variant> >& result, int off, int max) {
> + int pos = 0;
> + int maxDoc = reader->maxDoc();
> + for (int i=0; i<off; 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.
regards,
Patrick
--
web: http://windows.kde.org
mailing list: kde-windows@kde.org
irc: #kde-windows (irc.freenode.net)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic