Is it possible to use copy_to in Nest attributes? I know, there is an option to use the Fluent Mapping (but the CopyTo doesn't work with string) instead of Attribute Mapping. And if I do make a "copy_to", do I have to add another field to my Mapping class as a placeholder? These are my mappings:
[ElasticsearchType(Name = "project")]
public class Project
{
public Guid Id { get; set; }
public bool IsOpen { get; set; }
public bool IsDeployed { get; set; }
[Text(Analyzer = "substring_analyzer")]
public string ExternalCode { get; set; }
public Owner Owner { get; set; }
}
public class Owner
{
public string FirstName { get; set; }
public string LastName { get; set; }
}
And initialization:
client.CreateIndex(INDEX_NAME, descriptor => descriptor
.Mappings(ms => ms
.Map<Project>(m => m.AutoMap())
)
.Settings(s => s
.Analysis(a => a
.Analyzers(analyzer => analyzer
.Custom("substring_analyzer", analyzerDescriptor => analyzerDescriptor
.Tokenizer("keyword")
.Filters("lowercase", "substring")
)
)
.TokenFilters(tf => tf
.NGram("substring", filterDescriptor => filterDescriptor
.MinGram(1)
.MaxGram(9)
)
)
)
)
);
I'd like to use the copy_to option on Owner.FirstName, Owner.LastName and the ExternalCode fields, and than add the NGram tokenizer to the whole stuff.