Try our conversational search powered by Generative AI!

Indexing not working

Vote:
 

Hey,

What can be the problem when a page isn't indexed when you change or publish it. If I run the scheduled task it will pop up in my result, but not after a publish.

Do I need to add something to my solution?

/Jens

#120049
Apr 09, 2015 10:53
Vote:
 

There exist a flag that you can set in appsettings that turns of the automatic indexing, but you have to set it manually for it to work. It is called EventedIndexingEnabled and are true by default.

Do you get any messages in the log files that indicates that you have any other problem when saving/publishing?

#120051
Apr 09, 2015 10:59
Vote:
 

Found an error in my log.

I have a property. A block called PersonBlock that basically just have an emailaddress as value. But this is what the log says;
However. I do have two values with [Ignore] attribute on. Profilepage is one of those values.

2015-04-09 11:11:08,347 [16] ERROR EPiServer.Find.Cms.ContentEventIndexer: An exception occured while indexing (IContent). Error getting value from 'ProfilePage' on 'Castle.Proxies.PersonblockProxy'..
Newtonsoft.Json.JsonSerializationException: Error getting value from 'ProfilePage' on 'Castle.Proxies.PersonblockProxy'. ---> System.ArgumentNullException: The provided content link does not have a value.
Parameter name: contentLink
   at EPiServer.Core.DefaultContentLoader.Get[T](ContentReference contentLink, LoaderOptions loaderOptions)
   at Intranet.Models.Blocks.Personblock.get_ProfilePage() in c:\Projects\Intranet\Intranet\Models\Blocks\Personblock.cs:line 50
   at GetProfilePage(Object )
   at Newtonsoft.Json.Serialization.DynamicValueProvider.GetValue(Object target)
        [Ignore]
        public ContentReference ProfilePage
        {
            get
            {
                var repository = ServiceLocator.Current.GetInstance<IContentRepository>();
                return repository.Get<StartPage>(ContentReference.StartPage).MyProfilePage;
                
            }
        }


Must be this that causes the error. 





#120054
Edited, Apr 09, 2015 11:19
Vote:
 

Solution was to add [JsonIgnore] attribute to the property :-) 

#120056
Apr 09, 2015 11:52
Vote:
 

You were faster than me, that was what I was about to suggest since the error where when serialization the error.

Great that it works!

#120057
Apr 09, 2015 12:04
Vote:
 

Thank you for the help :-)

#120058
Apr 09, 2015 12:05
Vote:
 

It's a good practise in other aspects as well as Find usage to keep logic out of the getters.

I think your property would've worked fine to Find-index and Find-filter on if it had been a plain public ContentReference ProfilePage { get; set; } and you would've set it in your ContentType class constructor.

#120060
Apr 09, 2015 13:33
Vote:
 

Old thread, but came up while I was searching for a solution for the exact same problem (epi find v11).

Haven't found the reason to why indexing stopped working when publishing pages, while reindexing from admin worked. But by running indexing in the same thread as the web, it worked as intended again (can mention that I never got logging of episerver indexing to work). 

Added this to a InitializableModule with dependency of IndexingModule (should probably work in global asax as well):

//ref http://world.episerver.com/documentation/Items/Developers-Guide/EPiServer-Find/11/Integration/episerver-7-5/Indexing/
ContentIndexer.Instance.Invisible = false;

#145584
Mar 07, 2016 17:06
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.