I read the fielddata is default disabled for text field, how can enable?
this is my code:
public class ProductoResponse
{
public int Clave { get; set; }
public string Nombre { get; set; }
public string ABC { get; set; }
public int Existencia { get; set; }
}
var mustClauses = new List<QueryContainer>();
var shouldClauses = new List<QueryContainer>();
var filterClauses = new List<QueryContainer>();
var sortClauses = new List<ISort>();
...
sortClauses.Add(new SortField { Field = "_score", Order = SortOrder.Descending });
sortClauses.Add(new SortField { Field = "aBC", Order = SortOrder.Ascending });
sortClauses.Add(new SortField { Field = "existencia", Order = SortOrder.Descending });
var searchRequest = new SearchRequest<ProductoResponse>(Indices.All, Types.All)
{
Query = new BoolQuery {
Must = mustClauses,
Filter = filterClauses,
Should = shouldClauses
},
Sort = sortClauses,
From = 0,
Size = 10
};
var searchResponse = client.Search<ProductoResponse>(
searchRequest
);
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.