Location catalog by names, description #935
Replies: 4 comments 8 replies
-
I believe you have, thought in a slightly different context. It's definitely a good idea, and we've discussed supporting search by field such as public name or description, but reading your post I wonder if instead we should go a slightly different route and implement a more generic full text search. No idea at present how that would work, but seems a superior experience to all parties including the public. |
Beta Was this translation helpful? Give feedback.
-
+1 to this thread. We use a similar query (minus long_name and the 2nd base_location_id predicate) too. I remember some discussion about adding a multicolumn text index against the columns as IIRC the existing columns don't have indexes on the public name, map comments, long name, description, etc. |
Beta Was this translation helpful? Give feedback.
-
If I'm summarizing this issue correctly you'd like to be able to add LIKE expressions on: base_location_id, public_name, long_name, description. Is part of this issue to implement/expose a query like the one Michael posted above or just to make it possible to query/filter for similar data? The location catalog and timeseries catalog was changed not to long ago in a way that should make adding additional predicates really easy. Some of the existing predicates use REGEXP_LIKE. I'm not sure if any users use the power available but it was there. If we're going to be doing large amounts of these searches maybe REGEXP_LIKE should transition to LIKE instead. I know nothing about whats happening on the full-text search side of things. I'll need pointers on how to adapt the final queries if it requires anything above vanilla sql. |
Beta Was this translation helpful? Give feedback.
-
My first time reading through this issue I didn't appreciate that your SQL query made use of OR clauses. The suggestion for full-text-search now makes more sense. Perhaps a user-specified filter expression as suggested in #620 would be the best solution here. |
Beta Was this translation helpful? Give feedback.
-
I thought I'd brought this up before, but it may have only been in email or Teams discussions.
We at Northwestern Division have frequently-used database query tools whose workflow essentially starts with the user asking for locations and/or time series that match a string describing the project or gauge. For example, the user might type in "john day", which would return locations associated with the John Day lock and dam, the John Day river, and the town called John Day. It's very useful, since they don't need to know that the project itself is
JDA
, that it has 20 spillbays (JDA-SBxx
), 16 units (JDA-Uxx
), that its tailwater is calledJDAW
, or that it has a temperature string calledJDA_S1
, a RAWS station atJDFO
, an additional forebay gauge age atJDFW
, and a water quality gauge atJDY
. And they don't need to know the John Day river gauge names:DAYO
,JDMO
,JDOO
,JHAO
,JHAW
,JHNO
,JPGO
,KEEO
,MONO
,RTRO
,SERO
, andSFJO
. But all of these (with full names, lat/long) will be returned so they can sort out what it is they're actually interested in, data wise.I don't know of any way to do this sort of query with CDA, short of grabbing the metadata for every location by office and sorting through it locally. It would be seriously useful to be able to do this work on the database side instead.
For context, the SQL used to grab a list of locations using a query string
q
is:sometimes without the
AND loc_active_flag = 'T'
clause (it can be switched out by the enclosing function).Are there any plans to implement catalog functions by name and/or description?
Beta Was this translation helpful? Give feedback.
All reactions