How to search for a layer name in AGOL contents?

332
1
03-22-2022 03:19 AM
RobertBuckley1
Occasional Contributor

I have quite a few hosted layers in my AGOL. Probably around 100. I wanted to find all the layers which contained the work "grenze" (German for "Border")....and unless I put in the exact search term or when the layer does not start with the string "Grenze...." I do not get a hit. 

Is it so hard  for ESRI to program a usable search mechanism using wildcards or regex?

Tags (1)
0 Kudos
1 Reply
jcarlson
MVP Esteemed Contributor

Frankly, your example doesn't sound like typical search behavior. Searching the text "sale" in my org brings me all layers with "sale" anywhere in their title, descriptions, or tags.

You can also reference the REST docs to see other ways of more specifically searching for things. For example, searching "title:sale" will only return items which have the string "sale" somewhere in the title. This is equivalent to a "contains" or "ILIKE '%sale%'" query elsewhere.

Do you consistently see your search only do a "begins with" query? That seems like it shouldn't be happening.

The lack of wildcard support is a bit of a shame, though. But if you wanted to do a thorough search of your org's content, the Python API can provide you a bit more functionality.

- Josh Carlson
Kendall County GIS