sulu / SuluArticleBundle

Bundle for managing localized content-rich entities like blog-posts in the Sulu content management system
MIT License
57 stars 78 forks source link

ArticleBundle even without Elasticsearch #430

Open csaeum opened 4 years ago

csaeum commented 4 years ago

ES is currently a requirement for ArticleBundle

especially for small pages or blogs that are just starting, this is simply too big. I would appreciate it if you could switch via config. First a normal search using SQL Query as standard and whoever wants can then switch to ES.

TheCadien commented 4 years ago

i write my own news bundle for exactly that case. its still in progress, but feel free to take a look https://github.com/TheCadien/sulu-news-bundle

alexander-schranz commented 4 years ago

@TheCadien we are improving adding content behaviours (Template, Seo, Excerpt) to custom entity with https://github.com/sulu/SuluContentBundle. Its still in development but you can see an example implementation in the tests folder of the bundle: https://github.com/sulu/SuluContentBundle/tree/master/Tests/Application/ExampleTestBundle So you don't need to reinvent all by yourself.

TheCadien commented 4 years ago

@alexander-schranz oh realy nice to hear !

csaeum commented 4 years ago

@alexander-schranz Ok, everything sounds good. But to what extent could the IT be outsourced. So that the requirements with ES are not too great for small pages?

alexander-schranz commented 4 years ago

@csaeum not sure if I understand you correctly if you want to outsource elastic search there are SaaS for example elastic cloud. But never used something like that.

csaeum commented 4 years ago

It is clear to me that I can outsource IT, but for small websites or projects IT itself is too much. A normal search would suffice for maybe 50 subpages.

My question is why you include it in the Article Bundle as an obligation and not outsource it as a bundle!

So small pages can also operate the ArticleBundle without ES and have a search that relies on SQL.

If the project then becomes larger, the operator of the site can decide whether to install ES himself or get a SAAS from ES and install an ES bundle from SULU (which may then be available) and enter this in the config from now on no longer the SQL search is taken but the ES search.

Exactly for this reason @TheCadien created his bundle because the ES is just too big for his small projects.

markuman commented 4 years ago

Elasticsearch is expensive - in any case.
Self-driven costs a lot of ressources (cpu, memory, time (people, knowledge)).
Elasticsearch SaaS solutions are very very expensive (money) too.

So outsourcing is not a solution!

This bundle is simply bad designed. Have you ever consider to use just the fulltext index feature of the existing rdbms (mysql/mariadb/postgres)?

alexander-schranz commented 4 years ago

@markuman @csaeum Thanks for your feedback.

We are aware of it that Elasticsearch is something which is not for small websites. The SuluArticleBundle was first designed for big publisher websites and we open source it to make it available for the community. The ES is not used only as search in this bundle here also for performance of large overview pages to load them directly out of ES instead of PHPCR.

I understand that somebody building just a simple blog its annoying that you have this additional requirement and we are working on it to provide in future a better alternative for this sites.

Until out of the box I can only provide you the solution above or you create an own webspace for your blogs. As a webspace itself does not need to be a domain in sulu it can also be a subfolder e.g.:

<url language="en">{host}/blog</url>
niklasnatter commented 4 years ago

As @alexander-schranz already mentioned, this bundle was designed for managing a large number of articles (> 10.000) while not neglecting performance. This is not an easy task with traditional RDBMS because it was a requirement to keep the approach of unstructured data that is also used for pages in sulu.

We would love to provide a solution that does not require Elasticsearch in the future and we are already taking the first steps in that direction with the SuluContentBundle. But keep in mind that this is an open source project that lives from community contributions. Until then, it might be an alternative to just use the pagetree of sulu for small blogs. For example, you can publish your blog posts as subpages of a specific page and use a smart_content element to display them on your overview page.

rogoit commented 1 year ago

Its is really hard to have so much ES instances. Also for preview and staging environments. Cant there be an optional flag where to store the content?