mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Must match siteName
This commit is contained in:
parent
aeb09539cc
commit
45eed5c40d
1 changed files with 5 additions and 9 deletions
|
|
@ -225,14 +225,11 @@ const appendNoFilters = (body: SearchBody, noFilters: NoFilter[]): void => {
|
|||
}
|
||||
|
||||
const appendSiteNameFilter = (body: SearchBody, siteName: string): void => {
|
||||
body.query.bool.should.push({
|
||||
multi_match: {
|
||||
query: siteName,
|
||||
fields: ['siteName', 'url'],
|
||||
analyzer: 'simple',
|
||||
body.query.bool.must.push({
|
||||
match: {
|
||||
siteName,
|
||||
},
|
||||
})
|
||||
body.query.bool.minimum_should_match = 1
|
||||
}
|
||||
|
||||
export const createPage = async (
|
||||
|
|
@ -682,8 +679,7 @@ export const searchAsYouType = async (
|
|||
|
||||
export const updatePagesAsync = async (
|
||||
userId: string,
|
||||
action: BulkActionType,
|
||||
args?: PageSearchArgs
|
||||
action: BulkActionType
|
||||
): Promise<string | null> => {
|
||||
// default action is archive
|
||||
let must_not = [
|
||||
|
|
@ -693,7 +689,7 @@ export const updatePagesAsync = async (
|
|||
},
|
||||
},
|
||||
]
|
||||
let params: Record<string, any> = { archivedAt: new Date() }
|
||||
let params: Record<string, unknown> = { archivedAt: new Date() }
|
||||
if (action === BulkActionType.Delete) {
|
||||
must_not = []
|
||||
params = { state: ArticleSavingRequestStatus.Deleted }
|
||||
|
|
|
|||
Loading…
Reference in a new issue