USACE / cwms-data-api

Corps Water Management System RESTful Data Service
MIT License
11 stars 14 forks source link

Provide for searching by public or long name in catalog #288

Open MikeNeilson opened 1 year ago

MikeNeilson commented 1 year ago

While typing up a searching for data guide I realized a lot of our location names are abbreviations that a lot of people may not be familiar with.

The catalog should allow searching by public or long name.

adamkorynta commented 1 year ago

Location kind would be helpful too given hec-cwms-data-access provides a retrieval method by kind: https://bitbucket.hecdev.net/projects/CWMS/repos/hec-cwms-data-access/browse/hec-db-jdbc/src/main/java/wcds/dbi/oracle/cwms/CwmsLocationJdbcDao.java#446

rma-rripken commented 11 months ago

I recently worked on the Location Catalog. There are currently 4 optional regex filters. The method signature is getting a little out of hand. I suggest we change the Location Dao interface so that it has a single Map<String, String> of regex filters where the Key is the name of the field and the value is the regex. Then we wouldn't have to change the Dao each time we want to add another potential regex filter. In the Dao we can loop over all the filters entries and add a condition for each filter that was specified. It would be fairly easy to add a filter for every String field in LocationCatalogEntry if we wanted.

rma-rripken commented 11 months ago

Actually, maybe we should add filters for the boolean and double fields as well. For example, being able to query for locations inside a geographic box could be very useful and would be easy to implement.

MikeNeilson commented 11 months ago

Agreed. And I'm quite sure that particular feature (geographic box) will be asked for soon.

rma-rripken commented 2 months ago

The Location catalog was recently changed to add CatalogRequestParameters and that means it would now be fairly easy to add filters for public-name or long-name on location. I envision similar changes for the timeseries catalog but that has not been done yet.

MikeNeilson commented 2 months ago

If more people start asking we'll knock the priority up.