Ceasar / Encyclopedia

Tool for keeping a hypermedia encyclopedia
MIT License
55 stars 7 forks source link

Add document retrieval functionality to searchbar #27

Closed Ceasar closed 10 years ago

Ceasar commented 10 years ago

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.

Ceasar commented 10 years ago

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).

Ceasar commented 10 years ago

This may be helpful. https://pythonhosted.org/Whoosh/indexing.html#incremental-indexing

Ceasar commented 10 years ago

Fixed here: https://github.com/Ceasar/Encyclopedia/commit/84f3a69ee43b5e9f0a2508deaf1f302e27ec348b

Appears like this: