This article covers advanced search queries with filters and boolean operators.
Learn more on basic keyword search and graphical user interface here: Search for documents in your Document Management library
AODocs provides advanced ways of searching and filtering files from your libraries. You can search documents by filtering on views, and you can also use search operators to focus your search on a specific property or combination of properties.
Note: When searching on a view where the "Display documents from other classes" is enabled, using the advance search operators described in this article will automatically filter out documents that are not in the views' main document class.
Learn more here: Configure list views
1. Searching for text fields
You can search for text fields in the document’s properties, in its description or in the attached files (if the search in attached files option is checked). To search for a single word, access the search bar at the top of the page and enter your search query. The search results will display all documents containing the searched word in the properties, description or attached files.
To search for the word Apple, type apple in the search bar (1) and click search (2).The search results will show all documents that contain:
- The word “apple” in the properties: the properties must contain exactly the word Apple (i.e. if the property is "apples" or "Red Apple", the document will not be considered a valid search result)
- The word “apple” in the description of the document (if the description contains "apple", "apples" or any text containing these words, the document will match)
Check the “Search in attached files” option (3) to also search attachments. Then the search results will also show all documents that contain the word “apple” in the attached files (AODocs will search within the textual content of any file format, including image files thanks to Google Drive's built-in OCR conversion)
Searching for a single text field
In order to search for an expression or exact words in the same order use double quotes (“”) for the query. To search for the term Apple Macbook type “apple macbook” (4) and click search.
Note: this search is not case sensitive: the queries “apple macbook”, “Apple MacBook” and “aPPle maCbOok” will return exactly the same list of search results.
Searching for an exact expression using quotations
You can narrow down your search to display results which contain your query only in the properties of your documents. To do this, type the property name and the query in the search bar separated by a colon. The results will show all documents which contain the query in the specified property field. Use double quotes (“”) in case the property field or your query contains more than one word.
Note: the property search is case sensitive: a search on “United States” will not match a document with a property containing “united states”.
To search for all documents with the preferred reseller as amazon, type “Preferred Reseller”:amazon (5) and click search.
Note: the name of the property is case sensitive and must match exactly what is defined in your document class. If you search for "Preferred reseller": amazon, the search won't work.
Searching within specific property fields
2. Searching for date fields
You can search for date fields in the document’s properties. To search for a date field, access the search bar and enter the query in YYYY-MM-DD format (1). The search results would display all the documents containing the searched date in any property field.
Searching for date field in all properties
To narrow down the search to a specific property field, type the property name and the date query in the search bar separated by a colon.
Use quotations in case the property field contains more than one word. You can also use the < , <= , > , >= relational operators to perform advanced search on date fields.
To search for all documents with the “Available Date” property field less than 31 August 2015, type “Available Date”<2015-08-31 and click search (2).
Date fields search with relational operators
3. Searching for Numerical fields
In AODocs you can search for Decimal or Integer type numerical fields. To search for numerical fields in the document properties, type the property name and the date query in the search bar separated by a colon. Use quotations in case the field contains more than one word. Use the < , <= , > , >= relational operators to perform advanced search on numerical fields.
To search for all documents with Integer type numerical property field “Price” over 649, type “Price”>649 and click search.
Searching for Integer type numerical field with relational operators
To search for all documents with the decimal type numerical property field “Price” greater than or equal to 19.99, type "Price">=1699.99 and click search(2).
Searching for Decimal type numerical fields using relational operators
4. Searching for System Generated Fields
AODocs also provides systems fields to documents, and you can search on these fields too!
Here are the searchable fields:
- title : you can filter on the title of the document
- class : you can filter on a specific document class
- creation_date : date field to filter on the creation date of the document
- last_update_date : date field to filter on the update date of the document
- created_by : to filter by creator name. Add email address after this query
- updated_by : to filter by name of last update name. Add email address after this query
- state : filter by status if you have implemented a workflow in your database. Use the exact status name that the one you have set. You can put quote.
5. Boolean Operators
All search operations for the fields described above can be combined using boolean operators AND, NOT & OR to perform a range of search functionalities.The boolean operators need to be in capital letters to be recognized.
To search for all documents with the preferred reseller amazon costing 649$ or less, type “Preferred Reseller”:amazon AND “Price”<=649 and click search (1).
Using boolean operators to perform search
To search for property fields and documents simultaneously, use parenthesis to separate property and regular search. To search for all documents with the preferred reseller amazon costing 649$ or less which contain the word Asus, type (“Preferred Reseller”:amazon AND Price<=649) AND Asus and click search (2).
Combining properties and document search