-
Notifications
You must be signed in to change notification settings - Fork 64
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
WIP: initial version of search #847
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
var tipuesearch = <xsl:value-of select="$json.string"/>; | ||
</xsl:result-document>--> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if this is broken anyway, why not remove it completely?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't had the time to do a proper cleanup – that's one of the reasons why I said there's no rush to merge this.
</div> | ||
</form> | ||
|
||
<form><div class="tipue_search_group"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If tipue is gone, why keep the classes? I would prefer to have them renamed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, because of time constraints, I haven't done this yet. This still relies on a (potentially large) number of CSS rules from tipue, and cleaning this up may take some time. I agree it should be done, though.
I just converted this to a draft to indicate that it's still a WIP. |
Thanks @ahankinson – draft is surely more appropriate at this point. I will put it on the agenda for the next ODD meeting on August 26. I can't promise that I'll have the CSS cleaned up by then, but maybe some more people will have had an opportunity to look at this. |
reviewed at ODD Thursday. Question (to myself): Is this going to work for MEI v4 as well? |
ODD meting notes:
|
should be clean now
the code for the v4 guidelines is static (see https://github.com/music-encoding/guidelines/tree/master/v4), so this won't give search on older versions. While it's doable to adopt this, I suggest to test it on the dev guidelines in the wild first… |
2021-10-28 ODD meeeting:
|
@kepper do you want to keep the |
let me see what I can accomplish this week. Would be nice to keep it as reference over there, but then remove it afterwards… |
@kepper The search isn't working because |
IIRC, this is an issue with moving things in the correct folder, so this is mostly an issue about the GitHub Actions workflows. Seems easiest to me to do this during a video call with someone more involved in this, maybe @musicEnfanthen, @bwbohl or you, @rettinghaus? |
that was what I tried to address in #871 but if I understand correctly I was mistaken in removing fuse.js, right? So we need the build.xml patch and KEEP fuse.js, correct? |
This is the first version of a new search based on Fuse.JS. It allows fuzzy searching, which is generally helpful. It may require some more finetuning, though, to get the best possible results. The current options I use for Fuse are found here. The index itself is generated here. In summary, I have three levels of things I'm searching in:
For most parts of the Specs, it's fairly easy to see where these are coming from. The first field has a weight of 10, the second a weight of 2, the last a weight of 1. For Guidelines Chapters, ident is the title of the chapter (including the chapter number), desc is a list of all elements etc. referenced explicitly, and remarks is the full text of the chapter, including examples. Only for guidelines chapters I render a preview from the remarks, as everything else is either quite obvious or hard to render at all. All those parameters can be adjusted as necessary.
The search index is generated alongside the web version of the guidelines and should work out of the box. Compilation times haven't changed for me, so this should be fairly efficient. The searchIndex.js that is generated weighs in at around 900kb, and is already quite compressed. We could think about doing this on the server instead, but I'm not sure this is really preferable.
Of course I'd like to get feedback from others as well (@musicEnfanthen, @rettinghaus, …) – I just failed to set you up as reviewers ;-)
I believe this is ready in general. That said, there is no rush to merge it – after tomorrow, I'll be offline for the coming two weeks ;-)
If merged, this fixes #749.