Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Xapian::WritableDatabase with DB_NO_TERMLIST Flag #528

Merged
merged 1 commit into from
Apr 5, 2021

Conversation

maneeshpm
Copy link
Collaborator

Fixes #417

We do not use any operation that requires the use of a xapian term list. Removing it makes our indexes a bit leaner. Refer discussion on the linked issue for more info.

Changes included in this PR:

  • Use Xapian::DB_NO_TERMLIST flag along with Xapian::DB_CREATE_OR_OVERWRITE to create xapian database

@codecov
Copy link

codecov bot commented Apr 5, 2021

Codecov Report

Merging #528 (a1c9d96) into master (d4801b6) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #528   +/-   ##
=======================================
  Coverage   76.36%   76.36%           
=======================================
  Files          89       89           
  Lines        3655     3655           
  Branches     1640     1625   -15     
=======================================
  Hits         2791     2791           
  Misses        863      863           
  Partials        1        1           
Impacted Files Coverage Δ
src/writer/xapianIndexer.cpp 96.42% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d4801b6...a1c9d96. Read the comment docs.

@maneeshpm maneeshpm changed the title Create Xapain::WritableDatabase with DB_NO_TERMLIST Flag Create Xapian::WritableDatabase with DB_NO_TERMLIST Flag Apr 5, 2021
@maneeshpm maneeshpm requested a review from kelson42 April 5, 2021 14:04
Copy link
Contributor

@kelson42 kelson42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not using directly xapian::DB_CREATE_OR_OVERWRITE | xapian::DB_NO_TERMLIST?

@maneeshpm
Copy link
Collaborator Author

@kelson42 I wanted to make the hierarchy clear. Xapian::DB_CREATE_OR_OVERWRITE is the default flag, we are attaching an additional feature flag Xapian::DB_NO_TERMLIST onto it. But yes, it's just a matter of preference. Do you think we should have it directly?

@kelson42
Copy link
Contributor

kelson42 commented Apr 5, 2021

Yes

We dont have any usecase of iterating over a termlist in our current
implementation. So we can avoid a termlist as it makes the index leaner.
@kelson42 kelson42 merged commit 3bc873b into master Apr 5, 2021
@kelson42 kelson42 deleted the no_termlist branch April 5, 2021 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can we use Xapian DB_NO_TERMLIST to save ft space?
2 participants