pub trait SzEngine {
Show 28 methods
// Required methods
fn prime_engine(&self) -> SzResult<()>;
fn get_stats(&self) -> SzResult<JsonString>;
fn add_record(
&self,
data_source_code: &str,
record_id: &str,
record_definition: &str,
flags: Option<SzFlags>,
) -> SzResult<JsonString>;
fn get_record_preview(
&self,
record_definition: &str,
flags: Option<SzFlags>,
) -> SzResult<JsonString>;
fn delete_record(
&self,
data_source_code: &str,
record_id: &str,
flags: Option<SzFlags>,
) -> SzResult<JsonString>;
fn reevaluate_record(
&self,
data_source_code: &str,
record_id: &str,
flags: Option<SzFlags>,
) -> SzResult<JsonString>;
fn reevaluate_entity(
&self,
entity_id: EntityId,
flags: Option<SzFlags>,
) -> SzResult<JsonString>;
fn search_by_attributes(
&self,
attributes: &str,
search_profile: Option<&str>,
flags: Option<SzFlags>,
) -> SzResult<JsonString>;
fn why_search(
&self,
attributes: &str,
entity_id: EntityId,
search_profile: Option<&str>,
flags: Option<SzFlags>,
) -> SzResult<JsonString>;
fn get_entity(
&self,
entity_id: EntityId,
flags: Option<SzFlags>,
) -> SzResult<JsonString>;
fn get_entity_by_record(
&self,
data_source_code: &str,
record_id: &str,
flags: Option<SzFlags>,
) -> SzResult<JsonString>;
fn get_record(
&self,
data_source_code: &str,
record_id: &str,
flags: Option<SzFlags>,
) -> SzResult<JsonString>;
fn find_interesting_entities_by_entity_id(
&self,
entity_id: EntityId,
flags: Option<SzFlags>,
) -> SzResult<JsonString>;
fn find_interesting_entities_by_record(
&self,
data_source_code: &str,
record_id: &str,
flags: Option<SzFlags>,
) -> SzResult<JsonString>;
fn find_path(
&self,
start_entity_id: EntityId,
end_entity_id: EntityId,
max_degrees: i64,
avoid_entity_ids: Option<&HashSet<EntityId>>,
required_data_sources: Option<&HashSet<String>>,
flags: Option<SzFlags>,
) -> SzResult<JsonString>;
fn find_network(
&self,
entity_list: &[EntityId],
max_degrees: i64,
build_out_degree: i64,
max_entities: i64,
flags: Option<SzFlags>,
) -> SzResult<JsonString>;
fn why_entity(
&self,
entity_id1: EntityId,
entity_id2: EntityId,
flags: Option<SzFlags>,
) -> SzResult<JsonString>;
fn why_records(
&self,
data_source_code1: &str,
record_id1: &str,
data_source_code2: &str,
record_id2: &str,
flags: Option<SzFlags>,
) -> SzResult<JsonString>;
fn why_record_in_entity(
&self,
data_source_code: &str,
record_id: &str,
flags: Option<SzFlags>,
) -> SzResult<JsonString>;
fn how_entity(
&self,
entity_id: EntityId,
flags: Option<SzFlags>,
) -> SzResult<JsonString>;
fn get_virtual_entity(
&self,
record_keys: &[(String, String)],
flags: Option<SzFlags>,
) -> SzResult<JsonString>;
fn process_redo_record(
&self,
redo_record: &str,
flags: Option<SzFlags>,
) -> SzResult<JsonString>;
fn get_redo_record(&self) -> SzResult<JsonString>;
fn count_redo_records(&self) -> SzResult<i64>;
fn export_json_entity_report(
&self,
flags: Option<SzFlags>,
) -> SzResult<ExportHandle>;
fn export_csv_entity_report(
&self,
csv_column_list: &str,
flags: Option<SzFlags>,
) -> SzResult<ExportHandle>;
fn fetch_next(&self, export_handle: ExportHandle) -> SzResult<JsonString>;
fn close_export(&self, export_handle: ExportHandle) -> SzResult<()>;
}
Expand description
Core entity resolution engine operations
The SzEngine
trait provides methods for adding records, retrieving entities,
performing searches, and conducting various types of analysis.
Required Methods§
Sourcefn prime_engine(&self) -> SzResult<()>
fn prime_engine(&self) -> SzResult<()>
Primes the engine for optimal performance
Sourcefn get_stats(&self) -> SzResult<JsonString>
fn get_stats(&self) -> SzResult<JsonString>
Gets engine statistics
Sourcefn add_record(
&self,
data_source_code: &str,
record_id: &str,
record_definition: &str,
flags: Option<SzFlags>,
) -> SzResult<JsonString>
fn add_record( &self, data_source_code: &str, record_id: &str, record_definition: &str, flags: Option<SzFlags>, ) -> SzResult<JsonString>
Adds a record for entity resolution
Sourcefn get_record_preview(
&self,
record_definition: &str,
flags: Option<SzFlags>,
) -> SzResult<JsonString>
fn get_record_preview( &self, record_definition: &str, flags: Option<SzFlags>, ) -> SzResult<JsonString>
Gets a preview of how a record would be processed
Sourcefn delete_record(
&self,
data_source_code: &str,
record_id: &str,
flags: Option<SzFlags>,
) -> SzResult<JsonString>
fn delete_record( &self, data_source_code: &str, record_id: &str, flags: Option<SzFlags>, ) -> SzResult<JsonString>
Deletes a record from the entity repository
Sourcefn reevaluate_record(
&self,
data_source_code: &str,
record_id: &str,
flags: Option<SzFlags>,
) -> SzResult<JsonString>
fn reevaluate_record( &self, data_source_code: &str, record_id: &str, flags: Option<SzFlags>, ) -> SzResult<JsonString>
Reevaluates a specific record
Sourcefn reevaluate_entity(
&self,
entity_id: EntityId,
flags: Option<SzFlags>,
) -> SzResult<JsonString>
fn reevaluate_entity( &self, entity_id: EntityId, flags: Option<SzFlags>, ) -> SzResult<JsonString>
Reevaluates all records for a specific entity
Sourcefn search_by_attributes(
&self,
attributes: &str,
search_profile: Option<&str>,
flags: Option<SzFlags>,
) -> SzResult<JsonString>
fn search_by_attributes( &self, attributes: &str, search_profile: Option<&str>, flags: Option<SzFlags>, ) -> SzResult<JsonString>
Searches for entities by attributes
Sourcefn why_search(
&self,
attributes: &str,
entity_id: EntityId,
search_profile: Option<&str>,
flags: Option<SzFlags>,
) -> SzResult<JsonString>
fn why_search( &self, attributes: &str, entity_id: EntityId, search_profile: Option<&str>, flags: Option<SzFlags>, ) -> SzResult<JsonString>
Analyzes why a search result was returned for an entity
Sourcefn get_entity(
&self,
entity_id: EntityId,
flags: Option<SzFlags>,
) -> SzResult<JsonString>
fn get_entity( &self, entity_id: EntityId, flags: Option<SzFlags>, ) -> SzResult<JsonString>
Gets entity information by entity ID
Sourcefn get_entity_by_record(
&self,
data_source_code: &str,
record_id: &str,
flags: Option<SzFlags>,
) -> SzResult<JsonString>
fn get_entity_by_record( &self, data_source_code: &str, record_id: &str, flags: Option<SzFlags>, ) -> SzResult<JsonString>
Gets entity information by record identifier
Sourcefn get_record(
&self,
data_source_code: &str,
record_id: &str,
flags: Option<SzFlags>,
) -> SzResult<JsonString>
fn get_record( &self, data_source_code: &str, record_id: &str, flags: Option<SzFlags>, ) -> SzResult<JsonString>
Gets record information
Sourcefn find_interesting_entities_by_entity_id(
&self,
entity_id: EntityId,
flags: Option<SzFlags>,
) -> SzResult<JsonString>
fn find_interesting_entities_by_entity_id( &self, entity_id: EntityId, flags: Option<SzFlags>, ) -> SzResult<JsonString>
Finds interesting entities related to a given entity
Sourcefn find_interesting_entities_by_record(
&self,
data_source_code: &str,
record_id: &str,
flags: Option<SzFlags>,
) -> SzResult<JsonString>
fn find_interesting_entities_by_record( &self, data_source_code: &str, record_id: &str, flags: Option<SzFlags>, ) -> SzResult<JsonString>
Finds interesting entities related to a given record
Sourcefn find_path(
&self,
start_entity_id: EntityId,
end_entity_id: EntityId,
max_degrees: i64,
avoid_entity_ids: Option<&HashSet<EntityId>>,
required_data_sources: Option<&HashSet<String>>,
flags: Option<SzFlags>,
) -> SzResult<JsonString>
fn find_path( &self, start_entity_id: EntityId, end_entity_id: EntityId, max_degrees: i64, avoid_entity_ids: Option<&HashSet<EntityId>>, required_data_sources: Option<&HashSet<String>>, flags: Option<SzFlags>, ) -> SzResult<JsonString>
Finds a path between two entities
Sourcefn find_network(
&self,
entity_list: &[EntityId],
max_degrees: i64,
build_out_degree: i64,
max_entities: i64,
flags: Option<SzFlags>,
) -> SzResult<JsonString>
fn find_network( &self, entity_list: &[EntityId], max_degrees: i64, build_out_degree: i64, max_entities: i64, flags: Option<SzFlags>, ) -> SzResult<JsonString>
Finds a network of entities
Sourcefn why_entity(
&self,
entity_id1: EntityId,
entity_id2: EntityId,
flags: Option<SzFlags>,
) -> SzResult<JsonString>
fn why_entity( &self, entity_id1: EntityId, entity_id2: EntityId, flags: Option<SzFlags>, ) -> SzResult<JsonString>
Analyzes why two entities resolved together
Sourcefn why_records(
&self,
data_source_code1: &str,
record_id1: &str,
data_source_code2: &str,
record_id2: &str,
flags: Option<SzFlags>,
) -> SzResult<JsonString>
fn why_records( &self, data_source_code1: &str, record_id1: &str, data_source_code2: &str, record_id2: &str, flags: Option<SzFlags>, ) -> SzResult<JsonString>
Analyzes why two records resolved together
Sourcefn why_record_in_entity(
&self,
data_source_code: &str,
record_id: &str,
flags: Option<SzFlags>,
) -> SzResult<JsonString>
fn why_record_in_entity( &self, data_source_code: &str, record_id: &str, flags: Option<SzFlags>, ) -> SzResult<JsonString>
Analyzes why a record is in an entity
Sourcefn how_entity(
&self,
entity_id: EntityId,
flags: Option<SzFlags>,
) -> SzResult<JsonString>
fn how_entity( &self, entity_id: EntityId, flags: Option<SzFlags>, ) -> SzResult<JsonString>
Analyzes how an entity was resolved
Sourcefn get_virtual_entity(
&self,
record_keys: &[(String, String)],
flags: Option<SzFlags>,
) -> SzResult<JsonString>
fn get_virtual_entity( &self, record_keys: &[(String, String)], flags: Option<SzFlags>, ) -> SzResult<JsonString>
Gets a virtual entity based on record definitions
Sourcefn process_redo_record(
&self,
redo_record: &str,
flags: Option<SzFlags>,
) -> SzResult<JsonString>
fn process_redo_record( &self, redo_record: &str, flags: Option<SzFlags>, ) -> SzResult<JsonString>
Processes a redo record
Sourcefn get_redo_record(&self) -> SzResult<JsonString>
fn get_redo_record(&self) -> SzResult<JsonString>
Gets the next redo record
Sourcefn count_redo_records(&self) -> SzResult<i64>
fn count_redo_records(&self) -> SzResult<i64>
Counts the number of redo records
Sourcefn export_json_entity_report(
&self,
flags: Option<SzFlags>,
) -> SzResult<ExportHandle>
fn export_json_entity_report( &self, flags: Option<SzFlags>, ) -> SzResult<ExportHandle>
Exports entity data
Sourcefn export_csv_entity_report(
&self,
csv_column_list: &str,
flags: Option<SzFlags>,
) -> SzResult<ExportHandle>
fn export_csv_entity_report( &self, csv_column_list: &str, flags: Option<SzFlags>, ) -> SzResult<ExportHandle>
Exports CSV entity report
Sourcefn fetch_next(&self, export_handle: ExportHandle) -> SzResult<JsonString>
fn fetch_next(&self, export_handle: ExportHandle) -> SzResult<JsonString>
Fetches the next batch of export data
Sourcefn close_export(&self, export_handle: ExportHandle) -> SzResult<()>
fn close_export(&self, export_handle: ExportHandle) -> SzResult<()>
Closes an export operation