File tree Expand file tree Collapse file tree 5 files changed +20
-22
lines changed
src/core/usecases/softwareCatalog Expand file tree Collapse file tree 5 files changed +20
-22
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,8 @@ apiVersion: v2
22name : catalogi
33description : A Helm chart for deploying the Catalogi open source software catalog.
44type : application
5- version : 2.0.20
6- appVersion : 1.53.3
5+ version : 2.0.21
6+ appVersion : 1.53.4
77dependencies :
88 - name : postgresql
99 version : ' 16'
Original file line number Diff line number Diff line change 11{
22 "name" : " sill" ,
3- "version" : " 1.53.3 " ,
3+ "version" : " 1.53.4 " ,
44 "license" : " MIT" ,
55 "private" : true ,
66 "scripts" : {
Original file line number Diff line number Diff line change 3030 "@uiw/react-md-editor" : " ^3.23.5" ,
3131 "api" : " *" ,
3232 "evt" : " ^2.5.7" ,
33- "flexsearch" : " 0.7.43 " ,
33+ "flexsearch" : " ^0.8.212 " ,
3434 "i18next" : " ^23.6.0" ,
3535 "i18next-browser-languagedetector" : " ^8.0.2" ,
3636 "i18next-http-backend" : " ^3.0.2" ,
Original file line number Diff line number Diff line change @@ -312,32 +312,31 @@ function apiSoftwareToInternalSoftware(params: {
312312const { filterBySearchMemoized } = ( ( ) => {
313313 const getFlexSearch = memoize (
314314 ( softwares : State . Software . Internal [ ] ) => {
315- const index = new FlexSearch . Document < State . Software . Internal > ( {
315+ const index = new FlexSearch . Document ( {
316316 document : {
317317 id : "softwareName" ,
318318 field : [ "search" ]
319319 } ,
320320 cache : 100 ,
321321 tokenize : "full" ,
322- charset : {
323- split : / \s + / ,
324- rtl : false ,
325- encode : ( str : string ) : string [ ] => {
326- const normalized = str
327- . normalize ( "NFD" )
328- . replace ( / [ \u0300 - \u036f ] / g, "" )
329- . toLowerCase ( ) ;
330- return [ normalized ] ;
331- }
332- } ,
322+ encoder : "Default" ,
333323 context : {
334324 resolution : 9 ,
335325 depth : 2 ,
336326 bidirectional : true
337327 }
338328 } ) ;
339329
340- softwares . forEach ( software => index . add ( software ) ) ;
330+ softwares . forEach (
331+ ( {
332+ logoUrl,
333+ latestVersion,
334+ userDeclaration,
335+ referencePublications,
336+ customAttributes,
337+ ...software
338+ } ) => index . add ( software )
339+ ) ;
341340
342341 return index ;
343342 } ,
@@ -376,7 +375,6 @@ const { filterBySearchMemoized } = (() => {
376375 const index = getFlexSearch ( softwares ) ;
377376
378377 const searchResult = await index . searchAsync ( search , {
379- bool : "or" ,
380378 suggest : true ,
381379 enrich : true
382380 } ) ;
Original file line number Diff line number Diff line change @@ -4189,10 +4189,10 @@ flatted@^3.2.9:
41894189 resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.3.tgz#67c8fad95454a7c7abebf74bb78ee74a44023358"
41904190 integrity sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==
41914191
4192- flexsearch@0.7.43 :
4193- version "0.7.43 "
4194- resolved "https://registry.yarnpkg.com/flexsearch/-/flexsearch-0.7.43 .tgz#34f89b36278a466ce379c5bf6fb341965ed3f16c "
4195- integrity sha512-c5o/+Um8aqCSOXGcZoqZOm+NqtVwNsvVpWv6lfmSclU954O3wvQKxxK8zj74fPaSJbXpSLTs4PRhh+wnoCXnKg ==
4192+ flexsearch@^0.8.212 :
4193+ version "0.8.212 "
4194+ resolved "https://registry.yarnpkg.com/flexsearch/-/flexsearch-0.8.212 .tgz#b9509af778a991b938292e36fe0809a4ece4b940 "
4195+ integrity sha512-wSyJr1GUWoOOIISRu+X2IXiOcVfg9qqBRyCPRUdLMIGJqPzMo+jMRlvE83t14v1j0dRMEaBbER/adQjp6Du2pw ==
41964196
41974197for-each@^0.3.3 :
41984198 version "0.3.5"
You can’t perform that action at this time.
0 commit comments