-
Notifications
You must be signed in to change notification settings - Fork 38
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
Upload API should accepts any valid index name as input #183
Comments
This won't affect Region maps, since front end already have this validation in place. Is that mean, we need such restriction for Region map? We cannot rely on frontend validation. Customer request can hit the backend directly. |
@VijayanB The description poses 2 questions:
+1 on @heemin32 comment, we need to have validations at both the places but before we see where we need to put validation lets discuss on above 2 questions first. |
For question 2, yes, you can use it in cluster and document layers. In fact, this will make backend API generic and decoupled from Dashboards. We are extending the existing API to support more generic cases. |
@VijayanB I think it make sense, but as region maps older UI will also be supported in 2.5 release the check on the OSD will still remain. We need to make sure that we are removing that check also in this case. |
Is there other ways to identify index that was created by file upload without using the suffix now? |
Sorry it was not clear from description. Let me try to explain how it is handled now. From OpenSearch Dashboards 2.3 onwards, region map will call this API by adding suffix "-map" as index name. For ex: if user gives test-index, then OSD sends index name as test-index-map as input name. In the backend, this input is validated for suffix. This was added as extra validation to make sure that this API is used only for Region Maps. This "-map" suffix is required so that region map can ask list of index that ends with "-map" and suggest only those index for custom vector map. Now, we can leverage the same API to create an index for non-Region map use cases . Hence, i am proposing to remove this check only from backend. We still have to add "-map" suffix from OSD for Region map for older UI in-order to be available for Custom Vector Map. What changed now with this change? IMO, i don't think this breaks any backward compatibility. |
Thanks @VijayanB. It is clear for me now. Agree that we can remove the validation in backend side. One more question. In the new release, I assume we have another way to get a list of Custom Vector Map without relying on the "-map" suffix? |
@heemin32 We might be taking a different direction where going forward users can use any index with geospatial field types as custom vector map ( it is not finalized ) . We can also explore or revisit some other options on how to identify uploaded indices and only provide those as input for custom vector map. I believe this is scheduled for 2.6 release |
The needs to remove the validation from backend side is clear as it needs to be used by cases other than Custom Vector Map. We should have a better way to track a group of indices in OSD without relying on suffix. @VijayanB, could you create an issue in dashboards-maps repo? |
Feature is merged. |
Upload API accepts requests only when index name ends with -map. This was added because api was initially planned to call only by Region maps. With Maps from 2.5, the upload API should allow user to upload any valid GeoJSON with any acceptable valid index name ( no mandatory suffix ). This won't affect Region maps, since front end already have this validation in place.
The text was updated successfully, but these errors were encountered: