Skip to content

Support multi-archive search and SearchResult with snippets - #276

Open
Sriram-Nambiar wants to merge 1 commit into
openzim:mainfrom
Sriram-Nambiar:multi-archive-search-and-snippets
Open

Sriram-Nambiar wants to merge 1 commit into
openzim:mainfrom
Sriram-Nambiar:multi-archive-search-and-snippets

Conversation

@Sriram-Nambiar

@Sriram-Nambiar Sriram-Nambiar commented Oct 20, 2026 •

Copy link
Copy Markdown

Fixes #230 Fixes #226

  • Support multi-archive searching in Searcher: can be initialized empty, with a list of archives, or populated via add_archive() (also aliased as addArchive()).

  • search.getResults() yields SearchResult objects exposing archive, path, title, and snippet (instead of just raw path strings).

  • SearchResult compares equal to str matching its path so existing code and tests expecting entry paths do not break.

Comment thread libzim/search.pyi

@benoit74 benoit74 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We modify the SearchResultSet but this is OK since this will be a major release.

Please:

  • mention this breaking change in CHANGELOG
  • bump version in pyproject.toml to 4.0.0-dev0 so that we do not release this as a minor by mistake

@Sriram-Nambiar
Sriram-Nambiar force-pushed the multi-archive-search-and-snippets branch from f90a269 to c35621f Compare October 20, 2026 15:06
@benoit74
benoit74 requested a review from rgaudin October 20, 2026 15:13

This branch has not been deployed

No deployments
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.

Multiple archive searcher Support getSnippet

3 participants