When I use esri/arcgis/Portal to search for PortalItems, I specifically want to find Web Maps. When I try to provide "q":"Web Map", I get web mapping applications galore, and find no actual web maps. Is there a better way to discover web maps in Portal?
Solved! Go to Solution.
David,
The double quotes Kelly had are required.
Here is the full string:
q:'type:("web map" AND -"web mapping applications")'
David,
This is what you should use:
q=type:"web map"&t=content&focus=maps
Thanks for your response!
It looks like you've provided parameters for some sort of REST call. I may have to go that route, but I am trying to use the esri/arcgis/Portal class provided in the Javascript API. The "q" I was referring to was the parameter to the queryItems method on that Portal object. There don't appear to be "t" or "focus" parameters to that particular method.
David,
Adding this to the q: parameter for the portal object seems to work for me:
'type:"web map"&t=content&focus=maps'
Sorry, I didn't realize I could do that. thanks!
I believe I spoke too soon. I actually do get back results for Web Maps, but I still get Web Mapping Applications which I do not want.
Try adding the following to filter out Web Mapping Applications
-type: "Web Mapping Application"
Thanks for your help. It doesn't seem to work. Depending on how I try this
-type:Web Mapping Application
type:-Web Mapping Application
type: -Web -Mapping -Application
I can't make it filter out the web mapping applications while leaving the web maps. I seem to be missing the way that these filters actually work, since it appears to give me arbitrary results. Either it filters everything, (no results) or greatly limits the returned items, but mostly leaves out the web maps.
The documentation for the REST API is not clear on how AND, OR, +, -, NOT, wildcards, etc. work. It says that the default is AND, but this does not seem to be the case, since it seems to find the word "map" and then includes anything that includes the single word, not just those that contain "web map". Or, maybe it includes automatic wildcards? Since the search term "map" finds "mapping". Possibly it searches all default fields instead of just the field I specify ("type", in this case). Can you shed some light on how this search actually works (or how it's supposed to work, at least)?
David,
The double quotes Kelly had are required.
Here is the full string:
q:'type:("web map" AND -"web mapping applications")'
Sorry, I guess I'm not good at picking up the little details. This did work for me!