-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding document counts to the query API #16578
Comments
Can you propose a PR? |
I think having a count is useful specially if you need to create a pager. Is there a reason why this was rejected? Does all the search providers gives you a way to get a count without returning the list of contentItemId? |
From my understanding of OC,
The |
|
Should these be 3 distinct issues? |
We triaged this issue and set the milestone according to the priority we think is appropriate (see the docs on how we triage and prioritize issues). This indicates when the core team may start working on it. However, if you'd like to contribute, we'd warmly welcome you to do that anytime. See our guide on contributions here. |
Yes I couldn't agree more, in
Not at the moment, but I made a Jint-based
Yes, I added an |
The main point of bringing up this issue is to suggest that we check where we are calling queries that return collections instead of objects for subsequent extensions. Since it's the point in time when 2.0 is ready for release, and we've already done a lot of disruptive upgrades in OC 2.0, |
I had to write a custom controller to get the total results back (needed for paging!) Elastic and Lucene already include a total count in LuceneQueryResults and ElasticQueryResults. So the total on those is effectively free, we could include an optional total on SQL results. Most document databases are not that big, however mine has over 400k and returning a count on all published documents takes 900ms, and all of my biggest contenttype is 400ms. So expensive but I would never use SQL for those. public class LuceneQueryResults : IQueryResults
{
public IEnumerable<object> Items { get; set; }
public int Count { get; set; }
} |
Is your feature request related to a problem? Please describe.
Currently, some OC query APIs such as
LuceneQuery
,SqlQuery
andgraphQL Query
do not yet support statistical aggregation.Describe the solution you'd like
Lucene Query Elastic Search Query
These api's make it easy to implement statistics. We just need to refactor the graphQL provider associated with them. 2. SqlQuey In SqlQuery we should allow users to write SQL for statistical queries.
SqlQuey
In SqlQuery, we should allow the user to write SQL for statistical queries, perhaps with additional script fields, or some other better way of accomplishing this, and the current API doesn't seem to support it.
the script function
executeQuery
, whose return value is currently always a collection.Describe alternatives you've considered
If we can't implement these features anytime soon, I suggest that before the 2.0 release, we first return
IQueryResult
objects in all locations where we need to callqueryManager.ExecuteQueryAsync
to return data, instead of just returning the collection.The text was updated successfully, but these errors were encountered: