1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-16 17:40:11 +01:00
Commit Graph

30 Commits

Author SHA1 Message Date
Dalf
85b3723345 [mod] speed optimization
compile XPath only once
avoid redundant call to urlparse
get_locale(webapp.py): avoid useless call to request.accept_languages.best_match
2019-11-15 09:33:15 +01:00
Noémi Ványi
a6f20caf32 add initial support for offline engines && command engine 2019-10-16 15:52:48 +02:00
Dalf
70a01e5f02 [fix] don't merge image results if the img_src is different 2019-07-27 08:52:30 +02:00
Alexandre Flament
554a21e1d0
[enh] Add Server-Timing header (#1637)
Server Timing specification: https://www.w3.org/TR/server-timing/

In the browser Dev Tools, focus on the main request, there are the responses per engine in the Timing tab.
2019-07-17 10:38:45 +02:00
Adam Tauber
a065fcdcc9 [fix] skip non-string result url/title/content 2017-12-01 20:54:12 +01:00
Noémi Ványi
59c02e8e5f results: make engines of results set
Previously, if a same result was returned from the
same engine, the name of the engine would be added
more than once. To eliminate engine name duplication
engine list was changed to set.
2017-11-03 19:52:47 +01:00
marc
5f36e85b37 ensure all parameters are merged in results 2017-07-26 15:49:16 +02:00
Noémi Ványi
2242000bd4 change unresponsive_engines to a set to eliminate duplication of errors 2017-07-20 13:30:56 +02:00
Noémi Ványi
243d3e4298 show engine errors in infobox && add new error alert 2017-07-12 16:29:11 +02:00
Alexandre Flament
7ebe3a6f41 [mod] add category to each results, and change group criterias (template and existing image) 2017-05-22 22:20:35 +02:00
Adam Tauber
52e615dede [enh] py3 compatibility 2017-05-15 12:02:30 +02:00
David A Roberts
1d30141c20 [enh] show spelling corrections 2017-01-16 13:31:16 +10:00
Alexandre Flament
3a8ab5880a [mod] result_container.extend sets result['engine'] = engine_name for each result 2016-12-30 17:18:02 +01:00
Adam Tauber
971ed0abd1 [enh] add quick answer functionality with an example answerer 2016-11-19 20:53:51 +01:00
dalf
67e11c42b9 Clean up the architecture
Purposes :
- isolate the plugins calls
- distinction between parsing the web request and running the search (Search class). To be able to test code easily, to run searx code outside a web server, to filter the search query parameters with plugins more easily, etc...

Details :
- request.request_data contains request.form or request.args (initialize inside pre_request() function)
- Query class is renamed RawTextQuery
- SearchQuery class defines all search parameters
- get_search_query_from_webapp create a SearchQuery instance (basically the previous Search.__init__ code)
- Search class and SearchWithPlugins class takes a SearchQuery instance as class constructor parameter
- SearchWithPlugins class inherites from Search class, and run plugins
- A dedicated function search_with_plugins executes plugins to have a well define locals() (which is used by the plugins code).
- All plugins code is executed inside the try...except block (webapp.py, index function)
- advanced_search HTTP parameter value stays in webapp.py (it is only part of UI)
- multiple calls to result_container.get_ordered_results() doesn't compute the order multiple time (note : this method was call only once before)
- paging value is stored in the result_container class (compute in the extend method)
- test about engine.suspend_end_time is done during search method call (instead of __init__)
- check that the format parameter value is one of these : html, rss, json, rss (before the html value was assumed but some text formatting wasn't not done)
2016-11-02 14:22:16 +01:00
David A Roberts
413e143707 [fix] don't merge results with distinct fragments 2016-08-14 22:09:29 +10:00
marc
ad58b14be7 [fix] merge infoboxes based on weight
also minor changes in attributes and images from wikidata
2016-08-05 23:51:04 -05:00
marc
c2e4014287 [fix] urls merge in infobox (#593)
TODO:
    merge attributes
2016-08-05 23:51:04 -05:00
Adam Tauber
aa09f963eb Merge pull request #621 from stepshal/anomalous-backslash-in-string
Fix anomalous backslash in string
2016-07-18 22:27:17 +02:00
Adam Tauber
21c5fb1c45 [fix] pep8 2016-07-17 00:03:22 +02:00
Adam Tauber
485da54961 [mod][fix] use the average of results number ++ do not display smaller result number than the actual result count - closes #600 2016-07-16 21:44:17 +02:00
stepshal
b3ab221b98 Fix anomalous backslash in string 2016-07-11 23:53:13 +07:00
stepshal
cd9b494cb5 Fix quantity of blank lines after code object. 2016-07-10 21:44:27 +07:00
Adam Tauber
2f7752b410 [enh] display number of results 2016-06-28 00:06:50 +02:00
a01200356
8d335dbdae [enh] wikipedia infobox
creates simple multilingual infobox using wikipedia's api
2016-04-17 16:22:19 -05:00
Adam Tauber
5cbe4c5332 [fix] try to decode url - closes #527 2016-03-30 15:47:49 +02:00
Luc Didry
fea2c5a713 Fix results with no scheme
Related to #428, which was fixed in e3df22b but broken in a refactoring
(b6c3cb0)
2016-02-26 12:05:11 +01:00
Adam Tauber
a59d171385 [fix] answer result type 2015-10-26 14:22:59 +01:00
Adam Tauber
66a70c6ae4 [fix] typo 2015-10-03 19:16:26 +02:00
Adam Tauber
b6c3cb0bdd [enh][mod] result handling refactor
Several changes has been made:
 - Parallel result merge
 - Scoring algorithm slightly changed (see result_score())
 - Proper Thread locking on global data manipulation
2015-10-03 17:26:07 +02:00