I want to display more than 1000 results. I used infinit scroll with :stack option but when i trying to get more than 1000 results stacked, i get an error
you can only fetch the 1000 hits for this query. You can extend the number of hits returned via the paginationLimitedTo index parameter or use the browse method. You can read our FAQ for more details about browsing: https://www.algolia.com/doc/faq/index-configuration/how-can-i-retrieve-all-the-records-in-my-index
I did not find how to use paginationLimitedTo :/
You can put it in the :query-parameters of the InstantSearch component: https://community.algolia.com/vue-instantsearch/components/index.html#usage
paginationLimitedTo can't be added to :query-parameters
https://www.algolia.com/doc/api-reference/api-parameters/paginationLimitedTo/?language=javascript.

Ah yes sorry, you need to do that at indexing time, not at search time, sorry I was a bit confused.
index.setSettings({
paginationLimitedTo: 5000
});
I tried this, but not working :/ I didn't find in vue-instantsearch docs how to set this. I got an error, setSettings is not a function. But this is normal here, i can't find setSettings in this file https://github.com/algolia/vue-instantsearch/blob/master/src/store.js. Is this option elsewhere implemented ?
import {
createFromAlgoliaCredentials,
createFromSerialized,
} from "vue-instantsearch";
const searchStore = createFromAlgoliaCredentials(
"----",
"----"
);
export default {
async asyncData({ context, route }) {
searchStore.indexName = "emoji";
searchStore.query = route.params.query ? route.params.query : "";
searchStore.setSettings({
paginationLimitedTo: 2000
});
searchStore.start();
await searchStore.waitUntilInSync();
return { serializedSearchStore: searchStore.serialize() };
}
[...]
}
index.setSettings is supposed to be done backend or on the dashboard, not in your frontend application; sorry for not being clear on that.
Thanks ! I just created a quick script to update my settings because i did not find where to update this on the dashboard. Is it available ?
var algoliasearch = require("algoliasearch");
var client = algoliasearch("---", "---");
var index = client.initIndex("emoji");
index.setSettings({
paginationLimitedTo: 2000
});
This is working for me :) !
perfect!
Hello,
Is paginationLimitedTo deprecated? First of all, I get this from VSCode:
Argument of type '{ paginationLimitedTo: number; }' is not assignable to parameter of type 'IndexSettings'.
Object literal may only specify known properties, and 'paginationLimitedTo' does not exist in type 'IndexSettings'.
I still tried to run it and it successfully updated my index:
...
attributesToHighlight: null,
paginationLimitedTo: 10000,
attributeForDistinct: null,
...
But when I do a query I get only 1000 results:
const query = {
query: '',
filters: '(inizioServizio:1262275200 TO 1356969600)',
hitsPerPage: 10000,
page: 0
};
personsIndex.search(query)
.then(resp => {
console.log(`Received ${resp.hits.length}/${resp.nbHits} from Algolia`);
})
>>> Received 1000/2491 from Algolia
That looks like an oversight in the typescript definitions instead. Could you send an email to [email protected] with exact replicatable code please so we can find what is going on in your case ?
index.setSettings is supposed to be done backend or on the dashboard, not in your frontend application; sorry for not being clear on that.
Hi, @Haroenv I am facing the same issue as if I try to use index.setSettings function it showing me its not error as index.setSetting is not a function can you please me how I can use this function.
You need to use the function in a node script, or you can set the setting with the dashboard @suryavanshi08
Thank you @Haroenv now it's working fine, I appreciate your reply. Thanks!
Most helpful comment
Thanks ! I just created a quick script to update my settings because i did not find where to update this on the dashboard. Is it available ?
This is working for me :) !