I do not understand, this works fine when I re-index the content but not when I create a new page in CMS.
Hmm nothing comes to mind in terms of limitations with indexing through publish and using conventions...
You could try putting a breakpoint on your SearchSubsection code? Maybe look at the log files or indexing errors?
I know you can also configure a serializer to add your own logging to see if anythings up with a stack trace.
As a thought, are you working in an environment with a shared database (e.g. one database used by a dev site and/or multiple developers working locally)? When you manually run a scheduled task on your local machine, that task will run on your local machine. If you publish a piece of content on your local machine, I'm not sure whether the indexing is guaranteed to happen on the same machine as the publish. I'm wondering whether, in your case, you've made changes to the indexing conventions on your local machine but someone else's instance is doing the indexing hence not reflecting your changes.
Hello.
So I have written code in my FindInitialization to override the SearchSubsection for a particular page. I have done this
My code works when I rendex the whole content by using admin mode EPiServer Find Content Indexing Job but when I edit the page or create a new one it doesn't uses by overridden function. Am I missing something?