November Happy Hour will be moved to Thursday December 5th.

Q: SearchHandler.Instance.GetSearchResults How to handle limit of 1000?

Vote:
 

Supporting existing code for a search on grants.   The issue is the client is not able to see new grants in the search.   It seems like the number of grants is greater than the ability of the SearchHandler to return.    It's using a Lucene index.    So this query.

var grantQueryResults = SearchHandler.Instance.GetSearchResults(query, 1, maxResults) //GET ALL
.IndexResponseItems
.Where(x =>
(x.Culture.Equals(culture) || string.IsNullOrEmpty(x.Culture))
&& !x.ItemType.Contains(unifiedDirectoryType.FullName))
.OrderByDescending(x => x.Created)
.ToList();

If I make the variable maxResults > 1000, the results return zero results.  At 1000, it returns exactly 1000 results.

The previous developer threw the entire results into cache where they were queried later.   Is there any way to increase that 1000 limit to get those newer records?   Or do I need to rethink how the queries are executed.

#179495
Jun 14, 2017 1:16
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.