Esri / geoportal-server-catalog

Esri Geoportal Server is a next generation open-source metadata catalog and editor, based on elasticsearch.
https://www.esri.com/en-us/arcgis/products/geoportal-server/overview
Apache License 2.0
100 stars 62 forks source link

How To Control Data Ingestion on save click of Metadata forms #209

Closed GISScience closed 5 years ago

GISScience commented 6 years ago

Hi, I Have a urgent requirement of saving the ISO-19115 metadata in DocumentTypeA19115 of Elastic Search and ISO-19119 metadata in DocumentTypeB19119 of Elastic Search. For that i have to custimize the onclick event of Save button in metadata forms.

I have seen PrimaryToolbar.js and Priamrytoolbarmixing.js but didnot get any clue. Please help me with this issue?

What is the flow when metadata is getting save in index.is it Validation >> conversion to xml >> Xml to json and finally json is getting saved in Elastic Search Index.

and is it possible to access data simultaneously from two index of datatype in geoportal 2.5.1?

GISScience commented 6 years ago

save click of metadata forms will call the functions which are there in primary_toolbar and primary tollbar mixing. Elastic Search's only one document type i am using to ingest all the data and control it with user access. but still if we want to add two document type in elastic search then it very difficult to mange because document type "item" is hard coded in the code.

mhogeweg commented 5 years ago

There is no reason to save these two metadata specs in different document types in elastic in order to distinguish between them. If you check out http://geoss.esri.com/geoportal2/# you will see a filter based on metadata type. there you will see different metadata schemas listed (fgdc, iso19115, iso19115-2, etc) all within a single document type in the index.

GISScience commented 5 years ago

Hi,

I have migrated to Geoportal 2.6.1 and elastic search 6.4

I want only iso type of metadata to be store in different index other then metadata/item. So i have created two index 1.- metadata/item 2.- otherindex/othertype Changing _executeSave()and _loadXML() in MetadataEditor doesnot helps and getting "error resource not found" and "invalid json at 0". everything is working fine if data ingested in metadata/item.

@mhogeweg Please Help me with this issue.

mhogeweg commented 5 years ago

why would you do this? the item in elastic = the indexed elements of the metadata. The metadata itself is included as one of the json attributes. elastic stores its content in json, so you would need to translate the XML to json anyway. that is basically then doing what geoportal already does. can you explain what requirement/use case is driving this?

GISScience commented 5 years ago

use case we have is : - Store every metadata type in difference index in elastic search , because we have lakhs of records for each metadata type(iso,gimini etc.).

Ingesting them in different index in elastic search will reduce search time significant. My metadata/item index is very bulky and performance has reduced drastically. i have changed swagger.json and config file but no luck.

Is it possible to store different metadata type (iso,gimini etc.) into different index of elastic search using geoportal??

@mhogeweg thanks in advance.

mhogeweg commented 5 years ago

Instead of splitting metadata yourself you should let elastic do that. For large catalogs you can set up a multi-node elastic instance. That is how elastic scales and that is the precise reason we switched from lucene to elastic!

Marten Hogeweg Esri

On Jan 28, 2019, at 10:39 AM, Devesh Kumar notifications@github.com<mailto:notifications@github.com> wrote:

use case we have is : - Store every metadata type in difference index in elastic search , because we have lakhs of records for each metadata type(iso,gimini etc.).

Ingesting them in different index in elastic search will reduce search time significant. My metadata/item index is very bulky and performance has reduced drastically. i have changed swagger.json and config file but no luck.

Is it possible to store different metadata type (iso,gimini etc.) into different index of elastic search using geoportal??

@mhogeweghttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_mhogeweg&d=DwMFaQ&c=n6-cguzQvX_tUIrZOS_4Og&r=4GM91f93U12aQCXh4E4BVG6rpQ9cERcX5kLsbSqdwJg&m=Hmx0pZpCMesxcDQpXmxW404ii0HQrhsGXK2FeBmkDw8&s=AsNygDgaJZqDUcuKmPYOG21yP-uERoNE27arwsRSdT8&e= thanks in advance.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_Esri_geoportal-2Dserver-2Dcatalog_issues_209-23issuecomment-2D458179861&d=DwMFaQ&c=n6-cguzQvX_tUIrZOS_4Og&r=4GM91f93U12aQCXh4E4BVG6rpQ9cERcX5kLsbSqdwJg&m=Hmx0pZpCMesxcDQpXmxW404ii0HQrhsGXK2FeBmkDw8&s=iG_wwYimlRs6tcB8OeH04OXlPqN7UDgoT7ClmRZ-tfc&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AAYGiqoFDMkEye7veTHotlk56-5FCeBM5qks5vHxmwgaJpZM4XVBI7&d=DwMFaQ&c=n6-cguzQvX_tUIrZOS_4Og&r=4GM91f93U12aQCXh4E4BVG6rpQ9cERcX5kLsbSqdwJg&m=Hmx0pZpCMesxcDQpXmxW404ii0HQrhsGXK2FeBmkDw8&s=V4vE7AWY-f4IVR0Wf4IkDdfrSRw4XyCrGB-QNrgOCFo&e=.

GISScience commented 5 years ago

Thanks for reply,

if we make multi-node elastic instance, then elastic search endpoint will becomes a security concern. anyone will able to access elastic search endpoint(not with geoporal) like myserver:9200/metadata/item/delete? and can delete my data.

we are not using xpack for elastic search security.

now we have different index on each server and mapped to localhost:9200/metadata/item/ .

Thanks Devesh Kumar