I'm trying to search through my org content by a date range and the query doesn't appear to work.
No errors, but no returned results either.
Any ideas?
gis = GIS(portal, username, password)
cm = ContentManager(gis)
#modified: [2018-01-01 TO 2018-05-09]
cmItems = cm.search(query = 'modified: [1514728800000 TO 1525788000000]', max_items = 1000)
Solved! Go to Solution.
Hi GIS Unit PSBA,
Try this code, it should work:
search_result = gis.content.search(query="modified: [1514728800000 TO 1525788000000]", max_items=1000)
Search_result
If Search_result outputs [ ] which is an empty list, this means there aren't any feature layers or items created between those dates.
I hope that helps.
Hi GIS Unit PSBA,
Try this code, it should work:
search_result = gis.content.search(query="modified: [1514728800000 TO 1525788000000]", max_items=1000)
Search_result
If Search_result outputs [ ] which is an empty list, this means there aren't any feature layers or items created between those dates.
I hope that helps.