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

Possible solution for more powerful searching? #8306

Open
firelizzard18 opened this issue Dec 26, 2024 · 4 comments
Open

Possible solution for more powerful searching? #8306

firelizzard18 opened this issue Dec 26, 2024 · 4 comments

Comments

@firelizzard18
Copy link

Describe the feature

@yueh has said a variation of the following on various different issues:

Also compared to JEI we cannot take like 30-60 seconds to build a fast searchable cache during the startup or the initial serverjoin and then use it constantly.

I'm wondering if the following approach would be feasible:

  1. Like JEI, build a global cache on startup/serverjoin. This cache would include all items, not just items within a given network.
  2. When a user does a fuzzy/tag search, search the global cache.
  3. Use the results from the global cache as a filter for the network contents, that is calculate the set intersection between the network contents and the global cache search results. Off the top of my head it seems like this could be done with a pair of trees.

If this is actually feasible, I'd be interested in working on it if I can find the time.

Reasons why it should be considered

There are numerous feature requests for more search features; from a quick search:

Additional details

No response

@Mari023
Copy link
Contributor

Mari023 commented Dec 26, 2024

I am a bit confused about the issues you linked, the first one is about Tag based and tooltip based search, both of which are implemented and work.
The second one is about better filtering for import/export buses and maybe interfaces, and the main problem there is how to make a good UI for that.
The third issue is the only one that seems really relevant to your proposal, tho there are already some improvements in that regard (search works word by word, so the example of searching iron re would work now.

So the only remaining one is fuzzy search

@firelizzard18
Copy link
Author

Tag searching works? That's the one I actually care about, but when I search #iron or something like that it works in JEI but does not work in my ME terminal. I opened the issue because it seemed like an interesting programming challenge but tag searching is the reason I care. #4852 and #5417 have a comment from yueh like the one I quoted, which is why I listed them. #6853 seemed related; after reading the other issues I figured it had the same underlying issue (search performance), it wasn't obvious to me that it's about UI.

@firelizzard18
Copy link
Author

This might be user error. Somehow I thought # was what you used in JEI to search by tag. $ seems to do what I want.

@Mari023
Copy link
Contributor

Mari023 commented Dec 27, 2024

This might be user error. Somehow I thought # was what you used in JEI to search by tag. $ seems to do what I want.

it is a bit confusing, and different between recipe viewers (see #8291, which tries to help this a bit)

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

No branches or pull requests

2 participants