2
2
3
3
import logging
4
4
import time
5
- from typing import Annotated , Any , Dict
5
+ from typing import Annotated , Any
6
6
7
7
from fastapi import APIRouter , Depends , HTTPException , Query
8
8
from fastapi_pagination import Page , paginate
@@ -206,6 +206,10 @@ async def article_count(
206
206
Filtering query for paragraph retrieval.
207
207
settings
208
208
Global settings of the application
209
+ topics
210
+ Keyword to be matched in text.
211
+ regions
212
+ Keyword to be matched in text.
209
213
210
214
Returns
211
215
-------
@@ -220,7 +224,7 @@ async def article_count(
220
224
)
221
225
else :
222
226
# Match the keywords on abstract + title.
223
- query : Dict [str , Any ] = {
227
+ query : dict [str , Any ] = {
224
228
"query" : {
225
229
"bool" : {
226
230
"must" : [
@@ -343,6 +347,10 @@ async def article_listing(
343
347
Filtering query for paragraph retrieval.
344
348
settings
345
349
Global settings of the application
350
+ topics
351
+ Keyword to be matched in text. OR matching.
352
+ regions
353
+ Keyword to be matched in text. OR matching.
346
354
number_results
347
355
Number of results to return. Max 10 000.
348
356
sort_by_date
@@ -360,7 +368,7 @@ async def article_listing(
360
368
status_code = 422 , detail = "Please provide at least one region or topic."
361
369
)
362
370
else :
363
- query : Dict [str , Any ] = {
371
+ query : dict [str , Any ] = {
364
372
"query" : {
365
373
"bool" : {
366
374
"must" : [
0 commit comments