{"id":702822,"date":"2020-01-21T14:18:22","date_gmt":"2020-01-21T22:18:22","guid":{"rendered":"https:\/\/www.esri.com\/arcgis-blog\/?post_type=blog&#038;p=702822"},"modified":"2020-01-21T15:37:49","modified_gmt":"2020-01-21T23:37:49","slug":"customize-feature-search-web-maps-python","status":"publish","type":"blog","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/apps\/field-mobility\/customize-feature-search-web-maps-python","title":{"rendered":"Customize feature search in web maps using Python"},"author":5701,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"_acf_changed":false,"_searchwp_excluded":""},"categories":[23261],"tags":[541282,24341,27581],"industry":[],"product":[36591,36641,36661],"class_list":["post-702822","blog","type-blog","status-publish","format-standard","hentry","category-field-mobility","tag-feature-search","tag-python","tag-search","product-apps","product-collector","product-explorer"],"acf":{"short_description":"Asset search is supported in many apps. Search is configured as part of the web map, and its configuration can be automated using Python.","flexible_content":[{"acf_fc_layout":"content","content":"<p>You can search for your assets in ArcGIS Online and ArcGIS Enterprise, and those searches are honored in Collector, Explorer, and other apps. To configure these searches, use ArcGIS Online or ArcGIS Enterprise and configure the settings for your map. But what if you want the same search to be used by a set of maps with the same layer, or want to make other search changes across multiple maps without having to make the update for each map individually?<\/p>\n<p>Use Python to automate configuring search. You can configure various components, including the search hint text, as well as what layers and fields are searched. Let\u2019s look at how.<\/p>\n"},{"acf_fc_layout":"content","content":"<h2>Search a feature layer<\/h2>\n<p>Supporting feature search allows your users to find the assets they need to work with. For example, they might want to search hydrants by their asset IDs.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":708132,"id":708132,"title":"FeatureSearchWithHint-optimized","filename":"FeatureSearchWithHint-optimized.gif","filesize":1179156,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/01\/FeatureSearchWithHint-optimized.gif","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/apps\/field-mobility\/customize-feature-search-web-maps-python\/featuresearchwithhint-optimized","alt":"Feature search with hint text","author":"5701","description":"","caption":"","name":"featuresearchwithhint-optimized","status":"inherit","uploaded_to":702822,"date":"2020-01-21 22:13:55","modified":"2020-01-21 22:14:19","menu_order":0,"mime_type":"image\/gif","type":"image","subtype":"gif","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":300,"height":517,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/01\/FeatureSearchWithHint-optimized-213x200.gif","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/01\/FeatureSearchWithHint-optimized.gif","medium-width":151,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/01\/FeatureSearchWithHint-optimized.gif","medium_large-width":300,"medium_large-height":517,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/01\/FeatureSearchWithHint-optimized.gif","large-width":300,"large-height":517,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/01\/FeatureSearchWithHint-optimized.gif","1536x1536-width":300,"1536x1536-height":517,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/01\/FeatureSearchWithHint-optimized.gif","2048x2048-width":300,"2048x2048-height":517,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/01\/FeatureSearchWithHint-optimized-270x465.gif","card_image-width":270,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/01\/FeatureSearchWithHint-optimized.gif","wide_image-width":300,"wide_image-height":517}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p>For an individual map, this can be configured in the web map settings.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":705522,"id":705522,"title":"1-featureSearchSettingsInWebMap","filename":"1-featureSearchSettingsInWebMap.png","filesize":15657,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/01\/1-featureSearchSettingsInWebMap.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/apps\/field-mobility\/customize-feature-search-web-maps-python\/1-featuresearchsettingsinwebmap","alt":"Feature search settings in the web map","author":"5701","description":"","caption":"","name":"1-featuresearchsettingsinwebmap","status":"inherit","uploaded_to":702822,"date":"2020-01-16 19:11:24","modified":"2020-01-16 19:12:19","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":622,"height":383,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/01\/1-featureSearchSettingsInWebMap-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/01\/1-featureSearchSettingsInWebMap.png","medium-width":424,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/01\/1-featureSearchSettingsInWebMap.png","medium_large-width":622,"medium_large-height":383,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/01\/1-featureSearchSettingsInWebMap.png","large-width":622,"large-height":383,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/01\/1-featureSearchSettingsInWebMap.png","1536x1536-width":622,"1536x1536-height":383,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/01\/1-featureSearchSettingsInWebMap.png","2048x2048-width":622,"2048x2048-height":383,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/01\/1-featureSearchSettingsInWebMap.png","card_image-width":622,"card_image-height":383,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/01\/1-featureSearchSettingsInWebMap.png","wide_image-width":622,"wide_image-height":383}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"sidebar","content":"<p>In Collector, mobile workers can even scan barcodes to search, so you could create barcodes with asset IDs for them to scan.<\/p>\n","image_reference":false,"layout":"standard","image_reference_figure":"","snippet":"","spotlight_name":"","section_title":"","position":"Right","spotlight_image":false},{"acf_fc_layout":"content","content":"<p>You can also add feature search using Python. You might be adding feature search to the map, adding it to an additional layer, or even adding it to an additional field in a layer that\u2019s already searchable. No matter which scenario applies to you, you can accomplish it using Python.<\/p>\n<p>In the function below, you pass in a <code>WebMap<\/code>, the URL for the layer you want to search, the name of the field to search, if it should be an exact match, and the type of field.<\/p>\n"},{"acf_fc_layout":"content","content":"<p><code>add_layer_search(webmap_item, layer_url, 'Facility Identifier', True, 'esriFieldTypeInteger')<\/code><\/p>\n"},{"acf_fc_layout":"content","content":"<p>This function updates the map so that the layer is searchable.<\/p>\n<details>\n<summary>Expand to see `add_layer_search` function code<\/summary>\n<div style=\"font-size: .8em; background: #f8f8f8; overflow: auto; width: auto; border: solid gray; border-width: .1em .1em .1em .8em; padding: .2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #008000; font-weight: bold;\">def<\/span> <span style=\"color: #0000ff;\">add_layer_search<\/span>(webmap_item, layer_url, field_name, exact_match, esri_field_type):\r\n    json_data <span style=\"color: #666666;\">=<\/span> webmap_item<span style=\"color: #666666;\">.<\/span>get_data()\r\n    <span style=\"color: #008000; font-weight: bold;\">if<\/span> <span style=\"color: #ba2121;\">'applicationProperties'<\/span> <span style=\"color: #aa22ff; font-weight: bold;\">not<\/span> <span style=\"color: #aa22ff; font-weight: bold;\">in<\/span> json_data:\r\n        <span style=\"color: #008000; font-weight: bold;\">print<\/span>(<span style=\"color: #ba2121;\">\"Bad JSON -- OOPS!\"<\/span>)\r\n        <span style=\"color: #008000; font-weight: bold;\">return<\/span>\r\n\r\n    app_properties_viewing <span style=\"color: #666666;\">=<\/span> json_data[<span style=\"color: #ba2121;\">'applicationProperties'<\/span>][<span style=\"color: #ba2121;\">'viewing'<\/span>]\r\n\r\n    <span style=\"color: #408080; font-style: italic;\"># Get the ID of the layer to search, based on the URL you know it has<\/span>\r\n    webmap <span style=\"color: #666666;\">=<\/span> WebMap(webmap_item)\r\n    layers <span style=\"color: #666666;\">=<\/span> webmap<span style=\"color: #666666;\">.<\/span>layers\r\n    layer_id <span style=\"color: #666666;\">=<\/span> <span style=\"color: #008000;\">None<\/span>\r\n    <span style=\"color: #008000; font-weight: bold;\">for<\/span> layer <span style=\"color: #aa22ff; font-weight: bold;\">in<\/span> layers:\r\n        <span style=\"color: #008000; font-weight: bold;\">if<\/span> layer<span style=\"color: #666666;\">.<\/span>url <span style=\"color: #666666;\">==<\/span> layer_url:\r\n            layer_id <span style=\"color: #666666;\">=<\/span> layer<span style=\"color: #666666;\">.<\/span>id\r\n\r\n    <span style=\"color: #008000; font-weight: bold;\">if<\/span> layer_id <span style=\"color: #aa22ff; font-weight: bold;\">is<\/span> <span style=\"color: #008000;\">None<\/span>:\r\n        <span style=\"color: #008000; font-weight: bold;\">print<\/span>(<span style=\"color: #ba2121;\">'Layer URL not found: '<\/span> <span style=\"color: #666666;\">+<\/span> layer_url, end<span style=\"color: #666666;\">=<\/span><span style=\"color: #ba2121;\">'<\/span><span style=\"color: #bb6622; font-weight: bold;\">\\n\\n<\/span><span style=\"color: #ba2121;\">'<\/span>)\r\n        <span style=\"color: #008000; font-weight: bold;\">return<\/span>\r\n\r\n    <span style=\"color: #408080; font-style: italic;\"># if there isn't feature search defined, add the property with the defaults so that the next section can add the layer info<\/span>\r\n    <span style=\"color: #008000; font-weight: bold;\">if<\/span> <span style=\"color: #ba2121;\">'search'<\/span> <span style=\"color: #aa22ff; font-weight: bold;\">not<\/span> <span style=\"color: #aa22ff; font-weight: bold;\">in<\/span> app_properties_viewing:\r\n        search_property <span style=\"color: #666666;\">=<\/span> {<span style=\"color: #ba2121;\">'enabled'<\/span>: <span style=\"color: #008000;\">True<\/span>, <span style=\"color: #ba2121;\">'disablePlaceFinder'<\/span>: <span style=\"color: #008000;\">False<\/span>, <span style=\"color: #ba2121;\">'hintText'<\/span>: <span style=\"color: #ba2121;\">'Place or Address'<\/span>, <span style=\"color: #ba2121;\">'layers'<\/span>: [{<span style=\"color: #ba2121;\">'id'<\/span>: layer_id, <span style=\"color: #ba2121;\">'field'<\/span>: {<span style=\"color: #ba2121;\">'name'<\/span>: field_name, <span style=\"color: #ba2121;\">'exactMatch'<\/span>: exact_match, <span style=\"color: #ba2121;\">'type'<\/span>: esri_field_type}}]}\r\n        app_properties_viewing[<span style=\"color: #ba2121;\">'search'<\/span>] <span style=\"color: #666666;\">=<\/span> search_property\r\n        webmap_item<span style=\"color: #666666;\">.<\/span>update(data <span style=\"color: #666666;\">=<\/span> json<span style=\"color: #666666;\">.<\/span>dumps(json_data))\r\n\r\n    <span style=\"color: #408080; font-style: italic;\"># else if there is already a feature search defined, add a layer to that search<\/span>\r\n    <span style=\"color: #008000; font-weight: bold;\">elif<\/span> <span style=\"color: #ba2121;\">'search'<\/span> <span style=\"color: #aa22ff; font-weight: bold;\">in<\/span> app_properties_viewing:\r\n        search_layers_property <span style=\"color: #666666;\">=<\/span> app_properties_viewing[<span style=\"color: #ba2121;\">'search'<\/span>][<span style=\"color: #ba2121;\">'layers'<\/span>]\r\n        new_layer <span style=\"color: #666666;\">=<\/span> {<span style=\"color: #ba2121;\">'id'<\/span>: layer_id, <span style=\"color: #ba2121;\">'field'<\/span>: {<span style=\"color: #ba2121;\">'name'<\/span>: field_name, <span style=\"color: #ba2121;\">'exactMatch'<\/span>: exact_match, <span style=\"color: #ba2121;\">'type'<\/span>: esri_field_type}}\r\n        search_layers_property<span style=\"color: #666666;\">.<\/span>append(new_layer)\r\n        webmap_item<span style=\"color: #666666;\">.<\/span>update(data <span style=\"color: #666666;\">=<\/span> json<span style=\"color: #666666;\">.<\/span>dumps(json_data))\r\n<\/pre>\n<\/div>\n<\/details>\n<p>&nbsp;<\/p>\n"},{"acf_fc_layout":"content","content":"<h2>Provide hint text<\/h2>\n<p>Use the hint text for your search to let users know what they can search for to find your assets. For example, if you added the hydrant ID, include that in the search hint.<\/p>\n<p>For an individual map, this can be configured in the web map settings.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":705502,"id":705502,"title":"2-featureSearchHintTextSettingInWebMap","filename":"2-featureSearchHintTextSettingInWebMap.png","filesize":12188,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/01\/2-featureSearchHintTextSettingInWebMap.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/apps\/field-mobility\/customize-feature-search-web-maps-python\/2-featuresearchhinttextsettinginwebmap","alt":"Hint text setting in the web map","author":"5701","description":"","caption":"","name":"2-featuresearchhinttextsettinginwebmap","status":"inherit","uploaded_to":702822,"date":"2020-01-16 19:11:20","modified":"2020-01-16 19:11:44","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":618,"height":282,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/01\/2-featureSearchHintTextSettingInWebMap-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/01\/2-featureSearchHintTextSettingInWebMap.png","medium-width":464,"medium-height":212,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/01\/2-featureSearchHintTextSettingInWebMap.png","medium_large-width":618,"medium_large-height":282,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/01\/2-featureSearchHintTextSettingInWebMap.png","large-width":618,"large-height":282,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/01\/2-featureSearchHintTextSettingInWebMap.png","1536x1536-width":618,"1536x1536-height":282,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/01\/2-featureSearchHintTextSettingInWebMap.png","2048x2048-width":618,"2048x2048-height":282,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/01\/2-featureSearchHintTextSettingInWebMap.png","card_image-width":618,"card_image-height":282,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/01\/2-featureSearchHintTextSettingInWebMap.png","wide_image-width":618,"wide_image-height":282}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p>If you want to customize the hint text for multiple maps, you can configure it using Python. In this code, you provide the new hint text and the map is updated with it.<\/p>\n<details>\n<summary>Expand to see the code to check if a layer has search configured, and if so, provide hint text<\/summary>\n<div style=\"font-size: .8em; background: #f8f8f8; overflow: auto; width: auto; border: solid gray; border-width: .1em .1em .1em .8em; padding: .2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%;\">webmap_item <span style=\"color: #666666;\">=<\/span> webmap_item_with_search\r\njson_data <span style=\"color: #666666;\">=<\/span> webmap_item<span style=\"color: #666666;\">.<\/span>get_data()\r\napp_properties_viewing <span style=\"color: #666666;\">=<\/span> json_data[<span style=\"color: #ba2121;\">'applicationProperties'<\/span>][<span style=\"color: #ba2121;\">'viewing'<\/span>]\r\n\r\n<span style=\"color: #008000; font-weight: bold;\">if<\/span> (<span style=\"color: #ba2121;\">'search'<\/span> <span style=\"color: #aa22ff; font-weight: bold;\">in<\/span> app_properties_viewing):\r\n    layer_search_property <span style=\"color: #666666;\">=<\/span> app_properties_viewing[<span style=\"color: #ba2121;\">'search'<\/span>]\r\n    hint_text <span style=\"color: #666666;\">=<\/span> {<span style=\"color: #ba2121;\">'hintText'<\/span>: <span style=\"color: #ba2121;\">'My search-specific hint text'<\/span>}\r\n    layer_search_property<span style=\"color: #666666;\">.<\/span>update(hint_text)\r\n    webmap_item<span style=\"color: #666666;\">.<\/span>update(data <span style=\"color: #666666;\">=<\/span> json<span style=\"color: #666666;\">.<\/span>dumps(json_data))\r\n<\/pre>\n<\/div>\n<\/details>\n<p>&nbsp;<\/p>\n"},{"acf_fc_layout":"content","content":"<h2>Disable place search<\/h2>\n<p>What if you want your mobile workers to always find assets by the IDs for which you\u2019ve enabled searching, and you don\u2019t want them searching for generic places or addresses? You can disable place search in the map\u2019s settings:<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":705512,"id":705512,"title":"3-featureSearchByAddressSettingInWebMap","filename":"3-featureSearchByAddressSettingInWebMap.png","filesize":15072,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/01\/3-featureSearchByAddressSettingInWebMap.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/apps\/field-mobility\/customize-feature-search-web-maps-python\/3-featuresearchbyaddresssettinginwebmap","alt":"By Address setting in the web map","author":"5701","description":"","caption":"","name":"3-featuresearchbyaddresssettinginwebmap","status":"inherit","uploaded_to":702822,"date":"2020-01-16 19:11:22","modified":"2020-01-16 19:11:56","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":628,"height":406,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/01\/3-featureSearchByAddressSettingInWebMap-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/01\/3-featureSearchByAddressSettingInWebMap.png","medium-width":404,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/01\/3-featureSearchByAddressSettingInWebMap.png","medium_large-width":628,"medium_large-height":406,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/01\/3-featureSearchByAddressSettingInWebMap.png","large-width":628,"large-height":406,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/01\/3-featureSearchByAddressSettingInWebMap.png","1536x1536-width":628,"1536x1536-height":406,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/01\/3-featureSearchByAddressSettingInWebMap.png","2048x2048-width":628,"2048x2048-height":406,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/01\/3-featureSearchByAddressSettingInWebMap.png","card_image-width":628,"card_image-height":406,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/01\/3-featureSearchByAddressSettingInWebMap.png","wide_image-width":628,"wide_image-height":406}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p>As with the other search configurations above, you can also do so using Python. Here, the <code>disablePlaceFinder<\/code> property is set to <code>True<\/code>:<\/p>\n<details>\n<summary>Expand to see the code to disable place search<\/summary>\n<div style=\"font-size: .8em; background: #f8f8f8; overflow: auto; width: auto; border: solid gray; border-width: .1em .1em .1em .8em; padding: .2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%;\">webmap_item <span style=\"color: #666666;\">=<\/span> webmap_item_with_search\r\njson_data <span style=\"color: #666666;\">=<\/span> webmap_item<span style=\"color: #666666;\">.<\/span>get_data()\r\napp_properties_viewing <span style=\"color: #666666;\">=<\/span> json_data[<span style=\"color: #ba2121;\">'applicationProperties'<\/span>][<span style=\"color: #ba2121;\">'viewing'<\/span>]\r\n\r\n<span style=\"color: #008000; font-weight: bold;\">if<\/span> (<span style=\"color: #ba2121;\">'search'<\/span> <span style=\"color: #aa22ff; font-weight: bold;\">in<\/span> app_properties_viewing):\r\n    layer_search_property <span style=\"color: #666666;\">=<\/span> app_properties_viewing[<span style=\"color: #ba2121;\">'search'<\/span>]\r\n    disable_place_finder <span style=\"color: #666666;\">=<\/span> {<span style=\"color: #ba2121;\">'disablePlaceFinder'<\/span>: <span style=\"color: #008000;\">True<\/span>}\r\n    layer_search_property<span style=\"color: #666666;\">.<\/span>update(disable_place_finder)\r\n    webmap_item<span style=\"color: #666666;\">.<\/span>update(data <span style=\"color: #666666;\">=<\/span> json<span style=\"color: #666666;\">.<\/span>dumps(json_data))\r\n<\/pre>\n<\/div>\n<\/details>\n<p>&nbsp;<\/p>\n"},{"acf_fc_layout":"content","content":"<h2>Next steps<\/h2>\n<p>Now that you can automate the search settings of your maps, think about the maps you have and where searching could be useful. If there are multiple maps that need similar updates, you can update them all at once instead of having to configure each map\u2019s search.<\/p>\n"},{"acf_fc_layout":"sidebar","content":"<p>In this blog, the code focuses on setting the value for a single map. If you view <a href=\"https:\/\/github.com\/Esri\/collector-tools\/blob\/master\/notebooks\/LayerSearchConfig.ipynb\">the example Notebook<\/a>, it will include getting a collection of maps and updating each of those maps.<\/p>\n","image_reference":false,"layout":"standard","image_reference_figure":"","snippet":"","spotlight_name":"","section_title":"","position":"Center","spotlight_image":false}],"authors":[{"ID":5701,"user_firstname":"Kylie","user_lastname":"Donia","nickname":"kylie","user_nicename":"kylie","display_name":"Kylie Donia","user_email":"KDonia@esri.com","user_url":"","user_registered":"2018-03-02 00:17:28","user_description":"Kylie strives to bring GIS to K-12 classrooms. A long-time Esri employee, she previously worked on Esri's field operations, focused on documentation and best practices. She is an avid runner often found on the trails or chasing her children.","user_avatar":"<img alt='' src='https:\/\/secure.gravatar.com\/avatar\/8a982852e53c5a7d1af54c8325f21a4080aa16e902b1d82315a9c5f9f7e48572?s=96&#038;d=blank&#038;r=g' srcset='https:\/\/secure.gravatar.com\/avatar\/8a982852e53c5a7d1af54c8325f21a4080aa16e902b1d82315a9c5f9f7e48572?s=192&#038;d=blank&#038;r=g 2x' class='avatar avatar-96 photo' height='96' width='96' loading='lazy' decoding='async'\/>"}],"related_articles":[{"ID":584072,"post_author":"5701","post_date":"2019-08-26 08:03:00","post_date_gmt":"2019-08-26 15:03:00","post_content":"","post_title":"Search for assets intuitively in field apps","post_excerpt":"","post_status":"publish","comment_status":"closed","ping_status":"closed","post_password":"","post_name":"intuitive-asset-search-field-apps","to_ping":"","pinged":"","post_modified":"2019-08-26 08:02:34","post_modified_gmt":"2019-08-26 15:02:34","post_content_filtered":"","post_parent":0,"guid":"https:\/\/www.esri.com\/arcgis-blog\/?post_type=blog&#038;p=584072","menu_order":0,"post_type":"blog","post_mime_type":"","comment_count":"0","filter":"raw"},{"ID":596572,"post_author":"8072","post_date":"2019-09-25 08:00:59","post_date_gmt":"2019-09-25 15:00:59","post_content":"","post_title":"Limit available maps in Collector for ArcGIS","post_excerpt":"","post_status":"publish","comment_status":"closed","ping_status":"closed","post_password":"","post_name":"limit-maps-collector-arcgis","to_ping":"","pinged":"","post_modified":"2020-11-10 15:41:27","post_modified_gmt":"2020-11-10 23:41:27","post_content_filtered":"","post_parent":0,"guid":"https:\/\/www.esri.com\/arcgis-blog\/?post_type=blog&#038;p=596572","menu_order":0,"post_type":"blog","post_mime_type":"","comment_count":"0","filter":"raw"}],"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/01\/AdobeStock_137642705-card.jpg","wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/01\/AdobeStock_137642705-banner.jpg"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.9 (Yoast SEO v25.9) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Customize feature search in web maps using Python<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.esri.com\/arcgis-blog\/products\/apps\/field-mobility\/customize-feature-search-web-maps-python\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Customize feature search in web maps using Python\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.esri.com\/arcgis-blog\/products\/apps\/field-mobility\/customize-feature-search-web-maps-python\" \/>\n<meta property=\"og:site_name\" content=\"ArcGIS Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/esrigis\/\" \/>\n<meta property=\"article:modified_time\" content=\"2020-01-21T23:37:49+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@ESRI\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":[\"Article\",\"BlogPosting\"],\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/apps\/field-mobility\/customize-feature-search-web-maps-python#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/apps\/field-mobility\/customize-feature-search-web-maps-python\"},\"author\":{\"name\":\"Kylie Donia\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/0911855fc2ef5819f66015447f95aaf5\"},\"headline\":\"Customize feature search in web maps using Python\",\"datePublished\":\"2020-01-21T22:18:22+00:00\",\"dateModified\":\"2020-01-21T23:37:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/apps\/field-mobility\/customize-feature-search-web-maps-python\"},\"wordCount\":8,\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"keywords\":[\"feature search\",\"python\",\"search\"],\"articleSection\":[\"Field Operations\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/apps\/field-mobility\/customize-feature-search-web-maps-python\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/apps\/field-mobility\/customize-feature-search-web-maps-python\",\"name\":\"Customize feature search in web maps using Python\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\"},\"datePublished\":\"2020-01-21T22:18:22+00:00\",\"dateModified\":\"2020-01-21T23:37:49+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/apps\/field-mobility\/customize-feature-search-web-maps-python#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.esri.com\/arcgis-blog\/products\/apps\/field-mobility\/customize-feature-search-web-maps-python\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/apps\/field-mobility\/customize-feature-search-web-maps-python#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.esri.com\/arcgis-blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Customize feature search in web maps using Python\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/\",\"name\":\"ArcGIS Blog\",\"description\":\"Get insider info from Esri product teams\",\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.esri.com\/arcgis-blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\",\"name\":\"Esri\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png\",\"contentUrl\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png\",\"width\":400,\"height\":400,\"caption\":\"Esri\"},\"image\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/esrigis\/\",\"https:\/\/x.com\/ESRI\",\"https:\/\/www.linkedin.com\/company\/5311\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/0911855fc2ef5819f66015447f95aaf5\",\"name\":\"Kylie Donia\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/8a982852e53c5a7d1af54c8325f21a4080aa16e902b1d82315a9c5f9f7e48572?s=96&d=blank&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/8a982852e53c5a7d1af54c8325f21a4080aa16e902b1d82315a9c5f9f7e48572?s=96&d=blank&r=g\",\"caption\":\"Kylie Donia\"},\"description\":\"Kylie strives to bring GIS to K-12 classrooms. A long-time Esri employee, she previously worked on Esri's field operations, focused on documentation and best practices. She is an avid runner often found on the trails or chasing her children.\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/kylie-donia-1379a648\/\",\"https:\/\/x.com\/kylie_donia\"],\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/author\/kylie\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Customize feature search in web maps using Python","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.esri.com\/arcgis-blog\/products\/apps\/field-mobility\/customize-feature-search-web-maps-python","og_locale":"en_US","og_type":"article","og_title":"Customize feature search in web maps using Python","og_url":"https:\/\/www.esri.com\/arcgis-blog\/products\/apps\/field-mobility\/customize-feature-search-web-maps-python","og_site_name":"ArcGIS Blog","article_publisher":"https:\/\/www.facebook.com\/esrigis\/","article_modified_time":"2020-01-21T23:37:49+00:00","twitter_card":"summary_large_image","twitter_site":"@ESRI","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["Article","BlogPosting"],"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/apps\/field-mobility\/customize-feature-search-web-maps-python#article","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/apps\/field-mobility\/customize-feature-search-web-maps-python"},"author":{"name":"Kylie Donia","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/0911855fc2ef5819f66015447f95aaf5"},"headline":"Customize feature search in web maps using Python","datePublished":"2020-01-21T22:18:22+00:00","dateModified":"2020-01-21T23:37:49+00:00","mainEntityOfPage":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/apps\/field-mobility\/customize-feature-search-web-maps-python"},"wordCount":8,"publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"keywords":["feature search","python","search"],"articleSection":["Field Operations"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/apps\/field-mobility\/customize-feature-search-web-maps-python","url":"https:\/\/www.esri.com\/arcgis-blog\/products\/apps\/field-mobility\/customize-feature-search-web-maps-python","name":"Customize feature search in web maps using Python","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#website"},"datePublished":"2020-01-21T22:18:22+00:00","dateModified":"2020-01-21T23:37:49+00:00","breadcrumb":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/apps\/field-mobility\/customize-feature-search-web-maps-python#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.esri.com\/arcgis-blog\/products\/apps\/field-mobility\/customize-feature-search-web-maps-python"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/apps\/field-mobility\/customize-feature-search-web-maps-python#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.esri.com\/arcgis-blog\/"},{"@type":"ListItem","position":2,"name":"Customize feature search in web maps using Python"}]},{"@type":"WebSite","@id":"https:\/\/www.esri.com\/arcgis-blog\/#website","url":"https:\/\/www.esri.com\/arcgis-blog\/","name":"ArcGIS Blog","description":"Get insider info from Esri product teams","publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.esri.com\/arcgis-blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization","name":"Esri","url":"https:\/\/www.esri.com\/arcgis-blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png","contentUrl":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png","width":400,"height":400,"caption":"Esri"},"image":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/esrigis\/","https:\/\/x.com\/ESRI","https:\/\/www.linkedin.com\/company\/5311\/"]},{"@type":"Person","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/0911855fc2ef5819f66015447f95aaf5","name":"Kylie Donia","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/8a982852e53c5a7d1af54c8325f21a4080aa16e902b1d82315a9c5f9f7e48572?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8a982852e53c5a7d1af54c8325f21a4080aa16e902b1d82315a9c5f9f7e48572?s=96&d=blank&r=g","caption":"Kylie Donia"},"description":"Kylie strives to bring GIS to K-12 classrooms. A long-time Esri employee, she previously worked on Esri's field operations, focused on documentation and best practices. She is an avid runner often found on the trails or chasing her children.","sameAs":["https:\/\/www.linkedin.com\/in\/kylie-donia-1379a648\/","https:\/\/x.com\/kylie_donia"],"url":"https:\/\/www.esri.com\/arcgis-blog\/author\/kylie"}]}},"text_date":"January 21, 2020","author_name":"Kylie Donia","author_page":"https:\/\/www.esri.com\/arcgis-blog\/author\/kylie","custom_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/01\/AdobeStock_137642705-banner.jpg","primary_product":"Apps","tag_data":[{"term_id":541282,"name":"feature search","slug":"feature-search","term_group":0,"term_taxonomy_id":541282,"taxonomy":"post_tag","description":"","parent":0,"count":2,"filter":"raw"},{"term_id":24341,"name":"python","slug":"python","term_group":0,"term_taxonomy_id":24341,"taxonomy":"post_tag","description":"","parent":0,"count":171,"filter":"raw"},{"term_id":27581,"name":"search","slug":"search","term_group":0,"term_taxonomy_id":27581,"taxonomy":"post_tag","description":"","parent":0,"count":23,"filter":"raw"}],"category_data":[{"term_id":23261,"name":"Field Operations","slug":"field-mobility","term_group":0,"term_taxonomy_id":23261,"taxonomy":"category","description":"","parent":0,"count":616,"filter":"raw"}],"product_data":[{"term_id":36591,"name":"Apps","slug":"apps","term_group":0,"term_taxonomy_id":36591,"taxonomy":"product","description":"","parent":0,"count":648,"filter":"raw"},{"term_id":36641,"name":"ArcGIS Collector","slug":"collector","term_group":0,"term_taxonomy_id":36641,"taxonomy":"product","description":"","parent":36591,"count":140,"filter":"raw"},{"term_id":36661,"name":"ArcGIS Explorer","slug":"explorer","term_group":0,"term_taxonomy_id":36661,"taxonomy":"product","description":"","parent":36591,"count":41,"filter":"raw"}],"primary_product_link":"https:\/\/www.esri.com\/arcgis-blog\/?s=#&products=apps","_links":{"self":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/702822","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog"}],"about":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/types\/blog"}],"author":[{"embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/users\/5701"}],"replies":[{"embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/comments?post=702822"}],"version-history":[{"count":0,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/702822\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/media?parent=702822"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/categories?post=702822"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/tags?post=702822"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/industry?post=702822"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/product?post=702822"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}