Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
3a3ddf5f
Commit
3a3ddf5f
authored
Mar 13, 2012
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Optionally use fulltext search"
This reverts commit
0a25081c
.
parent
10feec83
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
33 deletions
+0
-33
docs/admin.rst
docs/admin.rst
+0
-18
docs/config.rst
docs/config.rst
+0
-5
settings.py
settings.py
+0
-3
trans/views.py
trans/views.py
+0
-7
No files found.
docs/admin.rst
View file @
3a3ddf5f
...
...
@@ -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
docs/config.rst
View file @
3a3ddf5f
...
...
@@ -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/
settings.py
View file @
3a3ddf5f
...
...
@@ -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
trans/views.py
View file @
3a3ddf5f
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment