Warning, /documentation/digikam-doc/main_window/search_view.rst is written in an unsupported language. File is not indexed.

0001 .. meta::
0002    :description: digiKam Main Window Search View
0003    :keywords: digiKam, documentation, user manual, photo management, open source, free, learn, easy, advanced, search
0004 
0005 .. metadata-placeholder
0006 
0007    :authors: - digiKam Team
0008 
0009    :license: see Credits and License page for details (https://docs.digikam.org/en/credits_license.html)
0010 
0011 .. _search_view:
0012 
0013 Search View
0014 -----------
0015 
0016 We talked about quite a few views already and their searching capabilities, which are all kind of specialized. The Search View now offers a more versatile and general way of searching. There are two different approaches.
0017 
0018 .. figure:: images/mainwindow_searchview.webp
0019     :alt:
0020     :align: center
0021 
0022     The digiKam Simple Search Tool
0023 
0024 In the field right below you can enter a title and save your selection. It will then appear in the **Searches** list field below. But the best is still to come: the Timeline View offers a search for a search! If you have a lot more searches saved than my ridiculous four in the screenshot the adaptive search field at the bottom may help to find a certain search.
0025 
0026 The Quick Search
0027 ~~~~~~~~~~~~~~~~
0028 
0029 Quick Search is the adaptive search box at the top of the search dialog (Left Sidebar) and provides you with a simple means to search the digiKam database with a single query. You can enter any arguments in the **Search** text field and it will be used to determine the results. For instance, you can enter the string "birthday" to search the complete database for occurrences of the word "birthday" in all metadata text fields, or "05.webp" to search for a specific image file name "05.webp" (no escaping as in reg-expressions needed).
0030 
0031 Search Properties:
0032 
0033     - Searches are case insensitive.
0034 
0035     - Blank separated search terms are boolean AND combinations.
0036 
0037     - Special characters are literal and not interpreted ( . * ? / etc.).
0038 
0039     - Include all elements of the database: names, rating, keywords, tags, albums, collections, dates (and more in the future).
0040 
0041 You can save your searches as a live folder that always filters for what you entered as search criteria. Just type a name for the search into the **Save Current Search** field and click the **Save** button to the right of it. When saved, the filter will appear in the **Searches** list. By clicking the title bar of this list you can invert the sorting order. Once you select one of your saved searches, the search result will be presented in the Image Area immediately and the **Save Current Search** field will convert into a **Edit Stored Search** field where you can edit your search criteria. The name of the saved search will be used to label the search result in the Image Area.
0042 
0043 If you want to delete or rename a saved search from the list, click with the right mouse button on it and select from the context menu.
0044 
0045 .. _advanced_search:
0046 
0047 The Advanced Search Tool
0048 ~~~~~~~~~~~~~~~~~~~~~~~~
0049 
0050 Advanced Search tool provides an extended search form which can be used to search in specific fields of the digiKam database in a more sophisticated way. Click the **New Advanced Search...** button and it will come up like this:
0051 
0052 .. figure:: images/mainwindow_advancedsearchtool.webp
0053     :alt:
0054     :align: center
0055 
0056     The digiKam Advanced Search Tool
0057 
0058 The field labeled **Find items that have associated all these words:** is just a duplicate of the Quick Search field.
0059 
0060 Click on one of the blue categories and there will fold out an area with all the fields you can search for in that very category. Depending on the kind of data each field contains different input fields for your search, sometimes more than one type for the same field. Simplest are selection buttons, e.g. for colors. Then you have plain fields of the “The field content contains type", drop down lists and checkboxes. Many fields have two input fields allowing you to define a range, e.g. **Find items with a width between**. And often you find a link type thing called "Any" which opens a drop down field with checkboxes for the possible contents of that field.
0061 
0062 .. figure:: images/mainwindow_advancedsearchtool2.webp
0063     :alt:
0064     :align: center
0065 
0066     The digiKam Advanced Search Criteria
0067 
0068 Thanks to the labeling of the search fields they are pretty much self explaining. What we have to talk about is how they work together if you fill in or select more than one. On the right side of the header (blue area at the top) you find a little link **Options**. If you click on that one the header will change and you see four options.
0069 
0070     - **Meet All of the following conditions** means that your different search parameters will be connected by boolean AND for the search. Example: if you selected Album name “Holidays” and color “red” the search will find all pictures labeled with “red” out of the Album “Holidays”.
0071 
0072     - **Meet Any of the following conditions** means that your different search parameters will be connected by boolean OR for the search. Example: if you selected Album name “Holidays” and color “red” the search will find the content of the Album “Holidays” and all pictures labeled with “red” out of your whole collection.
0073 
0074     - **None of these conditions are met** means that your different search parameters will be connected by boolean NAND for the search. Again our example: if you selected Album name “Holidays” and color “red” the search will find all pictures of your collection except those labeled with “red” and except those out of the Album “Holidays”.
0075 
0076     - **At least one of these conditions is not met** means that your different search parameters will be connected by boolean NOR for the search. One more example: if you selected Album name “Holidays” and color “red” the search will find all pictures of your collection except those labeled with “red” out of the Album “Holidays”. 
0077 
0078 Complicated? No, good! Because the real stuff is yet to come. Have a look at the footer of the Advanced Search Tool. Here you find **+ Add Search Group**. If you hit this button another list with the same categories of search fields will open below the first one (scroll down in case you don't see it right away) separated by a blue header showing the same options we were just talking about. On top of them you see an underlined OR meaning that this list is connected to the first one by boolean OR. You can change that to AND by clicking on it.
0079 
0080 To explain how it works let's make another example based on one of those we had already. I want to use the second one. That means: in the first group you checked **Meet Any of the following conditions** and you selected Album name “Holidays” and color “red”. As we said already this will produce all pictures labeled with “red” out of your whole collection and the content of the Album “Holidays”. Now let's assume for some reason you want to exclude all rejected files and all files with a rating lower than three stars.
0081 
0082 So you open a second group, click on the underlined OR in the header in order to change it to AND, select **None of these conditions are met**, fold out the **Picture Properties**, check under **Labels** the red flag (rejected) and select under **Rating** no star (five white stars) in the first field and two stars in the second field. Note that there is a difference between **No star** and **No Rating assigned**! If you want to exclude the pictures without any rating as well you got to open another Search Group, click on the underlined OR in the header in order to change it to AND, select **None of these conditions are met** and select **No Rating assigned** in the **Picture Properties** category.
0083 
0084 Which brings us to the fact that you can open as many additional Search Groups as you need to formulate your query. But since the purpose of this handbook is not to open a competition in creating the most sophisticated queries I leave it to you to figure out how far you have to go or can go in this respect and rather finish this section with a few hints about the other buttons in the Advanced Search Tool.
0085 
0086 Beside the **+ Add Search Group** button you see Reset. This removes all additional Search Groups and clears all the fields in the remaining one. It's a good policy to use this button before starting to create a new search, in particular when you leave the Advanced Search Tool with the intention to use the Quick Search for your next query, because otherwise the search criteria remain active even if you don't see them and screw up your new search. Try carries out the search but leaves the Advanced Search Tool window open, OK does the same but closes the window. **Remove Group** in the header of the additional Search Groups doesn't need an explanation.