Adjust search term logging + use filtered search query
This commit is contained in:
parent
9859060c59
commit
e6371e4665
|
@ -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