Include_In_Parent option for ElasticSearch and NEST library -


i using elasticsearch , nest .net library implementing search functionality needed in our app. in model, have type contains nested objects per below.

[elastictype(name = "x")] public class x {     [elasticproperty(includeinall = false, index = fieldindexoption.notanalyzed)]     public string id { get; set; }        [elasticproperty(type = fieldtype.nested)]     public list<y> ys { get; set; }    } 

any queries executed against x executed against list of ys. highlight hits in nested objects , based on https://github.com/elasticsearch/elasticsearch/issues/5245 .

however, in order use proposed workaround, include_in_parent option should true nested object.

how can option enabled using nest library? there elasticproperty property (i haven’t found obvious one) or other way so?

thank you

apparently can done using fluent syntax. above case code be:

.addmapping<x>(m => m     .properties(p => p          .nestedobject<y>(n => n              .name("ys")              .includeinparent()) 

Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -