Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

searching and indexing weighted tags / category ratings, ideally in the plone catalog

Tags:

plone

My use case is that content objects can have weighted tags:

  • ArticleA: java 5, MySQL 3, php 1
  • ArticleB: crypto 3, MySQL 2
  • ArticleC: plone 5, networking 1, security 4, agile 1
  • ArticleD: plone4, MySQL3, php 3 ...

The list of tags is user extendible, the range of values is fixed to e.g. 1 - 5

Now: how can I can I answer the following questions (ideally using portal_catalog):

  • show all Articles that are tagged with java>2 and MySQL>3
  • whats the average value for MySQL
  • whats the highest rated plone Article?
  • show all Articles that contain 'foobar' and are about plone

Possible solutions that come to my mind or were suggested so far are:

  • go SQL
  • create extra 'rating' content types that are indexed in a sperate catalog (pretty much like references)
  • encode the rating into 'java3', 'java4', 'java5', stick them into a KeywordIndex and check if AdvancedQuery can search them [update: yes, Between('Subject','plone3','plone5') works]
  • write a custom PluginIndex

I guess though that others had the same task before. Any ideas on how to (best) move forward on this?

like image 221
jhb Avatar asked Nov 14 '22 01:11

jhb


1 Answers

This problem can not be solved with Plone out-of-the-box. It would be possible to search for the differenct aspects using different searches and some filtering and aggregation on the application side with custom coding....might be tricky and inefficient. You may look into the SOLR integration with Plone (collective.solr). SOLR should support most of the functionality out of the box. Especially faceted search is a build-in feature of SOLR that you get for free. However SOLR is another brick inside your setup and might be oversized for smaller sites. In addition the SOLR integration and the SOLR buildout recipe always appeared a bit fragile.

like image 76
Andreas Jung Avatar answered Dec 26 '22 13:12

Andreas Jung