diff --git a/src/structures/interfaces/structure-search-body.interface.ts b/src/structures/interfaces/structure-search-body.interface.ts index 24d7591930d82643cd181ced7132665d8d2007d9..14857a413f2cf9931baecb307a05fe92857667ee 100644 --- a/src/structures/interfaces/structure-search-body.interface.ts +++ b/src/structures/interfaces/structure-search-body.interface.ts @@ -5,4 +5,5 @@ export interface StructureSearchBody { structureName: string; structureType: string; address: Address; + description: string; } diff --git a/src/structures/services/structures-search.service.ts b/src/structures/services/structures-search.service.ts index e809c58f9f53f9e0d1291df3ee28c7f163cb212c..f75cb5a69ab837ac26563c770649802e6c84342a 100644 --- a/src/structures/services/structures-search.service.ts +++ b/src/structures/services/structures-search.service.ts @@ -20,6 +20,7 @@ export class StructuresSearchService { structureType: structure.structureType, structureId: structure._id, address: structure.address, + description: structure.description, }, }); return structure; @@ -64,7 +65,7 @@ export class StructuresSearchService { query_string: { analyze_wildcard: 'true', query: searchString, - fields: ['structureName^5', 'structureType^5', 'address.street', 'address.commune^5'], + fields: ['structureName^5', 'structureType^5', 'address.street', 'address.commune^5', 'description'], fuzziness: 'AUTO', }, }, @@ -84,6 +85,7 @@ export class StructuresSearchService { structureType: structure.structureType, structureId: id, address: structure.address, + description: structure.description, }, }, });