Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
How many blocks does this method return and how often do you run it? If you harass Find to much it won't return any results for a while.
Anyway, to start with you should ensure that pages in your recycle bin isn't indexed. If you still do, you can handle this by adding .ExcludeDeleted() to your query. You should also add some caching to your resonspe.
client.Search<BlockData>()
.FilterForVisitor()
.ExcludeDeleted()
.StaticallyCacheFor(TimeSpan.FromSeconds(60))
.Take(NOTMORETHANYOUNEED)
I'm using the search like this:
var results = client.Search<GolfDigestGalleryBlock>().FilterForVisitor().Take(MAXRESULTS);
It's behaving very inconsistently. I've set up a new page that uses this service and i'm getting no blocks returned. But I have an existing page that I've deleted blocks from and those blocks are still coming back. Amd I using this wrong?