Skip to content

Commit

Permalink
Feature/pdct 1514 replace passed/approved from backend (#406)
Browse files Browse the repository at this point in the history
* BUmp to 1.19.8

* Bump db client to 3.8.24

* Remove reliance on Passed/Approved

* Bump db client to 3.8.25

* Update poetry.lock

* Fix query
  • Loading branch information
katybaulch authored Oct 31, 2024
1 parent 97492a0 commit 0fd2da9
Show file tree
Hide file tree
Showing 8 changed files with 333 additions and 310 deletions.
17 changes: 9 additions & 8 deletions app/models/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class SearchRequestBody(CprSdkSearchParameters):
keyword_filters: BackendKeywordFilter = None
"""
This is an object containing a map of fields and their values "
to filter on. The allowed fields for the keys are:
to filter on. The allowed fields for the keys are:
"sources", "countries", "regions", "categories", "languages"
"""

Expand All @@ -81,7 +81,7 @@ class SearchRequestBody(CprSdkSearchParameters):
le=500,
)
"""
Where to start from in the number of query result that was
Where to start from in the number of query result that was
retrieved from the search database.
"""

Expand Down Expand Up @@ -189,7 +189,7 @@ class SearchResponseFamilyDocument(BaseModel):
document_passage_matches: list[SearchResponseDocumentPassage]
"""
This is a list of passages that match the search criteria within this document.
The length of which is affected by max_passages_per_doc in the request.
"""

Expand All @@ -210,7 +210,7 @@ class SearchResponseFamily(BaseModel):
family_slug: str
"""
The slug that forms part of the URL to navigate to the family.
Example, with a slug of climate-change-adaptation-strategy_1882, a URL can be
created to this family of documents as: https://app.climatepolicyradar.org/document/climate-change-adaptation-strategy_1882
"""
Expand All @@ -232,8 +232,9 @@ class SearchResponseFamily(BaseModel):

family_date: str
"""
The date the family of documents was published, this is from the corresponding
Passed/Approved event for this family.
The date the family of documents was published, this date is found by looking for
the date associated with the datetime_event_name value from the event taxonomy for
this family (e.g., Passed/Approved, Project Approved or Concept Approved).
"""

family_last_updated_date: str
Expand Down Expand Up @@ -286,13 +287,13 @@ class SearchResponseFamily(BaseModel):

continuation_token: Optional[str] = None
"""
Passage level continuation token. Can be used in conjunction with the family level
Passage level continuation token. Can be used in conjunction with the family level
`this continuation_token` to get the next page of passages for this specific family
"""

prev_continuation_token: Optional[str] = None
"""
Passage level continuation token. Can be used in conjunction with the family level
Passage level continuation token. Can be used in conjunction with the family level
`this continuation_token` to get the previous page of passages for this specific
family
"""
Expand Down
Loading

0 comments on commit 0fd2da9

Please sign in to comment.