[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: Re: kdesupport/strigi/src/luceneindexer
From: "Jos van den Oever" <jvdoever () gmail ! com>
Date: 2008-05-20 21:57:57
Message-ID: c2dbc4260805201457u60fa1044k81fb177195cf38f3 () mail ! gmail ! com
[Download RAW message or body]
2008/5/20 Patrick Spendrin <ps_ml@gmx.de>:
> 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.
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic