{"record":{"id":"3e7f4d0c7db92feb","repo":"quickwit-oss/quickwit","slug":"failed-to-ingest-all-the-documents","errorCode":null,"errorMessage":"failed to ingest all the documents","messagePattern":"failed to ingest all the documents","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"quickwit/quickwit-cli/src/tool.rs","lineNumber":538,"sourceCode":"        println!(\n            \"Now, you can query the index with the following command:\\nquickwit index search \\\n             --index {} --config ./config/quickwit.yaml --query \\\"my query\\\"\",\n            args.index_id\n        );\n    }\n\n    if args.clear_cache {\n        println!(\"Clearing local cache directory...\");\n        clear_cache_directory(&config.data_dir_path).await?;\n        println!(\"{} Local cache directory cleared.\", \"✔\".color(GREEN_COLOR));\n    }\n\n    match statistics.num_invalid_docs {\n        0 => {\n            println!(\"{} Documents successfully indexed.\", \"✔\".color(GREEN_COLOR));\n            Ok(())\n        }\n        _ => bail!(\"failed to ingest all the documents\"),\n    }\n}\n\npub async fn local_search_cli(args: LocalSearchArgs) -> anyhow::Result<()> {\n    debug!(args=?args, \"local-search\");\n    println!(\"❯ Searching directly on the index storage (without calling REST API)...\");\n    let config = load_node_config(&args.config_uri, None).await?;\n    let (storage_resolver, metastore_resolver) =\n        get_resolvers(&config.storage_configs, &config.metastore_configs);\n    let metastore: MetastoreServiceClient =\n        metastore_resolver.resolve(&config.metastore_uri).await?;\n    let aggs = args\n        .aggregation\n        .map(|agg_string| serde_json::from_str(&agg_string))\n        .transpose()?;\n    let sort_by: SortBy = args.sort_by_field.map(SortBy::from).unwrap_or_default();\n    let search_request_query_string = SearchRequestQueryString {\n        query: args.query,","sourceCodeStart":520,"sourceCodeEnd":556,"githubUrl":"https://github.com/quickwit-oss/quickwit/blob/a39730c5cdcd1a4fe798403737ae293999ea21f8/quickwit/quickwit-cli/src/tool.rs#L520-L556","documentation":"After a local ingest run, the statistics reported by `local_ingest_docs_cli` show one or more documents were rejected as invalid (num_invalid_docs > 0) — they failed doc-mapper validation during parsing/indexing, so not all input documents made it into the index. The command then aborts with this error instead of reporting success.","triggerScenarios":"Thrown at quickwit/quickwit-cli/src/tool.rs:538 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the per-document error output printed during ingest to find which documents fail validation","Fix the offending documents to conform to the index doc mapping (types, required fields, format)","Tighten or correct the doc mapping if valid documents are being rejected"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a39730c5cdcd1a4fe798403737ae293999ea21f8","analyzedAt":"2026-09-08T13:19:37.784Z","contentChangedAt":"2026-09-08T13:19:37.784Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}