Skip to content

Commit

Permalink
doc: enhance search endpoint documentation (#454)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgamez authored Jun 5, 2024
1 parent b0530e0 commit 7825d05
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions docs/DatabaseCatalogAPI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,26 @@ paths:

/v1/search:
get:
description: Search feeds using full-text search on feed name, location and provider's information.
description: |
Search feeds on feed name, location and provider's information.
<br>
The current implemation leverage the text search functionalities from [PostgreSQL](https://www.postgresql.org/docs/current/textsearch-controls.html), in particulary `plainto_tsquery`.
<br><br>
Points to consider while using search endpoint:
<br>
- Operators are not currently supported. Operators are ignored as stop-words.
- Search is based on lexemes(English) and case insensitive. The search_text_query_param is parsed and normalized much as for to_tsvector, then the & (AND) tsquery operator is inserted between surviving words.
- The search will match all the lexemes with an AND operator. So, all lexemes must be present in the document.
- Our current implementation only creates English lexemes. We are currently considering adding support to more languages.
- The order of the words is not relevant for matching. The query __New York__ should give you the same results as __York New__.
<br><br>
Example:
<br>
Query: New York Transit
<br>
Search Executed: 'new' & york & 'transit'
<br>
operationId: searchFeeds
tags:
- "search"
Expand Down Expand Up @@ -864,7 +883,7 @@ components:
search_text_query_param:
name: search_query
in: query
description: General search query to match against various fields of the entities.
description: General search query to match against transit provider, location, and feed name.
required: False
schema:
type: string
Expand Down

0 comments on commit 7825d05

Please sign in to comment.