mirror of https://gitee.com/bigwinds/arangodb
backport: remove unused boost dependency, backport from iresearch upstream: ensure doc_ids are not truncated in the postings list
This commit is contained in:
parent
e7889507f9
commit
2554f109e3
|
@ -4120,18 +4120,20 @@ void postings_writer::end_term(version10::term_meta& meta, const uint64_t* tfreq
|
|||
/* write remaining documents using
|
||||
* variable length encoding */
|
||||
data_output& out = *doc.out;
|
||||
|
||||
for (uint32_t i = 0; i < doc.size; ++i) {
|
||||
const uint32_t doc_delta = doc.deltas[i];
|
||||
const uint64_t doc_delta = doc.deltas[i];
|
||||
|
||||
if (!features_.freq()) {
|
||||
out.write_vint(doc_delta);
|
||||
out.write_vlong(doc_delta);
|
||||
} else {
|
||||
assert(doc.freqs);
|
||||
const uint32_t freq = doc.freqs[i];
|
||||
const uint64_t freq = doc.freqs[i];
|
||||
|
||||
if (1 == freq) {
|
||||
out.write_vint(shift_pack_32(doc_delta, true));
|
||||
out.write_vlong(shift_pack_64(doc_delta, true));
|
||||
} else {
|
||||
out.write_vint(shift_pack_32(doc_delta, false));
|
||||
out.write_vlong(shift_pack_64(doc_delta, false));
|
||||
out.write_vlong(freq);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -277,10 +277,10 @@ class IRESEARCH_PLUGIN postings_writer final: public iresearch::postings_writer
|
|||
}; // stream
|
||||
|
||||
struct doc_stream : stream {
|
||||
void doc(doc_id_t delta) { deltas[size] = delta; }
|
||||
void flush(uint64_t* buf, bool freq);
|
||||
bool full() const { return BLOCK_SIZE == size; }
|
||||
void next(doc_id_t id) { last = id, ++size; }
|
||||
void doc(int32_t delta) { deltas[size] = delta; }
|
||||
void freq(uint64_t frq) { freqs[size] = frq; }
|
||||
|
||||
void reset() {
|
||||
|
@ -433,4 +433,4 @@ class IRESEARCH_PLUGIN format final : public iresearch::format {
|
|||
NS_END
|
||||
NS_END
|
||||
|
||||
#endif
|
||||
#endif
|
|
@ -97,7 +97,6 @@ if (USE_IRESEARCH)
|
|||
|
||||
target_link_libraries(${LIB_ARANGO_IRESEARCH}
|
||||
${IRESEARCH_TARGET_DEPENDENCY}
|
||||
boost_filesystem # required by iResearch
|
||||
boost_locale # required by iResearch
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue