Closed schwarmco closed 10 months ago
cc @sanikolaev - is there a documentation for the complete json-api schema?
Please see https://manual.manticoresearch.com/Openapi#OpenAPI-specification
Let me know what are your thoughts on this
Calling @Nick-S-2018 to advise on this.
I'd be happy to contribute to this library (e.g. creating a PR with the updated types for aggs and expressions and updating the test cases) but there seems to be a lot of things not being right yet. The PR https://github.com/manticoresoftware/manticoresearch-typescript/pull/2 of @mannol tidies up some things though.
Sure thing we accept PRs. Any contribution will be highly appreciated.
Thanks @sanikolaev for pointing to the OpenAPI specs which actually pointed me to the whole OpenAPI-based client generation repo (https://github.com/manticoresoftware/openapi) - so PRs should probably go there?!
anyway, it seems the OpenAPI spec itself is incorrect, specifying aggs
and expressions
as an array:
https://github.com/manticoresoftware/openapi/blob/master/manticore.yml#L625-L632
so PRs should probably go there?!
Yes.
anyway, it seems the OpenAPI spec itself is incorrect, specifying aggs and expressions as an array:
I'll check with the team on this.
Edit: After further testing, it turns out, that some types (i tried to use) are incorrect - here are failing test cases:
which results in this error on manticoresearch 6.2.12:
According to the documentation, the schema should look like this instead:
cc @sanikolaev - is there a documentation for the complete json-api schema?
While creating these test cases i've also stumbled upon some issues (or at least "you have to know"s) when migrating from the javascript library:
works in the javascript library, but throws this error in typescript:
because the
rawResponse
option defaults totrue
in javascript, butfalse
in typescript.I'd be happy to contribute to this library (e.g. creating a PR with the updated types for
aggs
andexpressions
and updating the test cases) but there seems to be a lot of things not being right yet. The PR #2 of @mannol tidies up some things though.Let me know what are your thoughts on this, if you accept PRs and how to contribute.
I want to order a facet result by the document counts to get my "most used buckets" like its described here: https://manual.manticoresearch.com/Searching/Faceted_search#Ordering-in-facet-resultCurrently the Aggregation-Type only hasname
,field
andsize
.