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

Display scoring #16

Open
hoelzro opened this issue Oct 4, 2018 · 4 comments
Open

Display scoring #16

hoelzro opened this issue Oct 4, 2018 · 4 comments
Labels
typescript Tasks you need to know TypeScript to work on
Milestone

Comments

@hoelzro
Copy link
Owner

hoelzro commented Oct 4, 2018

Brought up by @diego898 in #5

The search results are ordered by a score; it might be nice to show the user a visual representation of this score.

As far as the appearance goes, I'm thinking a bar alongside the title in the results - the wider the bar, the more relevant the result was to the query.

As far as implementation goes, I'm thinking we would need to stash the scores in a data tiddler indexed by the tiddler names. I think that ftsearch itself would need to do this, which raises the question of how this would work if there are multiple ftsearch filters being displayed...

@hoelzro hoelzro added the typescript Tasks you need to know TypeScript to work on label Oct 4, 2018
@hoelzro hoelzro added this to the Someday/Maybe milestone Oct 4, 2018
@hoelzro
Copy link
Owner Author

hoelzro commented Oct 11, 2018

For the bar, I was thinking of using Tobias' sparkl plugin: http://tobibeer.github.io/tw5-plugins/#sparkl

@hoelzro
Copy link
Owner Author

hoelzro commented Oct 11, 2018

As far as worrying about the data tiddler and multiple active ftsearch filters - maybe I could reference a variable settable via <$set></$set>? This should work, but feels a little hacky/side effecty, which I feel filters try to avoid - maybe I should check with the Google group and see what how others feel about it.

This might not work super well if you're chaining ftsearch filters - chances are you wouldn't do that (you would just compose a single query, plus the final resulting score would kind of lose meaning), but nothing's stopping you - is that a problem?

@hoelzro
Copy link
Owner Author

hoelzro commented Oct 13, 2018

I tried using a filter suffix (eg. ftsearch:test[query]) with a qualified tiddler as the suffix, inserted via a macro - this didn't work because the tiddler name interfered with the filter parser.

@hoelzro hoelzro modified the milestones: Someday/Maybe, 1.1.0 Oct 13, 2018
@hoelzro hoelzro closed this as completed Oct 13, 2018
hoelzro added a commit that referenced this issue Oct 13, 2018
hoelzro added a commit that referenced this issue Oct 14, 2018
This reverts the following commits:

  * 0530f35
  * 85c4ed2
  * f515f0f
  * d33f427
  * 2634f33
  * 5f7ce19
  * 4eb6a9c
  * ef0bc23
  * ad23357
  * 1b7f153
  * 7c78ebd
  * 1685d8a

See GH #16 for reason why the work was done in the first place

I'm reverting this because it's painfully slow right now, and it's going
to take a good amount of work to make it fast, if it's at all possible.
This feature wasn't originally slated for the 1.1.0 release, so I'm
pulling out all of the code I wrote for it in order to make 1.1.0
happen; afterwards I can unrevert it when I'm ready to commit to adding
the feature in a future release
@hoelzro hoelzro modified the milestones: 1.1.0, Someday/Maybe Oct 14, 2018
@hoelzro hoelzro reopened this Oct 14, 2018
@hoelzro
Copy link
Owner Author

hoelzro commented Oct 14, 2018

Reopening because the feature is way too slow for general use, and I don't want to block the next major release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
typescript Tasks you need to know TypeScript to work on
Projects
None yet
Development

No branches or pull requests

1 participant