Punkweb / PunkwebBB

Django application that provides a simple and modern forum board for your Django Website
https://punkweb.net/board/
BSD 3-Clause "New" or "Revised" License
10 stars 3 forks source link

Thread searching #2

Open shakedown-street opened 4 months ago

shakedown-street commented 4 months ago

Add ability to search threads by keyword

shakedown-street commented 3 months ago

After thinking about this for a little bit, the best I can really do at the moment is check if the thread title or content icontain's any word of the search query. Without locking users of the package into postgres or requiring them to configure django-haystack on the project level, this is probably the best I'll be able to achieve for a first version.

However in the future it would be nice to detect if the project is using postgres, and use the postgres specific search methods if they are, and fall back to the above method if not.

https://docs.djangoproject.com/en/5.0/ref/contrib/postgres/search/