Create index with multi field mapping syntax with NEST 2.x
<p>I just can't seem to get the syntax correct for multi field mapping in NEST 2.0--if that's the correct terminology. Every example I've found for mapping seems to be &lt;= the 1.x version of NEST. I'm new to Elasticsearch and NEST, and I've been reading their documentation, but the NEST documentation hasn't been completely updated for 2.x.</p>

<p>Basically, I don't need to index or store the entire type. Some fields I need for indexing only, some fields I'll need to index and retrieve, and some I don't need for indexing, just for retrieval.</p>

<pre><code>MyType
{
    // Index this &amp; allow for retrieval.
    int Id { get; set; } 

    // Index this &amp; allow for retrieval.
    // **Also**, in my searching &amp; sorting, I need to sort on this **entire** field, not just individual tokens.
    string CompanyName { get; set; } 

    // Don't index this for searching, but do store for display.
    DateTime CreatedDate { get; set; }

    // Index this for searching BUT NOT for retrieval/displaying.
    string CompanyDescription { get; set; } 

    // Nest this.
    List&lt;MyChildType&gt; Locations { get; set; }
}

MyChildType
{
    // Index this &amp; allow for retrieval.
    string LocationName { get; set; }

    // etc. other properties.
}
</code></pre>

<p>I've <strong>have</strong> been able to index the entire object and child as-is using the following as an example:  </p>

<pre><code>client.Index(item, i =&gt; i.Index(indexName));
</code></pre>

<p>However, the actual object is a lot larger than this, and I really don't need most of it. I've found this, which looks like what I think I want to do, but in an older version: <a href="https://stackoverflow.com/questions/35234793/multi-field-mapping-elasticsearch">multi field mapping elasticsearch</a></p>

<p>I think "mapping" is what I'm going for, but like I said, I'm new to Elasticsearch and NEST and I'm trying to learn the terminology.</p>

<p>Be gentle! :) It's my first time to ask a question on SO. Thanks!</p>