Adjust search term logging + use filtered search query

This commit is contained in:
PrivateGER 2023-05-25 22:37:43 +02:00 committed by PrivateGER
parent 9859060c59
commit e6371e4665
1 changed files with 7 additions and 4 deletions

View File

@ -41,9 +41,6 @@ export type MeilisearchNote = {
export default hasConfig ? {
search: (query : string, limit : number, offset : number) => {
logger.info(`Searching for ${query}`);
logger.info(`Limit: ${limit}`);
logger.info(`Offset: ${offset}`);
/// Advanced search syntax
/// from:user => filter by user + optional domain
@ -88,7 +85,13 @@ export default hasConfig ? {
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,
offset: offset,
filter: constructedFilters