Embedding strategies don't respect not converting to label
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3572801. -->
Reported by: [scott_euser](https://www.drupal.org/user/3267594)
Related to !23 !24
>>>
<p>[Tracker]<br>
<strong>Update Summary: </strong>[One-line status update for stakeholders]<br>
<strong>Short Description: </strong>[One-line issue summary for stakeholders]<br>
<strong>Check-in Date: </strong>MM/DD/YYYY<br>
<em>Metadata is used by the <a href="https://www.drupalstarforge.ai/" title="AI Tracker">AI Tracker.</a> Docs and additional fields <a href="https://www.drupalstarforge.ai/ai-dashboard/docs" title="AI Issue Tracker Documentation">here</a>.</em><br>
[/Tracker]</p>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>Surprised we haven't hit this yet before actually but its not possible to filter by entity bundle when adding metadata e.g. to Milvus/Pinecone/etc if it has e.g. any spaces in it. The reason for this is the bundle machine name (which Views/Search API expects) is converted to label because EmbeddingBase::getValue() ignores the <code>$convert_to_label</code> variable</p>
<h4 id="summary-steps-reproduce">Steps to reproduce (required for bugs, but not feature requests)</h4>
<ol>
<li>Attempt to index node bundle like 'My Type' with machine name 'my_type'</li>
<li>See that the metadata is like 'My Type' rather than 'my_type' as Search API/Views expects</li>
</ol>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Respect the <code>$convert_to_label</code></p>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<ol>
<li>MR into AI Search</li>
<li>Backport into 1.3.x</li>
</ol>
<h3>Optional: Other details as applicable (e.g., User interface changes, API changes, Data model changes)</h3>
<p>N/A</p>
issue