Examine search returns max 500 results.
r
I am using examine search to return address data and mark it in a map. I would like to get all addresses (2000+) in single search, but it returns only 500 nodeIds. var query = searcher.CreateQuery(IndexTypes.Content).GroupedOr(new[] { "__NodeTypeAlias" }, new[] { Contact.ModelTypeAlias }); : : var ids = query.Execute().Select(x => x.Id).ToList(); How do I configure the QueryOption DefaultMaxResults from 500 to 5000 or set some options to get all results?
s
Have you tried
query.Execute(new QueryOptions(skip: 0, take: 5000)
? I would recommend not getting all results at the same time, but if you must then this is a way. Instead, you can do a for / foreach loop through the pages you need and change the
skip
and
take
numbers on each loop.
r
Thanks. It worked.
2 Views