content management system - How are searches implemented in a Flat File CMS -
flat file cms's don't use databases. how searches implemented? searching more or less computationally expensive type of setup compared database powered search?
the problem static site , search 1 definition static, while other highly dynamic. out of box there no simple way make 2 live happily together.
flat file cms arn't static websites. while parsing files more costly parsing databases (usually?), search functionality can provided underlying cms. plugins can provide want.
however, there non trivial solutions can achieve want, depending on infrastructure , volumetry , if site can achieve server side computations or not (grav can, gatsby , hugo can't).
the simplest way create index of content in special file, load , search client side. can use made package speedup dev time on option. (for example: https://www.npmjs.com/package/react-fuzzy-search )
the pro it's quite trivial do. cons index quite big large side , search done client side (so, maybe long waiting time user if index large enough). solution not scale well.
another way use search service (as saas or on own premises) externalize search functionality. service run server, have way index content (via api) , search ie (via api). make sure search api public , can query in realtime client side.
this solution scales because these sort of services made ground scale ! setup costs high, , not worth if don't plan scale millions of pages.
Comments
Post a Comment