is there anyway to limit the number of results that returned by examine search and i noticed that the maximum number of results returned by examine search is 500 nodes is there some thing i can add to my code to control its limit or make it return all results without limitation ?
if (ExamineManager.Instance.TryGetIndex("InternalIndex", out var index))
{
var mainSettings = Umbraco.Content(152407);
var searcher = index.GetSearcher();
ISearchResults ExamineResults = null;
var query = searcher.CreateQuery("content");
IBooleanOperation queryOperations = query.Field("__NodeTypeAlias", "newsItem");
ExamineResults = queryOperations.OrderByDescending(new SortableField[] { new SortableField("publish_time") }).Execute();
}
and if body can give an advice about sortable filed how can i make it work
i will be thxfull.
limit the examine search results
Hi
is there anyway to limit the number of results that returned by examine search and i noticed that the maximum number of results returned by examine search is 500 nodes is there some thing i can add to my code to control its limit or make it return all results without limitation ?
}
and if body can give an advice about sortable filed how can i make it work i will be thxfull.
I don't know about any number limitation by default in Umbraco - it's should return all nodes by your query.
Sort field works by lucene type, you should define it examine config and set value in right format
do you have an example for that please ?
i found The solution for examine max result you can type .Execute(max number of results); and its 500 by default
but still note sure about sortable field because umbraco 8 dont have config for examine like 7
is working on a reply...