Ceasar/Encyclopedia

Add document retrieval functionality to searchbar

Closed this issue · 3 comments

There are at least two reasons to implement document retrieval:

  1. When a search fails, the response is an unhelpful 404. It would be more useful to the user to perform a document retrieval query, since presumably the user will not be too far off and could likely just click the right result.
  2. Sometimes the user forgets where he stored a page describing a topic, perhaps because he combined stub articles together without adding anchors.

This would also eliminate the need to use the index (with its aliases) in the autocomplete results.

I've rewritten the search logic. With a few slight modifications, it should be possible to do this quickly (and also use the results to generate typeahead suggestions).

Fixed here: 84f3a69

Appears like this: