Skip to content

feat: add context_chat:reindex to re-seed the crawl on demand#246

Merged
kyteinsky merged 3 commits into
nextcloud:mainfrom
bygadd:feat/context-chat-recrawl-command
Jul 6, 2026
Merged

feat: add context_chat:reindex to re-seed the crawl on demand#246
kyteinsky merged 3 commits into
nextcloud:mainfrom
bygadd:feat/context-chat-recrawl-command

Conversation

@bygadd

@bygadd bygadd commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #244. The SchedulerJob → StorageCrawlJob → IndexerJob chain is seeded only by the <install> repair step and removes itself after the initial crawl, so there's no way to re-enumerate mounts without reinstalling the app — e.g. when the app is installed on an instance whose files predate it, or to recover a crawl that didn't finish.

This adds an occ context_chat:reindex command that re-adds SchedulerJob, guarded so it's a no-op when one is already scheduled. Already-indexed files are skipped (the queue de-duplicates), so it's safe to run repeatedly.

(Disclosure: AI-assisted; verified on a live deployment.)

The SchedulerJob -> StorageCrawlJob -> IndexerJob chain is seeded only by the
<install> repair step and self-removes after the initial crawl, so there is no
way to re-enumerate mounts without reinstalling the app (e.g. after installing
on an instance whose files predate the app, or to recover an incomplete crawl).
Add an occ command that re-adds SchedulerJob (no-op if already scheduled);
already-indexed files are skipped by the queue de-duplication.

Refs nextcloud#244

Signed-off-by: Yoan Bozhilov <bygadd@gmail.com>
Assisted-by: Claude Code:claude-opus-4-8

@kyteinsky kyteinsky 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.

thanks for the PR!

Comment thread lib/Command/Reindex.php Outdated
Comment thread lib/Command/Reindex.php Outdated
Comment thread lib/Command/Reindex.php Outdated
Reword the class docstring and the command description per review feedback.

Signed-off-by: Yoan Bozhilov <bygadd@gmail.com>
Assisted-by: Claude Code:claude-opus-4-8
@bygadd

bygadd commented Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

applied the three suggestions, thanks for the review!

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

@kyteinsky

kyteinsky commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

the NC master branch integration test failures are expected, will be fixed in a different PR.

@bygadd

bygadd commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for confirming the master integration failures are unrelated — good to know.
Anything else you'd like changed here, or is it good to go from your side?

@kyteinsky

Copy link
Copy Markdown
Contributor

updating the PR with a merge commit so the latest context_chat changes are in for the integration test to pass for non-master branches
it is mostly unrelated but just in case.
we can merge then.

@kyteinsky kyteinsky added the AI assisted This PR contains AI-assisted commits label Jul 6, 2026
@kyteinsky

Copy link
Copy Markdown
Contributor

well, CI to be looked at later.

@kyteinsky kyteinsky merged commit 9b0ecd1 into nextcloud:main Jul 6, 2026
20 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI assisted This PR contains AI-assisted commits feedback-requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants