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

Drop unused serialised field #136

Merged
merged 1 commit into from
Feb 23, 2022

Conversation

rolftimmermans
Copy link
Contributor

@rolftimmermans rolftimmermans commented Feb 22, 2022

This drops df from the indexed data and stores only the frequencies per document ID. Serialisation version is bumped to 2. I have not added any code to accept version 1 dumps too, but it should be fairly easy to add if this is desired.

This PR is based off of #135 for now.

Before

Index size: 13497 terms, 14097 documents, ~15.49MB in memory, 2.49MB serialized.

Load index:
===========
  * MiniSearch.loadJSON(json, options) x 21.84 ops/sec ±3.51% (41 runs sampled)

After

Index size: 13497 terms, 14097 documents, ~15.72MB in memory, 2.31MB serialized.

Load index:
===========
  * MiniSearch.loadJSON(json, options) x 23.81 ops/sec ±3.35% (44 runs sampled)

@lucaong
Copy link
Owner

lucaong commented Feb 23, 2022

I merged #135 , squashing commits, could you rebase this one when you have time?

@rolftimmermans
Copy link
Contributor Author

Done!

@lucaong lucaong merged commit c9b8ba3 into lucaong:master Feb 23, 2022
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.

2 participants