Janaka Abeywardhana
01/15/2022, 2:49 PMfalse
)
My app broke 😅. The cause a breaking change in the client lib API introduced in v1.0.0-3. Seems like this change. I'm unblocked now but thought I'd share some details and check if I'm missing somewhere that tracks the js client API changes? it doesn't seen to mirror what on the docs site.
Since then collection('mycollectionname').retrieve()
returns a different type. It used to return as per the docs here. I'm using the SearchClient
and accessing the num_documents
property. In the PR I see references to a SearchOnlyCollection. I've not managed to find docs for this type. Am I missing something?Janaka Abeywardhana
01/15/2022, 2:55 PMfalse
. Even when the client instantiation config has sendApiKeyAsQueryParam: false,
Jason Bosco
01/15/2022, 4:50 PMSearchClient
does not expose a collection('name').retrieve()
method. It is meant to only allow searches on documents.
If you use Client
instead, you should see num_documents
like this:Jason Bosco
01/15/2022, 4:51 PMJason Bosco
01/15/2022, 4:57 PMJanaka Abeywardhana
01/15/2022, 4:59 PMJason Bosco
01/15/2022, 5:00 PMJason Bosco
01/15/2022, 5:01 PMJanaka Abeywardhana
01/15/2022, 9:55 PMJanaka Abeywardhana
01/16/2022, 7:20 PMsendApiKeyAsQueryParam
🙏