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

feat: option to do indexing without a query #92

Open
iynaix opened this issue Dec 31, 2023 · 7 comments
Open

feat: option to do indexing without a query #92

iynaix opened this issue Dec 31, 2023 · 7 comments
Labels
feat New feature or request good first issue Good for newcomers hacktoberfest priority:low Low priority issues

Comments

@iynaix
Copy link

iynaix commented Dec 31, 2023

Is there a way to run rclip without a query, just to update the index? Use case would be to have it run as a cron job so when a query needs to be run, there wouldn't be any waiting for indexing.

@yurijmikhalevich
Copy link
Owner

@iynaix, at the moment, there is no such option. I'll give it a closer look. You can always run rclip with a query and ignore the querying output. Since querying is quick, it shouldn't introduce any overhead.

@yurijmikhalevich yurijmikhalevich added feat New feature or request good first issue Good for newcomers priority:low Low priority issues labels Jan 13, 2024
@yurijmikhalevich yurijmikhalevich changed the title Option to do indexing without a query? feat: option to do indexing without a query Jan 17, 2024
@Fethbita
Copy link

Fethbita commented Aug 11, 2024

Also related, I have around 300k images that needs to be indexed when I was using rclip, the underlying docker image had a segfault and rclip also crashed as a result of that. When I started indexing again, the already existing 58mb sqlite index was ignored and the indexing started over. It would be good if rclip could continue indexing from where it left off. rclip recognizes the sqlite database and continues off where it left off.

@yurijmikhalevich
Copy link
Owner

@Fethbita,

rclip recognizes the sqlite database and continues off where it left off.

Great to hear 🔥 yes, rclip should continue where it left off. It will still display the progress bar counting from 0, but should quickly catch up to where it left off after it verifies that none of the images it already indexed changed.

@yurijmikhalevich yurijmikhalevich added wontfix This will not be worked on hacktoberfest good first issue Good for newcomers and removed good first issue Good for newcomers wontfix This will not be worked on labels Sep 23, 2024
@yurijmikhalevich
Copy link
Owner

Marking this Issue for hacktoberfest.

One option can be to use nargs='?' on the query argument in argparse to let it be optional, and if it's not present, only index the dir without searching.

But I think it's not the best idea to let running rclip with no arguments at all start indexing since this is a heavier operation.

Another option is to:

  • add --index-only command-line argument that will put rclip into the index-only mode
  • error if the user uses --index-only and passes the query, e.g., rclip --index-only cat is not allowed, but rclip --index-only is allowed
  • error if the user uses --index-only with any arguments other than --indexing-batch-size, --exclude-dir, --device; only these three are allowed to be used in the --index-only mode
  • running rclip with no argument, rclip, should display a short help and an error, like it does right now
  • ideally, let's handle all of the above logic using argparse

Let me know if you have any thoughts on this.

@YashBaviskar1
Copy link

Hey There, I can try to Solve this issue. Thanks

@yurijmikhalevich
Copy link
Owner

@YashBaviskar1, sounds great! Thank you! 😄

@yurijmikhalevich
Copy link
Owner

@YashBaviskar1, I have unassigned you from that issue. Let me know if you still want to work on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request good first issue Good for newcomers hacktoberfest priority:low Low priority issues
Projects
None yet
Development

No branches or pull requests

4 participants