Sebastian Dammark
04/15/2024, 11:45 AMvar result = publishedContentQuery.Search(q, p * pageSize, pageSize, out long totalRecords)
.OrderByDescending(y => y.Score)
.Where(x => x.Content.IsVisible());
If I do like this, IsVisible is not taken in consideration, neither in the result, or in totalRecords
var result = publishedContentQuery.Search(q, p * pageSize, pageSize, out long totalRecords)
.Where(x => x.Content.IsVisible())
.OrderByDescending(y => y.Score);
How can I affect totalRecords, and what is the difference between the 2 examples ?Jemayn
04/15/2024, 12:21 PMcsharp
var query = index.Searcher.CreateQuery(IndexTypes.Content);
var queryExecutor = query.ManagedQuery(searchTerm).And().Field("isVisible", "1");
var result = publishedContentQuery.Search(queryExecutor, p * pageSize, pageSize, out long totalRecords)
.OrderByDescending(y => y.Score);
Sebastian Dammark
04/23/2024, 5:45 AMA hub and casual space for you to interact with fellow community members and learn more about Umbraco!
Powered by