Search results on http://aurelia.io/docs

Just noticing that some items return no results when searching in docs.
In particular: if, else, show.one-time

Is it possible the search engine has stopwords turned on (meaning common-words like if/else won’t be indexed), and is tokenizing on all punctuation (so show.one-time is indexed as two or three words rather than a phrase)?

Also some inconsistent results. Search for textcontent doesn’t include http://aurelia.io/docs/binding/basics#introduction despite the term appearing in both code snippets and content.

3 Likes

I’ve noticed the same. For example, searching for fromView yields no results even though it’s part of the ValueConverters documentation.

I dug a bit though the aurelia projects and the aurelia.io source. The site seems to be generated by the site-generator. It contains the <search-panel> which uses the SearchEngine that loads an index from the server.

The search index is also generated by the site-generator. I had a look at the current index and you can clearly see that the index is wrong (compared to the text seen in the screenshot above):


It contains the phase before the formatted words twice, but does not contain the formatted words themselves.

It seems like the site processors throw up whenever they hit a formatted word. I haven’t yet looked at the processors’ source.

@EisenbergEffect, are you aware of this? (site-generator does not accept issues, so I posted it here.)

@EisenbergEffect, where can I find a current au-site.json? The one in the readme of site-generator is outdated (as one would expect). I want to get the site-generator up and running, test and fix the search issue and submit a pull request.

The bad search results make it much harder to learn and understand Aurelia. It’s a great framework but the community is tiny and this is definitely a stumbling block for new people. (I started experimenting with Aurelia less than two weeks ago and the docs almost put me off…)

1 Like

Found the problem and fixed it. Pull request is on the way. Now it just needs to be merged and then the site needs to be rebuilt.

Regarding au-site.json: I used a minimal copy to test the generator, but it would be great if the full site source was on GitHub to allow to …

  1. … run a local copy of the site / doc (especially while the search on the official one is broken)
  2. … encourage contributions & fixes

@rluba Thanks for digging in and helping out here! I’ve merged your PR to fix the search index creation and will push an update to the site this evening. I’ve also opened up the issues on the site-generator repo so that we can track further problems. Finally, I’ll be updating the sample config in the readme file in just a few minutes.

@EisenbergEffect Thanks for merging it.

Instead of updating the sample config (which quickly will be outdated again), could you open up a repo with the real scaffolding for the site? There’s more to it than just the au-site.json, eg., it references a logo that must be present, etc.

I’ll consider it but I’ll need to review the contents of that repo thoroughly first. Might take a bit of time for me to get around to it.

2 Likes