Especially e-commerce sites need to display more than 1000 records. For example a category has 5K+ products. There should be an option to increase this.
@tecmusti It may be that Algolia will do that in the nearfuture. This is an Algolia issue per se not instantsearch.js. Watch our blog for updates on this subject. Thanks!
@tecmusti I had the exact same requirement, and solved the issue within the help of Algolia team on StackOverflow. Please see my comment:
https://github.com/algolia/instantsearch.js/issues/2118#issuecomment-295772304
@Ardakilic eyvallah burda bir Türkü görmek güzel :) paginationLimitedTo seçeneğini yeni eklemişler sanırım. Ben javascript ile yapmaktansa php kütüphanesini kullandım. Search-Only API Key ile "Method not allowed with this API key" hatası aldım o nedenle Admin API Key ve php kullandım. Ayrıca her seferinde aynı değeri göndermene gerek kalmaz.
$client = new \AlgoliaSearch\Client('appID', 'Admin API Key');
$client->initIndex('index');
$client->setSettings(array('paginationLimitedTo'=>10000));
Bunu her index için bir defa yapmak gerekiyor.
Indeed @tecmusti, you need an Admin API key to do this, and you need to do this only once per index.
@Haroenv, thats what I described @Ardakilic in Turkish.
Yes, I translated it for future reference 👍
@tecmusti Eheh aynen :) Evet dediğin gibi o metod yeni eklendi, ama maalesef instantsearch.js'te doğrudan parametre olarak yollarsan çalışmıyor https://github.com/algolia/instantsearch.js/issues/2118#issuecomment-295781597 , custom client yapıp inject etmek lazım. ama instantsearch.js değil de orijinal API leri kullanırken dediğin gibi çalışıyor.
Instantsearch.js bizim yazılımımızda ön tarafta tüm ihtiyacımızı karışıyor, ve de sorgulamayı da client side'a JavaScript ile yükledim ben de. Kullanıcılar da diğer yönetim ekibi de durumdan ve hızından baya memnun oldu :) Backend ile sadece veri yolluyorum. Özel API key yapıp (ACL kısmından) sadece search ve browse işini yüklersen client side'da da çalışıyor o metod.
(Responding as confirming his idea, but saying to use it with instantsearch.js you need a custom client, setting it as setting doesn't work https://github.com/algolia/instantsearch.js/issues/2118#issuecomment-295781597 . Also I told the reasons I'm using Algolia on client side)
By the way, actually the Admin api key isn't a necessity for this. Especially if your key is inside a public JS file like instantsearch.js configuration file. I made a custom ACL api key with only with search and browse functions.
@Ardakilic Dün custom client ile denedim zaten ve şu an senin sitende de olan hatayı aldım. Bence bir daha kontrol et, belki sonradan kaldırmışlardır bunu. Zaten bir defa limiti yükselttin mi ikinci defa yapmana gerek yok. custom client bir nevi artık gereksiz duruma düşüyor.

@tecmusti özel api key oluşturman lazım read ve browse izinleri ile. ondan izin vermiyor. Şu an sistemimizde böyle kullanıyoruz.
@Ardakilic yukarıdaki resim senin sitenin (h * bi * m) konsolundadaki hata mesajı. Ayrıca bahsettiğin yöntem ile sadece bir index için limiti yükseltmiş oluyorsun. 1000den fazla ürünü olan bir kategoride sırala kısmından indexi değiştirirsen sonraki indexlerde tüm ürünlerin listelenmediğini görürsün. :wink:
@tecmusti Dediğin doğru, ardından index değiştirmeye bakmamıştık 👍 . dur soralım:
@Haroenv , @tecmusti has a point. There's yet an issue: This way (by injecting a custom client) we can overcome the limit for the default index, but when we change index to a replica (e.g: change sort by index_by_price_asc replica) the limit is still there. How do we get it then (when index is changed, use also the custom client provided while initializing) ?
Could everything be translated to English please, Google Translate isn't doing a good job :)
I think that's a separate issue, I opened #2125 for that. Feel free to leave a reproducible example and more information, thanks!
@Haroenv in short, @tecmusti realized this issue is still there even after injecting a custom client.
Well, as for default index, it works, but when you change using sortBySelector widget, because, index is changed to a replica index, the custom client doesn't work (because custom client is set to one index ).
So a feature like one of these is required
searchParameters should allow paginationLimitedTo parameter. ( Details: https://github.com/algolia/instantsearch.js/issues/2118#issuecomment-295781597 ) I'd prefer the second one which will be less overhaul overall.
@Haroenv Thanks for the new issue. I'll fill all the details right away!
@tecmusti The api key not allowed sorunu hem bizim hatamız, ama hep var. bir sonraki deployumuzda düzelteceğiz, sağolasın 👍 custom client'ta özel key, algolia client'ta read only key girmişiz. Eğer düzeltirsen o hata hep çıkıyor, Algolia tarafında ayrı bir bug o.
(Method not allowed with this api key issue is there regardless you change the api key or not.)
Also, just wrapped up everything in the comment of the new issue: https://github.com/algolia/instantsearch.js/issues/2125#issuecomment-296726527
@tecmusti Sorun çözüldü 🎉 SetSettings'i her bir index ve de ayrıca replika için bir sefer çalıştırman yeterli, ondan sonra client side api'de sorunsuz çalışıyor. Beneki hata api key de set settings izni olmamasıymış (önceki admin key ile denememden dolayı ayarlar kaydedilmiş). Her bir index ve replikada ayrı ayrı çalıştırmak lazımmış bunu (ayarı algolia.com panelde yok)
Heads-up in English:
The issue is resolved. Actually, you need to init a algoliasearch client, and set the settings for each index and replica "only once":
Something like this (JS example):
// This has to be run once for every index and replica
var customClient = algoliasearch(...); //Api key has to has a role for setting the settings
var customIndex = customClient.initIndex('index_to_be_increased_limit');
customIndex.setSettings({
paginationLimitedTo: 2000 //To show more than 1000 results
}, function(err, content) {
if (err) {
throw err;
}
});
This has to be run once for every index, after that it'll show results properly. This setting was not available in Algolia.com web interface.
Thank you for your time Algolia team and everyone who's investigated!
Most helpful comment
Could everything be translated to English please, Google Translate isn't doing a good job :)