Merge branch 'feat/search-under' into development
This commit is contained in:
commit
59dab45f51
2 changed files with 7 additions and 1 deletions
|
|
@ -23,7 +23,11 @@ export class SearchController extends Controller {
|
|||
bool: {
|
||||
must: search.AND?.map((v) => ({
|
||||
[type[search.exact || v.exact ? 1 : 0]]: { [v.field]: v.value },
|
||||
})),
|
||||
})).concat({
|
||||
[["match", "prefix"][search.recursive ? 1 : 0]]: {
|
||||
path: search.path?.join("/") || "",
|
||||
},
|
||||
}),
|
||||
should: search.OR?.map((v) => ({
|
||||
[type[search.exact || v.exact ? 1 : 0]]: { [v.field]: v.value },
|
||||
})),
|
||||
|
|
|
|||
|
|
@ -10,4 +10,6 @@ export interface Search {
|
|||
exact?: boolean;
|
||||
}[];
|
||||
exact?: boolean;
|
||||
recursive?: boolean;
|
||||
path?: string[];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue