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

Enhancement : smart project search #85

Open
ldbglobe opened this issue Nov 8, 2018 · 2 comments
Open

Enhancement : smart project search #85

ldbglobe opened this issue Nov 8, 2018 · 2 comments

Comments

@ldbglobe
Copy link

ldbglobe commented Nov 8, 2018

Enhancement : smart project search

Native Sublime texte project switcher learn from past search to propose more accurate (and expected) result sort.

After few search a specific keyword may have for first result an item previously far away in the list.

It is a really helpfull functionnality when you handle a large amount of project (in my case more than 300)

@randy3k
Copy link
Owner

randy3k commented Nov 8, 2018

despite how much I love to have this feature, it is not an easy task to accomplish.

@ldbglobe
Copy link
Author

ldbglobe commented Nov 12, 2018

I can help you with a working methods I allready use in a project

On each search engine selection, I maintain a simple list based on search terms and the element picked up.

{
  (search_term) : { 
    (project_reference) : { use_time : (timestamp), count : (int) },
    (project_reference) : { use_time : (timestamp), count : (int) },
    ...
  },
  ...
}

Then, if I find a previously used terms, I override base result sorting with the usage counter.

A cron job remove elements unused from a long time or project référence no longer existing.
I your case this cleanup can be a startup action (and it can be usefull to set expiration time as a customisable value)

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