Skip to content
Snippets Groups Projects
Commit 92e20be4 authored by Hugo SUBTIL's avatar Hugo SUBTIL
Browse files

Merge branch 'fix/structure-description-es' into 'dev'

feat: add structure description to ES fields

See merge request web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_server!78
parents 2f712610 a8d675e4
No related branches found
No related tags found
3 merge requests!96release V1.10.0,!83Dev,!78feat: add structure description to ES fields
...@@ -5,4 +5,5 @@ export interface StructureSearchBody { ...@@ -5,4 +5,5 @@ export interface StructureSearchBody {
structureName: string; structureName: string;
structureType: string; structureType: string;
address: Address; address: Address;
description: string;
} }
...@@ -20,6 +20,7 @@ export class StructuresSearchService { ...@@ -20,6 +20,7 @@ export class StructuresSearchService {
structureType: structure.structureType, structureType: structure.structureType,
structureId: structure._id, structureId: structure._id,
address: structure.address, address: structure.address,
description: structure.description,
}, },
}); });
return structure; return structure;
...@@ -64,7 +65,7 @@ export class StructuresSearchService { ...@@ -64,7 +65,7 @@ export class StructuresSearchService {
query_string: { query_string: {
analyze_wildcard: 'true', analyze_wildcard: 'true',
query: searchString, 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', fuzziness: 'AUTO',
}, },
}, },
...@@ -84,6 +85,7 @@ export class StructuresSearchService { ...@@ -84,6 +85,7 @@ export class StructuresSearchService {
structureType: structure.structureType, structureType: structure.structureType,
structureId: id, structureId: id,
address: structure.address, address: structure.address,
description: structure.description,
}, },
}, },
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment