Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
searx-engine
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
searx-engine
Commits
b47b8cc2
Commit
b47b8cc2
authored
Jan 12, 2015
by
Adam Tauber
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #166 from Cqoicebordel/non-exclusif-bang
Add non exclusif bang
parents
d7ea44ab
96c4d52e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
query.py
searx/query.py
+5
-1
search.py
searx/search.py
+1
-1
No files found.
searx/query.py
View file @
b47b8cc2
...
...
@@ -38,6 +38,7 @@ class Query(object):
self
.
query_parts
=
[]
self
.
engines
=
[]
self
.
languages
=
[]
self
.
specific
=
False
# parse query, if tags are set, which
# change the serch engine or search-language
...
...
@@ -83,7 +84,7 @@ class Query(object):
break
# this force a engine or category
if
query_part
[
0
]
==
'!'
:
if
query_part
[
0
]
==
'!'
or
query_part
[
0
]
==
'?'
:
prefix
=
query_part
[
1
:]
.
replace
(
'_'
,
' '
)
# check if prefix is equal with engine shortcut
...
...
@@ -110,6 +111,9 @@ class Query(object):
for
engine
in
categories
[
prefix
]
if
engine
not
in
self
.
blocked_engines
)
if
query_part
[
0
]
==
'!'
:
self
.
specific
=
True
# append query part to query_part list
self
.
query_parts
.
append
(
query_part
)
...
...
searx/search.py
View file @
b47b8cc2
...
...
@@ -373,7 +373,7 @@ class Search(object):
# if engines are calculated from query,
# set categories by using that informations
if
self
.
engines
:
if
self
.
engines
and
query_obj
.
specific
:
self
.
categories
=
list
(
set
(
engine
[
'category'
]
for
engine
in
self
.
engines
))
...
...
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