Commit 3a3ddf5f authored by Michal Čihař's avatar Michal Čihař

Revert "Optionally use fulltext search"

This reverts commit 0a25081c.
parent 10feec83
......@@ -108,21 +108,3 @@ group and create additional groups with finer privileges (eg. `Translators`
group, which will be allowed to save translations and manage suggestions) and
add selected users to this group. You can do all this from Django admin
interface.
.. _fulltext:
Fulltext search
---------------
Weblate can optionally utilize fulltext index cabability in MySQL to search
for translations. You need first to manually add fulltext indices:
.. code-block:: sql
CREATE FULLTEXT INDEX `ftx_source` ON `trans_unit` (`source`);
CREATE FULLTEXT INDEX `ftx_target` ON `trans_unit` (`target`);
CREATE FULLTEXT INDEX `ftx_context` ON `trans_unit` (`context`);
Now you can enable using them by changing :envvar:`USE_FULLTEXT`.
.. seealso:: https://docs.djangoproject.com/en/1.3/ref/models/querysets/#search
......@@ -30,10 +30,5 @@ All settings are stored in :file:`settings.py` (as usual for Django).
Site title to be used in website and emails as well.
.. envvar:: USE_FULLTEXT
Enable fulltext search using MySQL.
.. seealso:: :ref:`fulltext`
.. seealso:: https://docs.djangoproject.com/en/1.3/ref/settings/
......@@ -248,6 +248,3 @@ EMAIL_SUBJECT_PREFIX = '[%s] ' % SITE_TITLE
# Enable remote hooks
ENABLE_HOOKS = False
# Use fulltext search, requires MySQL and additional setup
USE_FULLTEXT = False
......@@ -308,13 +308,6 @@ def translate(request, project, subproject, lang):
query |= Q(target = search_query)
if search_context:
query |= Q(context = search_query)
elif settings.USE_FULLTEXT:
if search_source:
query |= Q(source__search = search_query)
if search_target:
query |= Q(target__search = search_query)
if search_context:
query |= Q(context__search = search_query)
else:
if search_source:
query |= Q(source__icontains = search_query)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment