[[TranslatedPages]] = Search = [[Image(source:trunk/images/dialogs/search.png,middle)]] ''Keyboard shortcut'': '''{{{Ctrl+F}}}''' '''Search [wiki:/Help/Concepts/Object objects] in the current data layer'''. This tool have different look, depending on your expert setting: [Help/ExpertMode Expert mode off]: [[Image(9229-search-expert-false.png)]] [Help/ExpertMode Expert mode on]: [[Image(9229-search-expert-true.png)]] If you check '''add toolbar button''', as soon as you click on [[Image(source:trunk/images/dialogs/search.png,middle)]] '''Start Search''', a button will be added to the [wiki:Help/MainToolbar Main Toolbar] which will execute the defined search expression each time, you press the button. You can also set an own icon for this button in the [wiki:Help/Preferences/Toolbar Toolbar Preferences]. As with any "button" [Help/Preferences/Shortcuts you can always assign shortcut to it]. == Keywords == Expand based on https://josm.openstreetmap.de/browser/josm/trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java; commit history and https://josm.openstreetmap.de/browser/josm/trunk/test/unit/org/openstreetmap/josm/actions/search/SearchCompilerTest.java || id || || || version || || || type || || || user || || || role || || || changeset || || || nodes || || || ways || || || tags || || || areasize || || || waylength || || || modified || || || selected || || || incomplete || || || untagged || || || closed || || || new || || || indownloadedarea || || || allindownloadedarea || || || inview || || || allinview || || || timestamp || || || nth || || || nth% || || || hasRole || || || parent || || || child || || == Examples == Some examples of queries: * `type:way` selects all ways * `name:Herrengasse` selects all elements with the given name * `name=Herrengasse` same as above, but case sensitive * `"name"="Baker Street"` same as above, but works also with special characters like white spaces in the value * `tag1=yes tag2=yes` is equivalent to `tag1=yes & tag2=yes` * `type:way name:-` selects all ways that do not have a name * `id:123465678` selects an object (way or node) with a particular id * `timestamp:2010-11-01/2010-12-01` selects object with last change in November 2010 * See also [[Help/Dialog/Filter#Examples]] There is also a very under-used and under-documented feature that lets you enter a web URL (`file://`, `http://`, `https://`, `ftp://`) in the search field. JOSM will then attempt to load that URL, and select any objects that it finds referenced in that file. JOSM will look for XML tags "way", "node", and "relation" in the document, and use their id attribute. This means you can access another OSM file on your hard disk this way and have JOSM select all objects that are present in the file (provided they are present in JOSM's dataset too). The special expressions `selected` and `modified` select all currently selected resp. all objects modified in the current session. More examples are [osmwiki:JOSM_search_function here] Some examples and search functions are only shown in [wiki:Help/ExpertMode expert mode]. This includes the '''standard/regular expression/MapCSS selector''' radio button. When '''regular expression''' mode is selected any key or value field may be replaced with a regular expression enclosed in quotes. == See also == * [wiki:Help/Concepts/Object Objects] * [Help/Dialog/Filter] allows you to save and combine multiple search patterns between your JOSM sessions * JOSM supports Java Regex. For detailed Information see http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html * mapcss selector syntax see [wiki:Help/Styles/MapCSSImplementation] ---- Back to [wiki:/Help/Menu/Edit Menu Edit][[Br]] Back to [wiki:/Help Main Help]