[GH-ISSUE #1537] Query Language #962

Closed
opened 2026-03-02 11:54:00 +03:00 by kerem · 8 comments
Owner

Originally created by @SHU-red on GitHub (Jun 6, 2025).
Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/1537

Describe the feature you'd like

  • Add possibility to handle tags with space characters in them

Describe the benefits this would bring to existing Karakeep users

  • AI tagging (in my case) introduces many tags like "Nuclear Fusion" which contain spaces
  • I could not find a way to specify #nuclear fusion (#nuclear fusion) #(nuclear fusion) for a working smart list

Can the goal of this request already be achieved via other means?

no

Have you searched for an existing open/closed issue?

  • I have searched for existing issues and none cover my fundamental request

Additional context

No response

Originally created by @SHU-red on GitHub (Jun 6, 2025). Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/1537 ### Describe the feature you'd like - Add possibility to handle tags with space characters in them ### Describe the benefits this would bring to existing Karakeep users - AI tagging (in my case) introduces many tags like "Nuclear Fusion" which contain spaces - I could not find a way to specify `#nuclear fusion` `(#nuclear fusion)` `#(nuclear fusion)` for a working smart list ### Can the goal of this request already be achieved via other means? no ### Have you searched for an existing open/closed issue? - [x] I have searched for existing issues and none cover my fundamental request ### Additional context _No response_
Author
Owner

@SHU-red commented on GitHub (Jun 6, 2025):

As a hack i added to All Tagging the additional AI tagging rule:

"VERY IMPORTANT: Tags are strictly created in snake case using hyphens instead of space characters!!!"

Works for me using llama model
Did not work well on gemma

This way only tags like #nuclear-fusion should be created

<!-- gh-comment-id:2948935925 --> @SHU-red commented on GitHub (Jun 6, 2025): As a hack i added to `All Tagging` the additional AI tagging rule: "VERY IMPORTANT: Tags are strictly created in snake case using hyphens instead of space characters!!!" Works for me using llama model Did not work well on gemma This way only tags like `#nuclear-fusion` should be created
Author
Owner

@thiswillbeyourgithub commented on GitHub (Jun 6, 2025):

Yeah small llms tend to suck for special casing requirements. But that would be a great feature to do: add a choice box between "camelcase", "title case", "hyphen", "underscore". This would be done by a few lines of code instead of llms.

<!-- gh-comment-id:2948940984 --> @thiswillbeyourgithub commented on GitHub (Jun 6, 2025): Yeah small llms tend to suck for special casing requirements. But that would be a great feature to do: add a choice box between "camelcase", "title case", "hyphen", "underscore". This would be done by a few lines of code instead of llms.
Author
Owner

@SHU-red commented on GitHub (Jun 6, 2025):

I fully agree!

<!-- gh-comment-id:2948987716 --> @SHU-red commented on GitHub (Jun 6, 2025): I fully agree!
Author
Owner

@MohamedBassem commented on GitHub (Jun 6, 2025):

regarding the spaces, you can do:

#"tag with space"

Documented here:

https://docs.karakeep.app/Guides/search-query-language

<!-- gh-comment-id:2948995403 --> @MohamedBassem commented on GitHub (Jun 6, 2025): regarding the spaces, you can do: #"tag with space" Documented here: https://docs.karakeep.app/Guides/search-query-language
Author
Owner

@SHU-red commented on GitHub (Jun 6, 2025):

#"tag with space"

What!? Youre right ... i did test it but it did not work becuase it seems that this behaves case sensitive

So currently i need

#nuclear-fusion or #fusion-energy or #nuclear or #reactor or #"nuclear fusion" or #"Nuclear Fusion"

So i would sum it up as:

  • Add possibility for case (in)sensitivity
  • Add possibility for wildcard/regex

This would add flexibility and reduce work in catching all the variants the AI generates (at least for me)

Thank you @MohamedBassem

<!-- gh-comment-id:2949047850 --> @SHU-red commented on GitHub (Jun 6, 2025): > #"tag with space" What!? Youre right ... i did test it but it did not work becuase it seems that this behaves case sensitive So currently i need `#nuclear-fusion or #fusion-energy or #nuclear or #reactor or #"nuclear fusion" or #"Nuclear Fusion"` So i would sum it up as: - Add possibility for case (in)sensitivity - Add possibility for wildcard/regex This would add flexibility and reduce work in catching all the variants the AI generates (at least for me) Thank you @MohamedBassem
Author
Owner

@SHU-red commented on GitHub (Jun 6, 2025):

But that would be a great feature to do

But in general i agree @thiswillbeyourgithub that a predefined option would be nice, limiting everything to lowercase characters, numbers and hyphens

<!-- gh-comment-id:2949063516 --> @SHU-red commented on GitHub (Jun 6, 2025): > But that would be a great feature to do But in general i agree @thiswillbeyourgithub that a predefined option would be nice, limiting everything to lowercase characters, numbers and hyphens
Author
Owner

@thiswillbeyourgithub commented on GitHub (Jun 6, 2025):

And it would make LLMs job far easier: you can't put every requirements in all caps so the fewer the better :)

<!-- gh-comment-id:2949074871 --> @thiswillbeyourgithub commented on GitHub (Jun 6, 2025): And it would make LLMs job far easier: you can't put every requirements in all caps so the fewer the better :)
Author
Owner

@MohamedBassem commented on GitHub (Jun 7, 2025):

I'd say, let's open another issue for case sensitivity, the main request in this issue I think has been resolved.

<!-- gh-comment-id:2952350260 --> @MohamedBassem commented on GitHub (Jun 7, 2025): I'd say, let's open another issue for case sensitivity, the main request in this issue I think has been resolved.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/karakeep#962
No description provided.