mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-06 15:15:58 +00:00
Add new search term that searches in all meta data
A field that searches via substring search in names of correspondents and concerned meta data.
This commit is contained in:
parent
35c9409680
commit
f30c8a5e4d
@ -3354,6 +3354,8 @@ components:
|
|||||||
- outgoing
|
- outgoing
|
||||||
name:
|
name:
|
||||||
type: string
|
type: string
|
||||||
|
allNames:
|
||||||
|
type: string
|
||||||
corrOrg:
|
corrOrg:
|
||||||
type: string
|
type: string
|
||||||
format: ident
|
format: ident
|
||||||
|
@ -121,6 +121,7 @@ trait Conversions {
|
|||||||
m.dateUntil,
|
m.dateUntil,
|
||||||
m.dueDateFrom,
|
m.dueDateFrom,
|
||||||
m.dueDateUntil,
|
m.dueDateUntil,
|
||||||
|
m.allNames,
|
||||||
None
|
None
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -164,6 +164,7 @@ object QItem {
|
|||||||
dateTo: Option[Timestamp],
|
dateTo: Option[Timestamp],
|
||||||
dueDateFrom: Option[Timestamp],
|
dueDateFrom: Option[Timestamp],
|
||||||
dueDateTo: Option[Timestamp],
|
dueDateTo: Option[Timestamp],
|
||||||
|
allNames: Option[String],
|
||||||
orderAsc: Option[RItem.Columns.type => Column]
|
orderAsc: Option[RItem.Columns.type => Column]
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -184,6 +185,7 @@ object QItem {
|
|||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
|
None,
|
||||||
None
|
None
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -283,6 +285,7 @@ object QItem {
|
|||||||
)
|
)
|
||||||
|
|
||||||
val name = q.name.map(queryWildcard)
|
val name = q.name.map(queryWildcard)
|
||||||
|
val allNames = q.allNames.map(queryWildcard)
|
||||||
val cond = and(
|
val cond = and(
|
||||||
IC.cid.prefix("i").is(q.collective),
|
IC.cid.prefix("i").is(q.collective),
|
||||||
IC.state.prefix("i").isOneOf(q.states),
|
IC.state.prefix("i").isOneOf(q.states),
|
||||||
@ -290,6 +293,18 @@ object QItem {
|
|||||||
name
|
name
|
||||||
.map(n => or(IC.name.prefix("i").lowerLike(n), IC.notes.prefix("i").lowerLike(n)))
|
.map(n => or(IC.name.prefix("i").lowerLike(n), IC.notes.prefix("i").lowerLike(n)))
|
||||||
.getOrElse(Fragment.empty),
|
.getOrElse(Fragment.empty),
|
||||||
|
allNames
|
||||||
|
.map(n =>
|
||||||
|
or(
|
||||||
|
OC.name.prefix("o0").lowerLike(n),
|
||||||
|
PC.name.prefix("p0").lowerLike(n),
|
||||||
|
PC.name.prefix("p1").lowerLike(n),
|
||||||
|
EC.name.prefix("e1").lowerLike(n),
|
||||||
|
IC.name.prefix("i").lowerLike(n),
|
||||||
|
IC.notes.prefix("i").lowerLike(n)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.getOrElse(Fragment.empty),
|
||||||
RPerson.Columns.pid.prefix("p0").isOrDiscard(q.corrPerson),
|
RPerson.Columns.pid.prefix("p0").isOrDiscard(q.corrPerson),
|
||||||
ROrganization.Columns.oid.prefix("o0").isOrDiscard(q.corrOrg),
|
ROrganization.Columns.oid.prefix("o0").isOrDiscard(q.corrOrg),
|
||||||
RPerson.Columns.pid.prefix("p1").isOrDiscard(q.concPerson),
|
RPerson.Columns.pid.prefix("p1").isOrDiscard(q.concPerson),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user