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
96 stars 61 forks source link

geoportalsearch results does not list add to map for local geoportal2.x #116

Closed sukeshlaghate closed 4 years ago

sukeshlaghate commented 6 years ago

Hi I am using geoportal 2.5.1 with elastic search 5.6.4. I configured geoportalsearch widget for mapviewer by providing following in config.json

{
       "url": "http://localhost:8081/geoportal/rest/metadata/search",
       "name": "Local Geoportal",
       "gptversion":2
}

restarting geoportal and the geoportalsearch widget starts to list my local geoportal in the catalog dropdown. Following are the issues that I am facing

  1. When providing keywords it does not return any results. The same search when performed from search tab shows result with "addtomap" enabled. clicking the link adds the map in the map viewer

  2. when keywords field is kept empty and search is performed; It fetches and displays results with foot print however the result does not show "addtomap" link.

refer to attached screen shots geoportalsearch_withkeyword geoportalsearch_withoutkeyword searchpanel_withkeyword

Can anyone please help me in resolving the issue?

dawitkk commented 6 years ago

The widget is not working for me when I add this into the catalog config_geoportalsearch.json { "url": "http://localhost:8080/geoportal/rest/metadata/search", "name": "GP", "gptversion":2 } Any help is appreciated...

GISScience commented 5 years ago

@dawitkk You have to change https://github.com/Esri/geoportal-server-catalog/blob/master/geoportal/src/main/webapp/viewer/widgets/GeoportalSearch/views/SearchPane.js

and

https://github.com/Esri/geoportal-server-catalog/blob/master/geoportal/src/main/webapp/viewer/widgets/GeoportalSearch/common/QueryTask.js .

then it will work like a charm

dawitkk commented 5 years ago

@Devesh Kumar Thank you so much!

ghost commented 5 years ago

@dawitkk You have to change https://github.com/Esri/geoportal-server-catalog/blob/master/geoportal/src/main/webapp/viewer/widgets/GeoportalSearch/views/SearchPane.js

and

https://github.com/Esri/geoportal-server-catalog/blob/master/geoportal/src/main/webapp/viewer/widgets/GeoportalSearch/common/QueryTask.js .

then it will work like a charm

What exactly do you need to change to make this work?

dawitkk commented 5 years ago

@DeveshScientist Thank you sir!

dawitkk commented 5 years ago

@rmuellerjr replace old with these two files

ghost commented 5 years ago

Gottcha. Thanks