amilner42 / code-tidbit

Share Programming Knowledge Better
GNU General Public License v3.0
9 stars 1 forks source link

124 language #141

Closed amilner42 closed 7 years ago

amilner42 commented 7 years ago

Closes

Closes #124

Description

To do language searching on bigbits/stories had to denormalize data and have languages kept at top level as well as in file-structure/nested-tidbits. Indexed on this field as well.

Added single/multi-language search-support, can filter by one language on the frontend through a select or you can filter by multiple languages by just using the language name in your search.

Additionally, I strip the languages themselves from the search so that they do no effect the search results (other than restricting the languages). Languages should be thought of as "special" keys search-wise, they allow restrictions, but they don't give you points for matching text.

Additionally

Languages are no longer a collection in the database, this was just making code more complex for no benefit. Languages are now a model on the backend, simply represented with JSON. This allowed to remove a bunch of code, and made future code simpler (async -> sync).