Developer forum

Forum » Development » Read settings from current index being build

Read settings from current index being build

Rui Silva
Reply

Is there any way to read the settings in the IndexBuilderExtender extension?

I want to build a custom IndexBuilderExtender that will behave differently based on an index build settings:

but did not find any way to read settings on the doc being processed (in the public override void ExtendDocument(IndexDocument doc)).

I’ve tried something like:

            if (!(this is IIndexBuilder build))

            {

                return;

            }

 

But this is always true.

Is there any other way to do it?

 


Replies

 
Nicolai Pedersen
Reply
This post has been marked as an answer

Hi Rui

No, there is no way to do that as of now.

I've just added a "public T IndexBuilder" property on the IndexBuilderExtenderBase class to give you a property that gives you access to the IndexBuilder extending the document. It requires a new Dynamicweb.Indexing 1.4.0 package a new version of Dynamicweb.Ecommerce that will fill the property when extending.

TFS#51216 and TFS#51217

BR Nicolai

Votes for this answer: 1
 
Rui Silva
Reply

Thank you Nicolai!

Best,

Rui Silva

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hello,

We've tested for ProductIndexBuilder on both 9.4.19 and 9.5.0 but the property IndexBuilder is always null.

Regards,

Emil Dumitrescu

 
Nicolai Pedersen
Reply

Yes, saw that today when fixing this issue from Anders: https://doc.dynamicweb.com/forum/development/development/iindexbuilderextender-not-working-in-9-5-1

TFS#55454 should fix this, in testing, and will be out with the next update of Ecommerce package.

BR Nicolai

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Great, thank you!

Regards,

Emil Dumitrescu

 

You must be logged in to post in the forum