Search endpoint
Example: Search for Profiles with an Email Address
Retrieve up to 5 profiles with an email address in the database. This query checks for the existence of the profile_info.emails
field.
Example: Search for Data Science Professionals
Search for 10 people working in data science. Using match
query we perform a full text search, meaning that we may get people who currently work as data scientists or in a similar position.
Perform an Exact Match Search
Thanks to mapping profile_info.current_title
as both text
and keyword
(See OpenSearch Mapping), we can easily perform an exact search on this field. Below we search for people whose role is titled “Data Scientist”. Mind that we use term
query to perform the search.
Combine Multiple Search Conditions
To perform a search based on multiple conditions, we need to use a boolean query. We want all the conditions to be met, so must
clause is the proper one. The below query will return all Software Developers working at The Swarm company. For other logical operation refer to OpenSearch documentation.
Search for Recently Updated Profiles
Retrieve profiles in the Information Technology and Services
industry that had their current job updated within a specific date range. This query uses a combination of range and term filters.
Search by Location and Past Experience
Retrieve profiles of people located in the United States who previously held a product-related role at Google. This query uses a nested query to access past experiences and excludes current roles with the must_not clause.