Struct searchspot::resources::Talent
[−]
[src]
pub struct Talent { pub id: u32, pub accepted: bool, pub desired_work_roles: Vec<String>, pub desired_work_roles_vanilla: Option<Vec<String>>, pub desired_work_roles_experience: Vec<String>, pub professional_experience: String, pub work_locations: Vec<String>, pub current_location: String, pub work_authorization: String, pub skills: Vec<String>, pub summary: String, pub headline: String, pub contacted_company_ids: Vec<u32>, pub batch_starts_at: String, pub batch_ends_at: String, pub added_to_batch_at: String, pub weight: i32, pub blocked_companies: Vec<u32>, pub work_experiences: Vec<String>, pub avatar_url: String, pub salary_expectations: Vec<SalaryExpectations>, pub latest_position: String, pub languages: Vec<String>, }
The talent that will be indexed into ElasticSearch.
Fields
id: u32
accepted: bool
desired_work_roles: Vec<String>
desired_work_roles_vanilla: Option<Vec<String>>
desired_work_roles_experience: Vec<String>
professional_experience: String
work_locations: Vec<String>
current_location: String
skills: Vec<String>
summary: String
headline: String
contacted_company_ids: Vec<u32>
batch_starts_at: String
batch_ends_at: String
added_to_batch_at: String
weight: i32
blocked_companies: Vec<u32>
work_experiences: Vec<String>
avatar_url: String
salary_expectations: Vec<SalaryExpectations>
latest_position: String
languages: Vec<String>
Methods
impl Talent
[src]
pub fn visibility_filters(
epoch: &str,
presented_talents: Vec<i32>,
date_filter_present: bool
) -> Vec<Query>
[src]
epoch: &str,
presented_talents: Vec<i32>,
date_filter_present: bool
) -> Vec<Query>
Return a Vec<Query>
with visibility criteria for the talents.
The epoch
must be given as I64
(UNIX time in seconds) and is
the range in which batches are searched.
If presented_talents
is provided, talents who match the IDs
contained there skip the standard visibility criteria.
Basically, the talents must be accepted into the platform and must be inside a living batch to match the visibility criteria.
pub fn search_filters(params: &Map, epoch: &str) -> Query
[src]
Given parameters inside the query string mapped inside a Map
,
and the epoch
(defined as UNIX time in seconds) for batches,
return a Query
for ElasticSearch.
Considering a single row, the terms inside there are ORred,
while through the rows there is an AND.
I.e.: given ["Fullstack", "DevOps"] as desired_work_roles
, found talents
will present at least one of these roles), but both desired_work_roles
and work_location
, if provided, must be matched successfully.
pub fn full_text_search(params: &Map) -> Option<Query>
[src]
pub fn sorting_criteria() -> Sort
[src]
Return a Sort
that makes values be sorted for given fields, descendently.
Trait Implementations
impl Debug for Talent
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Clone for Talent
[src]
fn clone(&self) -> Talent
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Resource for Talent
[src]
type Results = SearchResults
fn index(
es: &mut Client,
index: &str,
resources: Vec<Self>
) -> Result<BulkResult, EsError>
[src]
es: &mut Client,
index: &str,
resources: Vec<Self>
) -> Result<BulkResult, EsError>
Populate the ElasticSearch index with Vec<Talent>
fn search(es: &mut Client, default_index: &str, params: &Map) -> Self::Results
[src]
Query ElasticSearch on given indexes
and params
and return the IDs of
the found talents.
fn delete(
es: &mut Client,
id: &str,
index: &str
) -> Result<DeleteResult, EsError>
[src]
es: &mut Client,
id: &str,
index: &str
) -> Result<DeleteResult, EsError>
Delete the talent associated to given id.
fn reset_index(es: &mut Client, index: &str) -> Result<MappingResult, EsError>
[src]
Reset the given index. All the data will be destroyed and then the index will be created again. The map that will be used is hardcoded.