Make name field search in item name only

Now there is an `allNames` field that searches names of multiple
things.
This commit is contained in:
Eike Kettner 2020-06-13 21:17:29 +02:00
parent 67666595eb
commit 88234986e6
2 changed files with 6 additions and 1 deletions

View File

@ -3354,8 +3354,13 @@ components:
- outgoing
name:
type: string
description: |
Search in item names.
allNames:
type: string
description: |
Search in item names, correspondents, concerned entities
and notes.
corrOrg:
type: string
format: ident

View File

@ -291,7 +291,7 @@ object QItem {
IC.state.prefix("i").isOneOf(q.states),
IC.incoming.prefix("i").isOrDiscard(q.direction),
name
.map(n => or(IC.name.prefix("i").lowerLike(n), IC.notes.prefix("i").lowerLike(n)))
.map(n => IC.name.prefix("i").lowerLike(n))
.getOrElse(Fragment.empty),
allNames
.map(n =>