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
466cbd6f
Commit
466cbd6f
authored
Apr 09, 2013
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Shorter method name
parent
c8b9eca0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
trans/models/unit.py
trans/models/unit.py
+4
-4
No files found.
trans/models/unit.py
View file @
466cbd6f
...
...
@@ -282,15 +282,15 @@ class UnitManager(models.Manager):
query
|=
Q
(
context__icontains
=
search_query
)
return
self
.
filter
(
query
)
else
:
return
self
.
fulltext
_search
(
return
self
.
fulltext
(
search_query
,
search_source
,
search_context
,
search_target
)
def
fulltext
_search
(
self
,
query
,
source
=
True
,
context
=
True
,
translation
=
True
,
checksums
=
False
):
def
fulltext
(
self
,
query
,
source
=
True
,
context
=
True
,
translation
=
True
,
checksums
=
False
):
'''
Performs full text search on defined set of fields.
...
...
@@ -365,7 +365,7 @@ class UnitManager(models.Manager):
and
cnt
>
0
and
len
(
terms
)
-
cnt
<
4
):
for
search
in
itertools
.
combinations
(
terms
,
cnt
):
results
=
self
.
fulltext
_search
(
results
=
self
.
fulltext
(
' '
.
join
(
search
),
True
,
False
,
...
...
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