Skip to content

[Feature Request]: Improving search #325

Description

@mm12

Checklist

  • I am using an up-to-date version.
  • I have read the documentation.
  • I have searched existing issues.

Description

I know this is somewhat on the roadmap, but I thought I would share some specifics of how search should be improved. It is very important that work on search functionality starts early, to make sure a system is developed in a way that supports the future implementation of features (ie, we dont want to be in a situation where implementing a standard search feature would require major changes)

Solution

End goal: A fully featured search system. This could make use of Elastic and/or Opensearch. Desirable qualities:

  • A Standard search syntax
    • should be similar to Boorus and search engines - no one wants to learn a new syntax
  • Grouping of items
    • Many implementations of grouping treat each group as its own search, combining results are it goes up.
  • Boolean operators (AND, OR, NOT) of items and groups
  • Reserved characters and names:
    • there should be reserved characters, such as quotation marks and colons, that mean something in search syntax. To search the character itself, it will need to be escaped.
    • Any assignable field should be searchable. For example with filename:<query> - this should able to be used with any given type of field. Of course, by default, it is assumed to be a tag.
  • Searching text fields:
    • RegEx seems like the easiest way to do this. Not everyone knows it, but it could be a mode.
  • Handling entries with spaces ([BUG] Tags with Spaces in Searchbar #112) - there are 2 ways this is usually dealt with:
    • Make all spaces actually underscores: if your tag is a happy new year it becomes a_happy_new_year, but the underscores do not get shown to the user. This means that spaces and underscores are effectively the same.
    • grouping using quotations: "a happy new year" - however, this means that items with a quote in them will need to be escaped: a tag named "wow thats cool" would need to be searched with something like "\"wow thats cool\"" instead.

Alternatives

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    TagStudio: SearchThe TagStudio search engineType: DuplicateThis issue or pull request already existsType: FeatureNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions