aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_web/search.py
Commit message (Collapse)AuthorAgeFilesLines
* search: fix 'max() arg is an empty sequence'Bryan Newbold2022-02-041-2/+2
|
* search: add a circuit break on very large volume rangesBryan Newbold2022-02-041-0/+2
|
* small changes to preservation coverage search queriesBryan Newbold2022-02-031-6/+42
| | | | | | | - allow fetching of by-release-type preservation histograms as JSON - query flag to exclude 'stub' entity types - don't include 'stub' entities in container-by-year or container-by-volume charts (and JSON)
* codespell fixes in python code (comments)Bryan Newbold2021-11-241-2/+2
|
* web: handle ES non-int error codes betterBryan Newbold2021-11-121-9/+12
|
* web: add type annotationsBryan Newbold2021-11-031-12/+16
| | | | | This commit does not include type fixes, only annotations. A small number of tuples were also converted to lists.
* lint: resolve existing mypy type errorsBryan Newbold2021-11-021-6/+10
| | | | | | | | | Adds annotations and re-workes dataflow to satisfy existing mypy issues, without adding any additional type annotations to, eg, function signatures. There will probably be many more type errors when annotations are all added.
* fmt (black): fatcat_web/Bryan Newbold2021-11-021-226/+292
|
* python: isort everythingBryan Newbold2021-11-021-3/+4
|
* lint: simple, safe inline lint fixesBryan Newbold2021-11-021-2/+2
| | | | '==' vs 'is'; 'not a in b' vs 'a not in b'; etc
* search: more ES 7.x changes (track total counts)Bryan Newbold2021-04-091-0/+11
|
* search container stats: changes to be called from index code pathBryan Newbold2021-04-061-3/+10
| | | | Eg, allowing injection of more config values
* web search: ES 6+7 compatibliityBryan Newbold2021-04-061-9/+21
| | | | Based on the similar changes made in fatcat-scholar
* search: exception info is optionalMartin Czygan2021-03-161-1/+1
| | | | | | | | | docs ("where available") and example: * https://elasticsearch-py.readthedocs.io/en/v7.11.0/exceptions.html#elasticsearch.TransportError * https://github.com/elastic/elasticsearch-py/blob/4441da0cbc4ecd02c81b93830b1318647b4018f9/elasticsearch/exceptions.py#L85 sentry-id: 79943
* handle no-volumes coverageBryan Newbold2021-02-241-5/+6
| | | | Instead of an error (iframe-like), shows a blank "no data" chart.
* coverage: handle the case of hits, but none with yearsBryan Newbold2020-09-171-4/+5
|
* control shadow preservation display with a flagBryan Newbold2020-07-301-0/+22
|
* search: 'recent' mode for coverage searchBryan Newbold2020-07-301-1/+85
|
* first iteration of flexible search coverageBryan Newbold2020-07-301-0/+36
|
* make some ES agg methods work on general queriesBryan Newbold2020-07-301-29/+51
| | | | | | | Eg, instead of container-specific year histogram, have the histogram fetch function take a ReleaseQuery. This is in preparation for more generic coverage visualization pages.
* lint coverage changes (so far)Bryan Newbold2020-07-301-1/+1
|
* update container view statsBryan Newbold2020-07-301-5/+5
| | | | | | - show release type counts - new-style preservation status (single bar) - show release_type preservation break down on coverage page
* preservation coverage updates (first round)Bryan Newbold2020-07-301-5/+177
| | | | | | | | | | - new by-year chart with stacked histograms of all 4 preservation statuses - new-style single progress bar showing overall preservation status - new by-volume query and chart Old endpoints are left as-is, with the intention of having them "deprecated" for some time span until entirely removing them.
* include new-style preservation+release_type aggs in container statsBryan Newbold2020-07-301-4/+35
|
* search: catch ES errors and display betterBryan Newbold2020-07-281-4/+18
|
* include container_id as a query boost termBryan Newbold2020-07-281-0/+1
|
* re-order search params to satisfy pylintBryan Newbold2020-07-241-6/+6
| | | | | | Moved all the request_cache=True param calls to just before ES request exectuation. The former ordering "just worked", but pylint didn't like it, and I suspose it was not as idiomatic as it should have been.
* small lint fixesBryan Newbold2020-07-241-2/+1
|
* finish backend refactoring of search codeBryan Newbold2020-07-241-133/+108
|
* refactor release and container searchBryan Newbold2020-07-241-75/+199
| | | | | | | | | | Based on fatcat-scholar refactoring. This doesn't include refactoring of stats, aggregates, or histograms yet, just the direct queries. Don't have any test coverage yet; intend to try elasticmock or figuring out how to ingest mock JSON results directly.
* web search: fix pylint errorBryan Newbold2020-07-241-2/+2
|
* WIP: refactoring search to use elasticsearch-dslBryan Newbold2020-07-241-152/+133
|
* lint (flake8) web interface python filesBryan Newbold2020-07-011-2/+1
|
* Correct spelling mistakesEdward Betts2020-03-271-1/+1
|
* new biblio-only general searchBryan Newbold2020-01-291-2/+2
| | | | The other fields are now "copy_to" the merged biblio field.
* Add basic pagination to search resultsMartin Czygan2019-11-081-9/+18
| | | | | | | | | | | | The "deep paging problem" imposes some limit, which currently is a hardcoded default value, `deep_page_limit=2000` in `do_search`. Elasticsearch can be configured, too: > Note that from + size can not be more than the index.max_result_window index setting, which defaults to 10,000. -- https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-body.html#request-body-search-from-size
* remove coverage debug statementsBryan Newbold2019-09-041-10/+0
|
* finish container coverage pageBryan Newbold2019-09-041-1/+11
| | | | Also re-worked container view sidebar a bit more.
* start container coverage pageBryan Newbold2019-09-041-1/+67
|
* include example releases on container landing pageBryan Newbold2019-09-031-0/+43
| | | | | Included making release search results an entity macro (in webface templates).
* web search: container_id, not _identBryan Newbold2019-08-221-1/+1
|
* include in_kbart container countBryan Newbold2019-08-121-0/+2
|
* default container stats by ident, not issnlBryan Newbold2019-08-121-4/+5
|
* add kbart counts to container statsBryan Newbold2019-07-311-0/+1
|
* remove leftover debug print statementBryan Newbold2019-03-111-1/+1
|
* bunch of lint/whitespace cleanupsBryan Newbold2019-02-221-12/+12
|
* add general and container-specific statsBryan Newbold2019-02-221-1/+133
|
* refactor entity searchesBryan Newbold2019-02-201-64/+52
|
* add container searchBryan Newbold2019-02-201-1/+54
| | | | | | | And tweak release search a bit: DOIs aren't auto-replaced unless they are the only word/query This query code is very duplicative and should be refactored
* add flash to 400 error pagesBryan Newbold2019-02-051-2/+6
|