How to Chunk Multiple Fields as Main Content in Indexing?
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3532434. -->
Reported by: [yijin928@163.com](https://www.drupal.org/user/3848766)
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>Hi all, I'm using the AI Search functionality and currently stuck at the indexing stage. Specifically, I'm trying to figure out how to handle chunking and embedding when my content is spread across multiple fields (e.g., `summary`, `solution`, etc.).</p>
<p>The module only allows one field to be marked as "Main content" for chunking, as described here: “This is the main body content. It is typically longer and needs to be broken into chunks. Queries by end-users are performed on this content. Usually only one field should be main content and a more advanced Embedding Strategy may be needed to support multiple main contents.”</p>
<p>I'm wondering is there a recommended way to include multiple main contents in chunking and embedding? Any guidance or clarification would be greatly appreciated!</p>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>I attempted to use the rendered HTML output as the single field for "Main content", but it includes a lot of irrelevant markup (e.g., links, images), which introduces noise into the vectorization process.</p>
<p>I’d like to explore ways to merge the text from multiple fields before chunking, ideally without modifying how the content is displayed on the site.</p>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<p>None expected</p>
<h3 id="summary-ui-changes">User interface changes</h3>
<p>None expected</p>
<h3 id="summary-api-changes">API changes</h3>
<p>None expected</p>
<h3 id="summary-data-model-changes">Data model changes</h3>
<p>None expected</p>
issue