Developer forum

Forum » Integration » Building index in code

Building index in code

Espen Strømsnes
Espen Strømsnes
Reply

I have an IntegrationJobFinishedObserver where I try to programatically build the product index after an integration job has executed (I need to build it in code rather than after the integration job has finished, because the IntegrationJobFinishedObserver does some product modifications and the index needs to be built as the last step of the process).

See screenshot of how I try to do this in code. The index build starts, but it fails with an exception "The given key was not present in the dictionary"

I suspect that there's something wrong with the parameters.

 

Any tips?

Best regards

Espen 

productindex.png

Replies

 
Nicolai Pedersen
Reply

Hi Espen

Can we see the rest of the screen dump? Your Build and Full build also needs to match.

BR Nicolai

 
Espen Strømsnes
Espen Strømsnes
Reply

You are absolutely correct. They have to match... :-)

Now they do, and the index builds just fine. For documentation purposes I have attached a screenshot indicating which properties need to match.

 

Best regards

Espen

indeksbuild.png

 

You must be logged in to post in the forum