Laravel Scout Algolia Aggregator syncing issue - ObjectId

First of all I would like to thank you a lot for the great project you that Algolia is.

I am using your tool for the first time and I do have a strange issue. I have two environments and two applications with exactly the same code and each has its own application registered in Algolia dashboard.

One is running on my local and the other on remote server.
using packages
“php”: “^8.1”,
“algolia/scout-extended”: “^3.0”,
“guzzlehttp/guzzle”: “^7.2”,
“intervention/image”: “^3.1”,
“laravel/framework”: “^10.10”,
“laravel/jetstream”: “^4.1”,
“laravel/sanctum”: “^3.3”,
“laravel/scout”: “^10.6”,
“laravel/tinker”: “^2.8”,
“livewire/livewire”: “^3.0”,
“spatie/laravel-permission”: “^6.2”,
“symfony/http-client”: “^6.4”,
“symfony/mailgun-mailer”: “^6.4”

Local one is working as expected.

  • when I run flush command - all is removed
  • when I run import command - all is imported
  • when I update object via app UI - object is updated in its own index as well as in aggregator

Remote server is working as expected except aggregator sync

  • when I run flush command - all is removed
  • when I run import command - all is imported
  • when I update object via app UI - object is updated in its own index BUT NOT in aggregator

I am suspicious that is because some issue with objectID.

Local one is creating index in aggregator as for example objectID “App\Models\Scientist::4”
Remote one is creating index in aggregator without class prefix so it goes for instance only “4” and therefore it is combining more models which then it is creating a conflict among models with the same ID. I had made that work by manually defining a key. For example.

public function getScoutKey() { return get_class($this).‘::’.$this->id; }

but even doing this aggregator is not updating its data and only index of updated model is being synced.

Feels like something is wrong in scout-extended/src/Searchable/ObjectIdEncrypter.php at bf3d7876fadaaa1cdbce3a09cfd256227406a3fc · algolia/scout-extended · GitHub when running remotely for some reason

Thank you very much for any help.