mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-15 13:58:36 +02:00
Add logging when inference took place.
Displays log message in the form: ``` [2022-12-21T09:19:42Z INFO milli::update::index_documents::enrich] Primary key was not specified in index. Inferred to 'id' ```
This commit is contained in:
parent
402dcd6b2f
commit
b24def3281
1 changed files with 4 additions and 1 deletions
|
@ -79,7 +79,10 @@ pub fn enrich_documents_batch<R: Read + Seek>(
|
||||||
documents_batch_index.insert(DEFAULT_PRIMARY_KEY),
|
documents_batch_index.insert(DEFAULT_PRIMARY_KEY),
|
||||||
),
|
),
|
||||||
[] => return Ok(Err(UserError::NoPrimaryKeyCandidateFound)),
|
[] => return Ok(Err(UserError::NoPrimaryKeyCandidateFound)),
|
||||||
[(field_id, name)] => PrimaryKey::flat(name, *field_id),
|
[(field_id, name)] => {
|
||||||
|
log::info!("Primary key was not specified in index. Inferred to '{name}'");
|
||||||
|
PrimaryKey::flat(name, *field_id)
|
||||||
|
}
|
||||||
multiple => {
|
multiple => {
|
||||||
return Ok(Err(UserError::MultiplePrimaryKeyCandidatesFound {
|
return Ok(Err(UserError::MultiplePrimaryKeyCandidatesFound {
|
||||||
candidates: multiple
|
candidates: multiple
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue