Optimizing Large Filter Queries in Algolia with React InstantSearch

I am currently working with React InstantSearch in Algolia and have encountered a challenge with filter optimization. Our application requires users to query data from specific stores only, based on certain parameters fetched from our database. This has led to a huge filter in our query:

store.status:active AND store.is_only_wholesale:false AND (store.id:e957c3e4-cc27-43a8-9e55-52c09290d71c OR store.id:b7e3bf21-026b-4b39-b034-4f77ee22ae45 OR store.id:69188997-9ba7-4f6b-a956-f79c9a7f8f42 OR store.id:6b6cbcb1-6e5d-421c-a066-b34e120595a4 OR store.id:0ef3e063-ea6b-4b72-98a6-992838a84512 OR store.id:a3ad634d-c2f6-4d73-8a69-cd7d9a0d43f5 OR store.id:46c36432-467a-41e9-b19c-96c6ef986560 OR store.id:d3d0591e-6ebd-470a-9477-6d4f874b5bc4 OR store.id:ac2fd7af-7673-47d5-b25f-4c73c561c3b0 OR store.id:41539945-531b-44d4-9513-3d74220ed423 OR store.id:1c7aacd9-c96f-44b3-abad-60e3228331c6 OR store.id:1902c701-1f71-44af-af8d-41f14285164f OR store.id:e192afc7-5eca-48d0-a212-f40b8ca4120e OR store.id:45628b96-0424-46d8-b138-82eec9171fa5 OR store.id:fd9a549a-6883-4c36-82d9-39e2ca2f75c8 OR store.id:b0531ce6-2ef6-4142-b99d-329bd8ddcea2 OR store.id:8357cd17-2f7e-4c05-be07-75b5287e959e OR store.id:0c94fd62-96b4-49ae-adcc-a037ab33676a OR store.id:b27330ca-0344-431f-8766-0c3d8765a1d8 OR store.id:a71d158b-1908-4bda-bd10-a3094d15ac2f OR store.id:e52212a3-214f-4742-aaa4-63657444df9f OR store.id:62c216c4-eee0-417b-a1a0-4caeab88accf OR store.id:41bc105d-cdac-406f-b3b3-ccbcf9bfb433 OR store.id:68a190f8-4b97-4977-a8b2-f479a169e04f OR store.id:cf724b32-375b-43e0-b469-356268b7e6a4 OR store.id:4adc7066-75ea-4c46-8a85-a95b913fe57c OR store.id:2a09061a-167a-43f3-bac3-5951f4bdba1a OR store.id:fed178d5-a5f5-490b-9392-679a5f3e4943 OR store.id:07b08897-ef49-4266-93d5-e2218c26eeb4 OR store.id:8b6ab14f-fe1d-454d-911b-38dd68d2e023 OR store.id:f30eded2-8f5c-4827-b116-99edb11cd9ce OR store.id:6999c554-e4da-439d-8126-90ef8f315f33 OR store.id:a892e0ab-14de-4ca4-8594-f47a0a4141ce OR store.id:f67b0497-feea-4b17-9de6-17698f0b3761 OR store.id:93248805-130e-42ac-b6e9-9905b96802fb OR store.id:bff065ac-5f67-4a07-ade4-bce7e34a1c7a OR store.id:c829e434-d296-4b77-ad92-9f91c74bd1a0 OR store.id:40333a9d-f124-4dd1-be11-7e36fe1236f6 OR store.id:d5b6c558-0320-479b-bbd6-497223caa6a4 OR store.id:6fdedf5a-9c53-48ba-bcb4-7debb2dd2372 OR store.id:3654b482-4627-4b97-9aeb-0c7b4de6793a OR store.id:def3a2d4-4afe-483f-a872-ea7c3b4c940d OR store.id:9b99a1c9-6115-4f6d-a0e0-a4e757cd6a92 OR store.id:8e7623d5-3510-4928-8b25-472728ceb738 OR store.id:12f602b7-afcb-42a1-a5d7-9ff8a62f18d1 OR store.id:c426441f-95ae-410c-8d8d-f068a17ece88 OR store.id:b4070c8c-f0e1-48a5-a884-321131bbd639 OR store.id:f423bf69-e798-45d0-a923-04d6220e7f8c OR store.id:c8cb4584-cd86-4c88-813d-4a6e3de75cc2 OR store.id:3f06e2d8-c16b-4abe-8c01-9e9b3753fdb0 OR store.id:0c04b7ca-e9f4-46ab-9aad-e183b819b127 OR store.id:7e820180-f6b2-43f1-81d1-df360620ccb8 OR store.id:cd10349d-6a63-4bd4-b8c0-0a39128f4c39 OR store.id:dca25e31-cfb9-4df7-89e2-704fe00dc23c OR store.id:8cbfd925-8363-4e77-8c33-578513d1f2e0 OR store.id:8404f5a2-8c28-4248-b81d-f53dfcf9a2d7 OR store.id:793da53f-8261-40d7-9584-1af20b819c7b OR store.id:72d57e04-023e-4832-abac-a1c4f5c864e9 OR store.id:0f82ef10-9ab5-4bbf-acb6-c8c45a6554e2 OR store.id:0d7244ef-214a-417b-adb6-84fdb929a5c9 OR store.id:ed5f8a7f-0ad8-4a6c-92ca-f7af838243c6 OR store.id:c11f2b24-c325-4a49-a378-b7993df150d2 OR store.id:3c86ee76-b53b-4f8a-9964-8aba777d6360 OR store.id:44b2e391-e07d-42d0-9356-51d80cd2bf07 OR store.id:86fc6e69-3a3d-415f-88de-171826c19269 OR store.id:fded9c88-93a4-4108-8849-9db1fa42f8e9 OR store.id:f00e8078-5e52-4462-9ffe-c52a1979dcad OR store.id:46896eb3-9c30-451c-a5b9-1f931e882781 OR store.id:de40cad2-8d40-4db1-bfb4-ec244110fbe6 OR store.id:8022c196-df55-4015-9cfa-9b809602a902 OR store.id:8ee86786-2ce3-4325-97a6-961527998955 OR store.id:0606b870-1c80-468c-9dd0-9b7c7f70ed47 OR store.id:19735d46-f32f-4643-a650-f4a2586f6473 OR store.id:61530fd0-6864-43a9-b36e-485b1d1823e2 OR store.id:54f9b604-b58c-49d6-85f9-592261ddce67 OR store.id:579d09a1-3204-4c75-a35d-c675a3938fab OR store.id:ec6516a6-ccbe-443d-a508-123b55e4db64 OR store.id:8a56f073-c7a0-4b8a-959a-5a040e904a0a OR store.id:838d6c5d-92d9-48d7-89a6-badb8174ba8e OR store.id:182a8e49-e009-47d9-bec7-eae03d52bdd9 OR store.id:2c940d60-8303-4600-9552-4428c2e3f718 OR store.id:39125af0-c8a3-42a0-901e-3a3f1b2c2122 OR store.id:0970321a-fa6d-4aa6-8b2b-684e3ed3a7f4 OR store.id:616b01dc-4c5f-405f-b363-4e1e13640b78 OR store.id:1d62553e-cffd-405c-bb63-0d22520c3329 OR store.id:3063bb43-1b92-412b-be4a-843ea4630537 OR store.id:9bcceb2f-9a56-42c1-b7c1-dd9f54a66271 OR store.id:15cfe5fb-b1f1-47b1-9e14-67732e8f4423 OR store.id:08fd84e2-a977-4a4c-a1a6-d9dd4f898ba1 OR store.id:b848a080-3b8b-46eb-8b0b-040b5957fdaf OR store.id:ddfeede3-487c-4dfd-ad7f-df09700cf9cd OR store.id:127c3a9c-5696-49ec-a669-b80bef4f29ce OR store.id:e0692e1e-b619-4550-9019-0b8073465de5 OR store.id:97e85f1b-ced8-4443-8388-a7f567255fba OR store.id:a1b4f773-353e-4517-b98f-3e218bb2ebde OR store.id:fad4499c-39e5-4ebb-adb8-b06588ff92c3 OR store.id:b26e8b09-ce0f-4c5c-92b1-e361d782a797 OR store.id:4931e819-a8a6-49b8-a519-03b6370c4e64 OR store.id:15503a67-cd5f-41f8-8dfc-a02ed39e72c4 OR store.id:5123be70-bbce-41e5-9077-e865eadbcf5c OR store.id:3727f275-eb23-4b45-8429-a9880e58eb30 OR store.id:9687e697-4595-4a32-9ce9-89a5467575aa OR store.id:c24c1b9b-0b36-4fb8-ae92-89d163cc18bf OR store.id:0b49b7ca-feba-40fe-ad20-7604f427e450 OR store.id:4d7844af-198a-40e3-9f5f-4c041c886d57 OR store.id:f8e5a59a-c762-4b91-8c19-cd4c6f0a4c13 OR store.id:5184e6dd-8621-4fbe-bcac-637264eacf51 OR store.id:d4fa9edf-b21e-41c7-b429-77068d433c35 OR store.id:68617604-2eac-4198-94c2-3bd8624f6af3 OR store.id:50c65e83-7c97-4f11-9e91-f85b604b6c7e OR store.id:8267c958-b6df-4d2c-87a9-10d032a7d241 OR store.id:3d7dcda4-c226-4286-9df8-024659eead38 OR store.id:f92d161e-f1d5-4bcd-9924-319b211013ab OR store.id:a687ff4d-01c1-4f8b-a3fa-53d930e6a915 OR store.id:668e9118-2efd-4808-89dd-20c30b1ad11f OR store.id:7a35fa8b-657d-4647-8820-973f3360cd97 OR store.id:df0a39b7-82d5-434b-af97-e9ea9f991f52 OR store.id:5bf69fa5-01c3-49ed-9f4c-bbcf0ed96202 OR store.id:45f0a3d8-852d-4735-ad29-fedadc42ef2d OR store.id:49287495-f453-414a-8cac-b2517c5d2a36 OR store.id:805e0eca-4928-4859-9e9d-0467bcc79e42 OR store.id:478403f0-0c51-4ae5-a2e1-322bae30577e OR store.id:46775e64-1452-4d14-8849-d9da22fa33d1 OR store.id:bb08532f-39c2-4580-9c0f-2c621370a118 OR store.id:c8a377dc-4496-44ea-97f0-198d008d8043 OR store.id:2cfb1117-51ee-40b5-b428-aff05b612483 OR store.id:365eea82-4789-4015-8291-ecfda6f170cd OR store.id:bb9f6f04-2416-40a5-ab3f-d764d2cf71a2 OR store.id:066578a8-830a-4883-940a-11578f5a75a0 OR store.id:b7ad57e2-e433-4924-971a-c3ad7ff4c3c6 OR store.id:e4b7cc20-c3db-434a-a5ab-408d935c2df7 OR store.id:e5627f29-979f-4f5b-a948-0ee9a7656057 OR store.id:963b7e23-b78c-426b-897b-b0128d3af124 OR store.id:f35fbbd4-682b-4939-bc58-729bd7eeebf2 OR store.id:2fed182d-8bbd-45a9-8310-8ed59c2667a6 OR store.id:1b82a098-5e95-4b0d-92fc-95ccf938a0a6 OR store.id:d8712275-0b03-4e97-9199-644d5e863f3c OR store.id:15d8d34e-57c6-47c9-9ee1-1e4eb103e982 OR store.id:e59b0d53-a73c-4f7e-b19b-0144921777ae OR store.id:870b047e-1edd-437a-a715-93427d3d6a3b OR store.id:15fb41e6-c079-4c30-a57a-94877e62acb2 OR store.id:446e3444-604e-46a0-8e62-60bbbdad3221 OR store.id:0659ba86-fbd4-4077-a1c8-331aecf61769 OR store.id:a0aee84b-9ef8-4a6c-b0b7-55ff46ec9532 OR store.id:d7d33291-3677-4afe-bab7-95a7e653bc17 OR store.id:ab6db684-ec01-4b79-a8bf-2240787b5813 OR store.id:2d32b985-e29c-4800-98bc-83bee37a81b6 OR store.id:cb419f05-215e-4ddd-bd28-0e337067bc54 OR store.id:7dfd5ff0-3c44-4614-a24a-2c106a8a09a5 OR store.id:6ef6be94-a435-42d6-b59d-cc3e45cffb3f OR store.id:8e613c2f-d5b4-4965-bd53-1a786879f1f8 OR store.id:2170107b-4138-4e77-844e-d9b734eb6eb6 OR store.id:f1510385-25f5-4214-a3cb-0369b08a64fc OR store.id:1de7336d-aee1-4b88-818c-91cd03798d35 OR store.id:5e30ecc0-c0db-4982-aef9-f231fd779f81 OR store.id:d5cccb37-4427-4ea5-92f4-5b9c5f1d69f0 OR store.id:61d2dd70-986d-4f62-8035-048e011e98f2 OR store.id:1dfd31be-7981-4751-a3ae-cdbe7ef141f3 OR store.id:ac898c77-5942-4ac8-aa1b-c8d870f95c10 OR store.id:1670518e-18bc-4a24-bfeb-e1cdd29559bf OR store.id:12b486dd-87ae-4b41-aaa2-c8a4e15022d5 OR store.id:f1f20386-07e0-4f62-a53e-d3777dcd3e2f OR store.id:da3767f9-582c-4d11-91ec-5102abcee82d OR store.id:7f7f5bd3-1e6e-4888-be55-e562326e1692 OR store.id:97fbe339-77ba-46c8-81bf-7002c49234ed OR store.id:ae378548-1857-4e4a-a044-009c9c3c8901 OR store.id:5a058d9e-be31-4534-babd-ec68dcf46eaf OR store.id:0755739e-7220-4d2e-96e1-0c5b748a6e16 OR store.id:5c43ae25-4cac-4799-bc6e-c453b01f3735 OR store.id:c614d443-6baf-451f-a982-9cd22c3494b7 OR store.id:2eabe847-8970-4c51-8384-415e3a620a72 OR store.id:12ba940b-0bfb-4d1d-90df-e1a944148c64 OR store.id:f7d5e13d-583d-433d-9295-2574e3e9b4d1 OR store.id:424dd62f-65c3-48ec-b567-257bd2541373 OR store.id:bbc2b81f-0080-4df9-b75d-d77f6fc732fb OR store.id:73c3cc70-126a-46ca-bc98-19e970a2dfae OR store.id:5ab1e0ec-4184-4ff6-8374-14ba221acb8e OR store.id:f1dd75ac-1137-40b0-b240-cb690e9b4577 OR store.id:71f56bdc-508f-40c6-9cb3-f4b393777f0d OR store.id:84de9439-e4a9-44d0-8f10-fa875a1e01bc OR store.id:c4dd72cd-d3fc-4bd2-851f-704706425089 OR store.id:14ffa6d3-76b5-4e9c-a2bb-243d1718682b OR store.id:b7e49463-fec4-4b85-9bed-94c0447b712b OR store.id:16c5492d-9b89-4e0b-92ab-95dbcf77f1ef OR store.id:350c4a4e-24c2-46fd-84f1-9ae39a117a84 OR store.id:634b7537-9220-42e0-ac02-88237d512c70 OR store.id:857f2c07-0b43-42d6-b607-11a515c849d4 OR store.id:5f9698c0-7f86-467d-85a8-3f32653812a7 OR store.id:5ca12115-8c43-4efa-85bf-51bebcaa472e OR store.id:9b099454-4689-4bc9-875f-5ab865d10d1e OR store.id:523bb91a-f32f-4320-949a-8ce8aaf0b42b OR store.id:6cd5a9e0-7024-476c-b323-7659c295fb18 OR store.id:41fe3a03-520a-4b0e-af01-cb951a6346d0 OR store.id:0f29c0f3-5e4b-4428-beba-fbe0fb8c8d87 OR store.id:570c1c79-73ac-4208-9b8e-9a785938b956 OR store.id:6b2e4274-84d2-47d3-b915-9e956b0ff4d1 OR store.id:c84fe861-9fee-469e-ae0a-bb545034243f OR store.id:738ada3c-3e93-4884-b4ac-83a17aa8fc9b OR store.id:10cfdd56-c8c0-4fd6-9cf7-369f24d7d452 OR store.id:f8ab1401-f326-4f6e-ac9f-ac1b68375542 OR store.id:a9df9381-f120-4cc9-aa55-a922b4e4796a OR store.id:ec6f78ad-2fdb-4882-9a1c-2444c19dc23e OR store.id:dfd1ce6c-a4e3-4d5a-9723-d2eee46edd14 OR store.id:1bf4c357-6f25-4cb5-bfe7-f98eefb012d6 OR store.id:20751df4-15da-421f-8418-201984d917bf OR store.id:3ce85eb9-7d97-4a51-aa9c-a38d638851f9 OR store.id:427dbead-7b68-481e-ab25-e66acc415aa3 OR store.id:5a818903-4f99-4f88-98d7-92d8000787e0 OR store.id:54cd2721-41a1-4431-9260-3a0ce07fffeb OR store.id:888790ad-3f8a-4591-9c05-7af55fc6ed66 OR store.id:6146a83b-065c-4a89-b1f9-e6f6ce48b869 OR store.id:4c302606-2fc5-4a8f-a9f9-fd8bbfac1f4b OR store.id:cffc6ee5-e07b-4bdf-9c49-d221f7f6e602 OR store.id:3edad675-d19d-4f73-aca3-430565d4b2cf OR store.id:609a1203-4581-4798-8a4c-179dbf1df335 OR store.id:45dfffb8-2020-41bc-8b6f-3d5211f2e1ea OR store.id:0411f713-94d9-4afd-a6ef-3ff6e48f53b6 OR store.id:0bd69cf1-ef2e-472a-a430-3868c3ab9a69 OR store.id:a6c0876f-bc4a-47db-89ac-11e4b06d8be3 OR store.id:94e6062e-3e1b-4723-93d6-5bd30131b5cd OR store.id:37b92768-881e-400a-bfb5-82ddcb1f1889 OR store.id:621a5ace-471a-4b5f-a16c-8fbf818abbfd OR store.id:b78bc751-e44c-4eb4-95db-62819df4f680)

Given the length and complexity of this filter, I am concerned about potential performance issues and limitations. What is the maximum limit for a filter in Algolia, and are there more efficient ways to handle such large (personalized) filtering requirements?

Thanks.