mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-22 08:53:48 +01:00
Adjust search term logging + use filtered search query
This commit is contained in:
parent
44478db3e6
commit
243b4fb60b
@ -41,9 +41,6 @@ export type MeilisearchNote = {
|
|||||||
|
|
||||||
export default hasConfig ? {
|
export default hasConfig ? {
|
||||||
search: (query : string, limit : number, offset : number) => {
|
search: (query : string, limit : number, offset : number) => {
|
||||||
logger.info(`Searching for ${query}`);
|
|
||||||
logger.info(`Limit: ${limit}`);
|
|
||||||
logger.info(`Offset: ${offset}`);
|
|
||||||
|
|
||||||
/// Advanced search syntax
|
/// Advanced search syntax
|
||||||
/// from:user => filter by user + optional domain
|
/// from:user => filter by user + optional domain
|
||||||
@ -88,7 +85,13 @@ export default hasConfig ? {
|
|||||||
return true;
|
return true;
|
||||||
})
|
})
|
||||||
|
|
||||||
return posts.search(query, {
|
logger.info(`Searching for ${query}`);
|
||||||
|
logger.info(`Limit: ${limit}`);
|
||||||
|
logger.info(`Offset: ${offset}`);
|
||||||
|
logger.info(`Filters: ${constructedFilters}`)
|
||||||
|
|
||||||
|
|
||||||
|
return posts.search(splitSearch.join(" "), {
|
||||||
limit: limit,
|
limit: limit,
|
||||||
offset: offset,
|
offset: offset,
|
||||||
filter: constructedFilters
|
filter: constructedFilters
|
||||||
|
Loading…
Reference in New Issue
Block a user