summaryrefslogtreecommitdiff
path: root/searx/search.py
AgeCommit message (Collapse)Author
2016-12-16Merge branch 'master' into languagesmarc
2016-12-15[fix] engine setting if no categories specifiedAdam Tauber
2016-12-13[fix] broken language selectormarc
2016-12-10[fix] remove unused variableAdam Tauber
2016-12-10[enh] handle engine response crashesAdam Tauber
2016-12-09Merge branch 'master' into searchpy2Alexandre Flament
2016-11-19[enh] add quick answer functionality with an example answererAdam Tauber
2016-11-06Merge branch 'master' into searchpy2Alexandre Flament
2016-11-06[fix] suspend end time checkAdam Tauber
2016-11-05Simplify search.py, basically updated PR #518Alexandre Flament
The timeouts in settings.yml is about the total time (not only the HTTP request but also the prepare the request and parsing the response) It was more or less the case before since the threaded_requests function ignores the thread after the timeout even the HTTP request is ended. New / changed stats : * page_load_time : record the HTTP request time * page_load_count: the number of HTTP request * engine_time : the execution total time of an engine * engine_time_count : the number of "engine_time" measure The avg response times in the preferences are the engine response time (engine_load_time / engine_load_count) To sum up : * Search.search() filters the engines that can't process the request * Search.search() call search_multiple_requests function * search_multiple_requests creates one thread per engine, each thread runs the search_one_request function * search_one_request calls the request function, make the HTTP request, calls the response function, extends the result_container * search_multiple_requests waits for the the thread to finish (or timeout)
2016-11-02[mod] replace references request.request_data (GET or POST parameters) by ↵Alexandre Flament
request.form (based on merge of POST and GET parameters)
2016-11-02Change plugin API :dalf
- pre_search(request, search) - post_search(request, search) - on_result(request, search, result) with - request is the Flask request - search a searx.Search instance - result a searx result as usual
2016-11-02Clean up the architecturedalf
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-09-06[fix] thread safe threaded_requests() functionAdam Tauber
2016-07-31[fix] collect garbage after searches to reduce memory footprintAdam Tauber
2016-07-25advanced-search: panel is visible when checked beforeNoemi Vanyi
2016-07-25add time range search with yahooNoemi Vanyi
2016-04-09more follow ups in new preferencesNoemi Vanyi
2016-04-09rename blocked engines to diabled enginesNoemi Vanyi
2016-04-09new preferences handlingNoemi Vanyi
Preferences class was introduced in order to handle user preferences. Right now it parses cookies and the form in preferences. Also it can retrieve settings based on the name of the setting. ATTENTION Please note that engine preferences are handled differently from now on. So it introduces incompatible changes. Every user who has saved preferences should reset and save his/her settings again. This change was needed, because everytime a default disabled engine was added saved user preferences would broke. Now engine setting tracking is fixed.
2016-02-20[enh] suspend engines after errorAdam Tauber
The duration is based on the number of continuous errors, but maximized in one minute
2015-12-01Merge pull request #438 from Cqoicebordel/error_page_formatAdam Tauber
Don't throw away the request if pageno is wrong
2015-10-03[enh][mod] result handling refactorAdam Tauber
Several changes has been made: - Parallel result merge - Scoring algorithm slightly changed (see result_score()) - Proper Thread locking on global data manipulation
2015-09-18Don't throw away the request if pageno is wrongCqoicebordel
Fix #424 but maybe only partially
2015-09-11[fix] add missing scheme to duplicated results too ++ revert gigablasts handlingAdam Tauber
2015-09-01[fix] display categories of the selected enginesAdam Tauber
2015-09-01[fix] engine selection from urlAdam Tauber
2015-08-25[fix] check empty engine language attribute - fixes subtitleseekerAdam Tauber
2015-08-24[fix] rewrite scheme to http if there is no one, FIX #390Thomas Pointhuber
2015-08-02[fix] type errorAdam Tauber
2015-08-02[enh] default settings option to safe_search - #396Adam Tauber
2015-06-03New feature : language per search engine !Cqoicebordel
2015-05-19[mod] allow whitespaces in category/engine listAdam Tauber
2015-05-12[enh] cleaner category/engine selection from GET/POST param - closes #289Adam Tauber
2015-03-08[mod] search return valueAdam Tauber
2015-02-13[enh] log redirectsAdam Tauber
2015-02-13[fix] close #197 for all enginesdalf
2015-02-08[enh] add safesearch functionalityThomas Pointhuber
2 = strict 1 = moderate 0 = none
2015-02-03[enh] category specific engine deactivation - closes #205Adam Tauber
2015-01-31[enh] default disabled engines - closes #109Adam Tauber
2015-01-21[enh] use one single http connection pool : improve response time. close #100dalf
2015-01-15[enh] add nojs support into oscar-templateThomas Pointhuber
2015-01-12Merge pull request #166 from Cqoicebordel/non-exclusif-bangAdam Tauber
Add non exclusif bang
2015-01-09[enh] engine exception tracebackAdam Tauber
2015-01-09[enh] using the loggerAdam Tauber
2015-01-03Add non exclusif bangCqoicebordel
Allow to perform a search while adding an engine (or a category) without adding it "officially" to the request. '?' is used to add an engine without modifying anything else to the request. For example, you can perform a search in the 'general' category, and if you add '?tw' the result from Twitter will be added to the originals results.
2014-12-29Flake8 and Twitter correctionsCqoicebordel
Lots of Flake8 corrections Maybe we should change the rule to allow lines of 120 chars. It seems more usable. Big twitter correction : now it outputs the words in right order...
2014-12-19[mod] better search request exception handlingAdam Tauber
2014-12-19[fix] handle empty search requestsAdam Tauber
2014-12-19[mod] display timeoutted engine nameAdam Tauber