# Ingestion pipeline processor error - input field does not exist

**URL:** <https://discuss.elastic.co/t/ingestion-pipeline-processor-error-input-field-does-not-exist/353826>\
**Category:** Elastic Search\
**Tags:** painless, elastic-site-search\
**Created:** [February 22, 2024, 12:51am UTC](https://discuss.elastic.co/t/ingestion-pipeline-processor-error-input-field-does-not-exist/353826 "2024-02-22T00:51:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joy\_yang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joy_yang/32/131981_2.png) [@Joy\_yang](https://discuss.elastic.co/u/Joy_yang)\
**Post date:** [February 22, 2024, 12:51am UTC](https://discuss.elastic.co/t/ingestion-pipeline-processor-error-input-field-does-not-exist/353826/1 "2024-02-22T00:51:27Z")

</div>

Hi I'm working on a RAG project where we use elastic-search to search for relevant documents. The document comes from web crawler. However, due to most LLMs have token limit, I'm trying to chunk the documents into smaller sizes so it fits within the prompt token sizes. Without going directly into the custom coding-heaving method, I found I can set up a custom ingestion pipeline in kibana UI. However, after I setup script + foreach processors, I kept getting this errors.

`Processor 'inference' in pipeline 'search-test@custom' failed with message 'Input field [body_content_field] does not exist in the source document`

If it's web crawler, it usually has body\_content, title etc., but I'm not sure where this "body\_content\_field" comes from and couldn't really find a way to debug this. Could anyone share some insights? Thanks!  
\*\*the method I tried is referred to this doc: [Chunking Large Documents via Ingest pipelines plus nested vectors equals easy passage search — Elastic Search Labs](https://www.elastic.co/search-labs/blog/articles/chunking-via-ingest-pipelines)

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [February 22, 2024, 2:36am UTC](https://discuss.elastic.co/t/ingestion-pipeline-processor-error-input-field-does-not-exist/353826/2 "2024-02-22T02:36:02Z")

</div>

Hi @Joy_yang Welcome to the community and cool building a RAG application. Very cool

There's other good content there at the Elasticsearch labs.

> [@Joy\_yang](#):
>
> body\_content\_field

So you need to replace that with the field that's in your source document that has the text in it...

In this line

```auto
String[] envSplit = /((?<!M(r|s|rs)\.)(?<=\.) |(?<=\!) |(?<=\?) )/.split(ctx['body_content']);

```

Replace `body_content` with your field

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 21, 2024, 2:36am UTC](https://discuss.elastic.co/t/ingestion-pipeline-processor-error-input-field-does-not-exist/353826/3 "2024-03-21T02:36:38Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
