Im currently using a elasticsearch connection to retrieve the data for my flexmonster integration, the problem is, that i got to much records in my elasticsearch and the request takes a good chunk of time on delivering the information, there is any way of improving this requests? currently gettin 200,000k records just for 1 field.
Thank you for reaching out to us.
Our team kindly suggests trying the following:
One way to decrease the server’s response is to prefilter the data and return only the part necessary for the specific report.
We would like to mention that the subquery parameter allows setting the server-side filter, which helps decrease the size of the response from the server.
Please note that for the Elasticsearch data source type, the
subquery parameter should be set as a Bool Query Object.
Flexmonster provides the possibility to set default report settings, specifying how to display the data initially.
This way, you can provide the desired starting points for the reports (for example, specifying which fields to display, applying an initial filter to the fields, etc.) and, in return, decrease the size of the response from the server.
We have a section in our documentation with examples on how to configure the report. Please see https://www.flexmonster.com/doc/configuring-report/.
Please let us know if this helps.
Thanks for your reply Vera. Im already using reports to filter the data but the size and performance of the response isn’t changing, for example there is a total of 180,000 companys i need to get, i create a query so i only use 80,000 of these but when its loading, it request the 180,000 companys first and then it filters them. I am doing this wrong? this is my code for the report.
Do i need to use query instead of member?
Do you use a “subquery” in the datasource ?
Thank you for your response.
Flexmonster first requests all unique entries of a field to display them in the filter pop-up. Then the query for displaying the specified report is initiated, and the required filters are applied. It seems in your case, there are 180,000 unique company names, and this is why all 180,000 are requested at first.
This can be adjusted by specifying the
subquery property in the Data Source object.
Here is an example of how
subquery could be used to decrease the server’s response:
"Category.keyword": ["Bikes", "Accessories"],
"Color.keyword": ["blue", "red"]
As a result, only the specified members will be loaded as opposed to loading all of them.
We have prepared a JSFiddle example for illustration: https://jsfiddle.net/flexmonster/fo2kj4hw/.
Please let us know if this works fine for you.
Thank you for your question.
subquery is part of the Data Source object.
Please let us know if the provided example helps.
Going to test it, Thanks for your response, i will keep you updated
Thank you this is the example i was looking for