Open bradphelan opened 5 years ago
I've been thinking about this for a few days now. It's an interesting idea for improving interactive queries, but it would also be complicated to implement. It's also difficult to see how to efficiently deal with a large number of tokens, since n
tokens can be permuted into n!
different queries.
I think we should look for a more specialized feature, such as a way to enter file extensions up-front, that would deliver 80% of the value with 20% of the work.
Maybe the following pseudo code
# first solve each group individually
solutions = for each group in groups:
yield solve(group)
# combine all the results into one list
solution = merge(solutions)
# sort the lines by the score each line has
solution = sort(solution)
If I'm looking for a file called
very often I might type
but hs will only match if I wrote
I suggest allowing out of order matching by splitting groups on spaces
and then in-order matching occurs in groups with no spacing and out of order matching can occur between groups. You would probably want to make this an option.