I'm transitioning to ElasticSearch on my website and am using NEST as my C# .NET interface.
In writing code to index my content, I can't figure out how to map fields individually. Suppose I have the following:
var person = new Person
{
Id = "1",
Firstname = "Martijn",
Lastname = "Laarman",
Email = "[email protected]",
Posts = "50",
YearsOfExperience = "26"
};
Rather than indexing the entire dataset using:
var index = client.Index(person);
I want to index FirstName and LastName so that they can be searched upon, but I don't need the other fields to be in the index (other than ID) because they would only take up space. Can anyone help me with the code to map these fields individually?