Skip to content
Snippets Groups Projects
Commit a8d675e4 authored by Antonin COQUET's avatar Antonin COQUET
Browse files

feat: add structure description to ES fields

parent 5a95c7c7
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.
Please register or to comment