diff --git a/modules/microsite/docs/demo.md b/modules/microsite/docs/demo.md index 3b8c237b..234b60f3 100644 --- a/modules/microsite/docs/demo.md +++ b/modules/microsite/docs/demo.md @@ -6,6 +6,17 @@ permalink: demo # {{ page.title }} +## Finding Items + + - +## Basic Idea (First Version) + + diff --git a/modules/microsite/docs/doc/finding.md b/modules/microsite/docs/doc/finding.md index 99414ffa..69e4985e 100644 --- a/modules/microsite/docs/doc/finding.md +++ b/modules/microsite/docs/doc/finding.md @@ -6,9 +6,9 @@ permalink: doc/finding # {{ page.title }} -Items can be searched by their annotated meta data. The landing page -shows a list of current items. Items are displayed sorted by their -date, newest first. +Items can be searched by their annotated meta data and their contents +using full text search. The landing page shows a list of current +items. Items are displayed sorted by their date, newest first. Docspell has two modes for searching: a simple search bar and a search menu with many options. Both are active at the same time, but only one @@ -19,32 +19,51 @@ is visible. You can switch between them without affecting the results. -By default, the search bar is shown. It searches in the name -properties of the following meta data: +By default, the search bar is shown. It provides a refined view of the +search menu. The dropdown contains different options to do a quick +search. -- the item name -- the notes -- correspondent organization and person -- concerning person and equipment +### *All Names* and *Contents* -A wildcard `*` can be used at the start or end of a search term to do -a substring match. A `*` means "everything". So a term `*company` -matches all names ending in `company` and `*company*` matches all -names containing the word `company`. The matching is case insensitive. +These two options correspond to the same named field in the search +menu. If you switch between search menu and search bar (by clicking +the icon on the left), you'll see that they are the same fields. +Typing in the search bar also fills the corresponding field in the +search menu (and vice versa). -Docspell adds a `*` to the front and end of a term automatically, -unless one of the following is true: +- The *All Names* searches in the item name, item notes, names of + correspondent organization and person, and names of concering person + and equipment. It uses a simple substring search. +- The option *Contents* searches the contents of all attachments + (documents), attachment names, the item name and item notes. It uses + full text search. However, it does not search the names of attached + meta data. -- The term already has a wildcard. -- The term is enclosed in quotes `"`. +When searching with one of these fields active, it simply submits the +(hidden) search menu. So if the menu has other fields filled out, they +will affect the result, too. Using one of these fields, the bar is +just a reduced view of the search menu. -You can go to the search menu by clicking the left icon in the search -bar. +So you can choose tags or correspondents in the search menu and +further restrict the results using full text search. The results will +be returned sorted by the item date, newest first. -If the search bar shows a little blue bubble, it means that there are -more search fields filled out in the search menu. In this case the -results are not only restricted by the search term given in the -search-bar, but also by what is specified in the search menu. +If the left button in the search bar shows a little blue bubble, it +means that there are more search fields filled out in the search menu +that you currently can't see. In this case the results are not only +restricted by the search term given in the search-bar, but also by +what is specified in the search menu. + + +### *Contents Only* + +This option has no corresponding part in the search menu. Searching +with this option active, there is only a full text search done in the +attachments contents, attachment names, item name and item notes. + +The results are not ordered by item date, but by relevance with +respect to the search term. This ordering is returned from the full +text search engine and is simply transfered unmodified. ## Search Menu @@ -104,9 +123,61 @@ within this range. Items without a due date are not shown. Specify whether to show only incoming, only outgoing or all items. +## Customize Substring Search + +The substring search of the *All Names* and *Name* field can be +customized in the following way: A wildcard `*` can be used at the +start or end of a search term to do a substring match. A `*` means +"everything". So a term `*company` matches all names ending in +`company` and `*company*` matches all names containing the word +`company`. The matching is case insensitive. + +Docspell adds a `*` to the front and end of a term automatically, +unless one of the following is true: + +- The term already has a wildcard. +- The term is enclosed in quotes `"`. + + +## Full Text Search + + +### The Query + +The query string for full text search is very powerful. Docspell +currently supports [Apache SOLR](https://lucene.apache.org/solr/) as +full text search backend, so you may want to have a look at their +[documentation on query +syntax](https://lucene.apache.org/solr/guide/8_4/query-syntax-and-parsing.html#query-syntax-and-parsing) +for a in depth guide. + +- Wildcards: `?` matches any single character, `*` matches zero or + more characters +- Fuzzy search: Appending a `~` to a term, results in a fuzzy search + (search this term and similiar spelled ones) +- Proximity Search: Search for terms that "near" each other, again + using `~` appended to a search phrase. Example: `"cheese cake"~5`. +- Boosting: apply more weight to a term with `^`. Example: `cheese^4 + cake` – cheese is 4x more important. + +Docspell will preprocess the search query to prepare a query for SOLR. +It will by default search all indexed fields, which are: attachment +contents, attachment names, item name and item notes. + + +### The Results + +When using full text search, each item in the result list is annotated +with the highlighted occurrence of the match. + +
+ +
+ + ## Screencast diff --git a/modules/microsite/src/main/resources/microsite/img/search-bar.png b/modules/microsite/src/main/resources/microsite/img/search-bar.png index 97ca1429..5ac9dc0b 100644 Binary files a/modules/microsite/src/main/resources/microsite/img/search-bar.png and b/modules/microsite/src/main/resources/microsite/img/search-bar.png differ diff --git a/modules/microsite/src/main/resources/microsite/img/search-content-results.png b/modules/microsite/src/main/resources/microsite/img/search-content-results.png new file mode 100644 index 00000000..754074f0 Binary files /dev/null and b/modules/microsite/src/main/resources/microsite/img/search-content-results.png differ diff --git a/modules/microsite/src/main/resources/microsite/img/search-menu.png b/modules/microsite/src/main/resources/microsite/img/search-menu.png index 0d23a880..3cab49cd 100644 Binary files a/modules/microsite/src/main/resources/microsite/img/search-menu.png and b/modules/microsite/src/main/resources/microsite/img/search-menu.png differ diff --git a/modules/microsite/src/main/resources/microsite/static/docspell-demo.webm b/modules/microsite/src/main/resources/microsite/static/docspell-demo.webm new file mode 100644 index 00000000..59f6230c Binary files /dev/null and b/modules/microsite/src/main/resources/microsite/static/docspell-demo.webm differ diff --git a/modules/microsite/src/main/resources/microsite/static/docspell-search-2020-06-24.webm b/modules/microsite/src/main/resources/microsite/static/docspell-search-2020-06-24.webm new file mode 100644 index 00000000..016a6076 Binary files /dev/null and b/modules/microsite/src/main/resources/microsite/static/docspell-search-2020-06-24.webm differ