This message was deleted.
# community-help
s
This message was deleted.
j
May I know how many records the collection has, and the total number of records matched by the query (the
found
parameter in the API response)
Could you also share the search query with all the search parameters you're using?
y
total found is ~539k, similar to how many total records there are in the collection. Here is our query:
Copy code
{
  q: '*',
  filter_by: 'address_state:!=[`AL`]',
  page: 1,
  per_page: 25,
  query_by: 'company_name, contact_names, phone_numbers, website, organization_company_statuses',
  sort_by: 'number_of_enriched_fields:desc,company_display_name:asc',
  typo_tokens_threshold: 0,
  drop_tokens_threshold: 0
}
We’re going to try upgrading to high availability and seeing if that helps (also think we need it in production anyways). If we do upgrade from single-node to multi-node, should we do that in off hours because it will bring our services down?
j
Since you're only using filter_by (and not keyword search), you can use the documents/export endpoint which supports filter_by: https://typesense.org/docs/0.25.0/api/documents.html#export-documents
This will return the full dataset without pagination
if we do upgrade from single-node to multi-node, should we do that in off hours because it will bring our services down?
Correct. The first time you enable HA, you will experience downtime
y
ok, thanks @Jason Bosco. this is helpful. It looks like export does not have any way to limit or paginate, is that correct? it will always just return the full dataset?
j
That's correct
On a side note, it looks like there's a constant stream of writes coming into your cluster, which is consuming about 50-60% of the available 2vCPU capacity. That could be another reason that searches are a bit slow.
y
got it. Yea, we’re constantly updating our data set…i’ll play around with that as well. thanks for all of the help, we sincerely appreciate it
👍 1
j
Is it possible to call documents.export() with search parameters q or query_by in addition to filter_by? I would like to export all the IDs of relevant search results
j
This is not possible to do at the moment. Could you create a Github issue for it?
j
Sure thing! Thanks Jason
The number of records I want to iterate through isn’t crazy (less than 10K) - so I think @Yoshi Gillaspie’s 250 record pagination solution should be viable until this feature is implemented. It’s for an export feature, so performance isn’t a huge concern