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

I replaced the Integration database with the production DB and now I get an error when using EpiServer Find.

Vote:
 

This is the error:

'Content with id '286580' is of type 'Castle.Proxies.ImageOrVideoBlockProxy' which does not inherit required type 'EPiServer.Core.PageData''

The error occurs on search.GetPagesResult();. Here's what the code looks like:

var filter = BuildFilter(searchQuery, name, state, city, lat, lng, amenities, type, eventTypes, isVenue);
var search = client.Search<ClubPage>().Filter(filter).Take(MAXRESULTS);

if (sort == "distance" && lat != null && lng != null)
{
    search = search.OrderBy(p => p.Location).DistanceFrom(GetGeoLocation(lat, lng));
}
else
{
    search = search.OrderBy(p => p.DisplayName);
}

var results = search.GetPagesResult();

I ran the Find indexing before I exported the int database for local testing. And I made sure that the find URL and index for integration was in my web.config. Any ideas what's going on here?

#303399
Jun 12, 2023 18:54
Vote:
 

Hi,

It looks as though something in your index has been corrupted.

When restoring databases, it would be better to clear the index first and ensure the index is empty before re-indexing.

If the problem exists after this, then you can either ask support to remove just that content using the id. Or you could write you own extension to allow you to enter an id and remove it from the index.

Thanks

Paul

#303400
Jun 12, 2023 19:59
eperezjr - Jun 12, 2023 21:03
I see. Is there a special process for clearing the indexes? Or you just mean the normal sql server indexes?
eperezjr - Jun 12, 2023 21:03
I see. Is there a special process for clearing the indexes? Or you just mean the normal sql server indexes?
Vote:
 

You can reindex your content using this Scheduled job for indexing (Find 9) | Optimizely Developer Commun

it will clear the indexes once completes

#303440
Jun 13, 2023 5:49
Vote:
 

Hi,

You should b abl to following the process here https://support.optimizely.com/hc/en-us/articles/4413200747789-Clear-the-index-and-reindexing

Thanks

Paul

#303442
Jun 13, 2023 7:58
eperezjr - Jun 13, 2023 18:36
How can I access that site? Is that just https://find.episerver.com/?
Paul McGann (Netcel) - Jun 14, 2023 9:28
You should just be able to do this in the CMS under Search and Navigation.
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.