ton>Copy</button></pre>
<a id="md:field-extraction" class="tsd-anchor"></a><h3><a href="#md:field-extraction">Field extraction</a></h3><p>By default, documents are assumed to be plain key-value objects with field names
as keys and field values as simple values. In order to support custom field
extraction logic (for example for nested fields, or non-string field values that
need processing before tokenization), a custom field extractor function can be
passed as the <code>extractField</code> option:</p>
<pre>