I'm creating an index and also adding a mapping with the indexDescriptor, I have a couple of doubts regarding to the mapping process:
- how can I avoid to index a specific field from a class?
- how can I boost and specify the value of the "boostfield" with the fluent interface configuration?
- is the IndexDescriptor the correct place to map the class fields without using the ElasticProperty Attribute
I'm just asking these questions because I'm new using NEST and it seems like the current documentation is outdated
How I'm creating the index:
CreateIndex(IndexName, descriptor => descriptor.AddMapping<CandidateTextInfo>(
m => m.MapFromAttributes().
BoostField(c=>c.SetName(d=>d.Headline)).NumericDetection()));
public class CandidateTextInfo
{
public string ProfilePicture { get; set; }
public ObjectId UserId { get; set; } //field to ignore on mapping
public string Name { get; set; }
public string Headline { get; set; }
public Gender Gender { get; set; }
public byte Rating { get; set; }
public bool IsCompany { get; set; }
public string[] Tags { get; set; }
public string[] Categories { get; set; }
public string ExecutiveSummary { get; set; }
public HourlyRate HourlyRate { get; set; }
}