[opencms-dev] Custom collector with parametrized search

Pere Torrodellas ptorrodellas at fihoca.com
Thu Mar 13 11:51:53 CET 2008


  ----- Original Message ----- 
  From: Juan Francisco Fernández Rodríguez 
  To: 'The OpenCms mailing list' 
  Sent: Thursday, March 13, 2008 10:08 AM
  Subject: [opencms-dev] Custom collector with parametrized search


  Hi list,

   

  In my OpenCms system, I have a custom xmlcontent for news that is displayed as a list, and now I have to allow the user to filter that list by some fields of the content (title, country, dates, category, some Boolean fields, etc.). I'm thinking to extend CmsSearchIndex to rebuild the Lucene's search query to perform a search in the fields specified by the user. Is this the best solution? 
   

If the number of documents is relatively small, as was our case, you can do it just by defining a standard index on the relevant folder(s), perform the standard search on the system attributes (i.e. title, keywords, content, etc) and then filtering the result looking into each document for the other filter attributes. Not very performant, but simple and not that bad for small sets.

Pere
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20080313/1e163722/attachment.htm>


More information about the opencms-dev mailing list