diff options
Diffstat (limited to 'extra/elasticsearch/elastic_queries.txt')
-rw-r--r-- | extra/elasticsearch/elastic_queries.txt | 224 |
1 files changed, 224 insertions, 0 deletions
diff --git a/extra/elasticsearch/elastic_queries.txt b/extra/elasticsearch/elastic_queries.txt new file mode 100644 index 00000000..91bff199 --- /dev/null +++ b/extra/elasticsearch/elastic_queries.txt @@ -0,0 +1,224 @@ + +GET /fatcat_release/_search?request_cache=true +{ + "size": 0, + "aggs": { + "popular_journals": { + "terms": { + "field": "container_issnl" + } + } + } +} + +GET /fatcat_release/_count +{ + "query": { + "term": {"container_issnl": "1932-6203"} + } +} + +"quick counts" +
GET /fatcat_container/_count + +GET /fatcat_release/_count + +GET /fatcat_release/_count +{ + "query": { + "terms": { + "release_type": ["article-journal", "chapter", "paper-conference", "thesis"] + } + } +} + +"in-scope works on web (fulltext)": +GET /fatcat_release/_count +{ + "query": { + "bool": { + "filter": [ + { + "terms": { + "release_type": [ + "article-journal", + "chapter", + "paper-conference", + "thesis" + ] + } + }, + { + "term": { + "in_web": "true" + } + } + ] + } + } +} + +"in-scope OA" +GET /fatcat_release/_count +{ + "query": { + "bool": { + "filter": [ + { + "terms": { + "release_type": [ + "article-journal", + "chapter", + "paper-conference", + "thesis" + ] + } + }, + { + "term": { + "is_oa": "true" + } + } + ] + } + } +} + +"not in KBART, in web" +GET /fatcat_release/_count +{ + "query": { + "bool": { + "filter": [ + { + "terms": { + "release_type": [ + "article-journal", + "chapter", + "paper-conference", + "thesis" + ] + } + }, + { + "term": { + "in_kbart": "false" + } + }, + { + "term": { + "in_web": "true" + } + } + ] + } + } +} + +GET /fatcat_release/_search?request_cache=true +{ + "size": 0, + "aggs": { + "release_ref_count": { + "sum": { + "field": "ref_count" + } + } + } +} + +##### + +GET /fatcat_release/_search?request_cache=true +{ + "size": 0, + "aggs": { + "release_ref_count": { + "sum": { + "field": "ref_count" + } + } + } +} + +GET /fatcat_release/_search?request_cache=true +{ + "size": 0, + "query": { + "terms": { + "release_type": [ + "article-journal", + "chapter", + "paper-conference", + "thesis" + ] + } + }, + "aggs": { + "paper_like": { + "filters": { + "filters": { + "in_web": { + "term": { + "in_web": "true" + } + }, + "is_oa": { + "term": { + "is_oa": "true" + } + }, + "in_kbart": { + "term": { + "in_kbart": "true" + } + }, + "in_web_not_kbart": { + "bool": { + "filter": [ + { + "term": { + "in_web": "true" + } + }, + { + "term": { + "in_kbart": "false" + } + } + ] + } + } + } + } + } + } +} + + +################# +"search inside a container": + +GET /fatcat_release/_search?request_cache=true +{ + "query": { + "bool": { + "must": { + "query_string": { + "query": "blood", + "default_operator": "AND", + "analyze_wildcard": "true", + "lenient": "true", + "fields": ["title^5", "contrib_names^2"] + } + }, + "filter": { + "term": { + "container_issnl": "1932-6203" + } + } + } + } +} + + |