Custom Indexer with External Data, returning different results against browser session?

Hi @all

Umbraco Version: 8.14.2

Env: Azure Web App

Followed recommended settings: azure-web-apps - server-setup - Setup - Fundamentals - Documentation - our.umbraco.com

Created a custom index as per the doc here ExamineComponent.cs · GitHub and it’s working fine as expected in my local environment, but it’s not working as expected in DEV(Azure).

ISSUE: The custom indexer is changing against the browser session & that’s weird.
For example: if we login to the Umbraco from a browser with normal mode and indexed successfully and tried to login from another browser or in incognito mode then go to examine settings and we can’t see the indexed data, it is changing against the browser session.


PFA


Before indexing from the browser (session 1)

Tried indexing from the browser (session 1) and successfully indexed.

And if we try to search from the same browser session(session 1) then the result will show correctly, but if tried to login from another session (incognito mode), then it show’s the data is not indexed :frowning:

Please find this video for more info :
VIDEO

Regards
Dhanesh


This is a companion discussion topic for the original entry at https://our.umbraco.com/forum/106867-custom-indexer-with-external-data-returning-different-results-against-browser-session

We are experiencing a similar issue with the Umbraco Forms index. We have 1 backoffice instance and 3 website instances, but when using the forms index to determine if a record exists we get 3 different results, randomly displayed to the front-end.

Does the Umbraco Forms index also work in the same way as mentioned in the original thread? Ie as records are saved they are pushed to the website indexes?

And I should add that in a single website instance this works fine. So it feels like that maybe the subsequent instances are not getting updated properly.

Looks like, maybe a session affinity issue, because when we turned that on the issue seemed to go away. What concerns me there is, if I clear my session and login again will I see the correct results…. More testing to do.

I will add that having indexes on each instance seems like a bad idea to me (but I am fairly new to Umbraco). 15 years ago (was it that long?) Sitecore 6 did that and it was a complete mess keeping things in sync, now with solr and other technologies you can have a single index instance and not try to keep multiple copies in sync.

v8 not sure if you have the correct settings for LuceneDirectory??

Lucene/Examine configuration

The single instance Backoffice Administrative Web App should be set to use SyncTempEnvDirectoryFactory.

The multi instance Scalable Public Web App should be set to use TempEnvDirectoryFactory.

From the docs here.. (third set on our for how to set up on azure websapps v8)
azure-web-apps - Load-Balancing - server-setup - Setup - Fundamentals - Documentation - our.umbraco.com

From the screen shots (from your subscribers??) it looks like you have SynDirectocry → SyncTempEnvDirectoryFactory

and not TempEnvDirectoryFactory ?? though could be wrong on what the backoffice reports for each setting.