Using NEST Nest.RewriteMultiTerm.TopTermsBoostN

I am trying to invoke a wildcard query with a max rewrite clauses set to a number (say 100). We are using C#-NEST as
the client. While trying to set the rewrite method to top_term_boost_100 using the NEST api .Rewrite(Nest.RewriteMultiTerm.TopTermsBoostN));
I could not find a way to replace N with 100. Can someone guide me how to fix this?

1 Like

I have a similar question.

I have this query in elastic DSL.

POST my-index/_search
{
  "query": {
    "wildcard": {
      "Author": {
        "value": "*joe*",
        "rewrite": "top_terms_15"
      }
    }
  }
}

I want to write the same query using Nest SDK.

private Nest.WildcardQuery CreateQuery()
{
    Nest.WildcardQuery query = new Nest.WildcardQuery();
    query.Field = "Author";
    query.Value = "*joe*";           

    query.Rewrite = Nest.RewriteMultiTerm.TopTermsN;
    //Now how to specify a value for N ? 

    return query;
}

How can I specify a value for N ? (when using Nest.RewriteMultiTerm.TopTermsN)

Elastic version 5.2.1 Kibana version 5.2.1 Nest version 5.2.0

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.