Commit Graph

20 Commits (87f673336fcfd27ce417d95a6099d5110998a05b)

Author SHA1 Message Date
Adam Tauber 52e615dede [enh] py3 compatibility 7 years ago
David A Roberts 1d30141c20 [enh] show spelling corrections 8 years ago
Alexandre Flament 3a8ab5880a [mod] result_container.extend sets result['engine'] = engine_name for each result 8 years ago
Adam Tauber 971ed0abd1 [enh] add quick answer functionality with an example answerer 8 years ago
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)
8 years ago
David A Roberts 413e143707 [fix] don't merge results with distinct fragments 8 years ago
marc ad58b14be7 [fix] merge infoboxes based on weight
also minor changes in attributes and images from wikidata
8 years ago
marc c2e4014287 [fix] urls merge in infobox (#593)
TODO:
    merge attributes
8 years ago
Adam Tauber aa09f963eb Merge pull request #621 from stepshal/anomalous-backslash-in-string
Fix anomalous backslash in string
8 years ago
Adam Tauber 21c5fb1c45 [fix] pep8 8 years ago
Adam Tauber 485da54961 [mod][fix] use the average of results number ++ do not display smaller result number than the actual result count - closes #600 8 years ago
stepshal b3ab221b98 Fix anomalous backslash in string 8 years ago
stepshal cd9b494cb5 Fix quantity of blank lines after code object. 8 years ago
Adam Tauber 2f7752b410 [enh] display number of results 8 years ago
a01200356 8d335dbdae [enh] wikipedia infobox
creates simple multilingual infobox using wikipedia's api
8 years ago
Adam Tauber 5cbe4c5332 [fix] try to decode url - closes #527 8 years ago
Luc Didry fea2c5a713 Fix results with no scheme
Related to #428, which was fixed in e3df22b but broken in a refactoring
(b6c3cb0)
8 years ago
Adam Tauber a59d171385 [fix] answer result type 9 years ago
Adam Tauber 66a70c6ae4 [fix] typo 9 years ago
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
9 years ago