close

Filter

Adaptive Personalization Manual / Version 2010

Table Of Contents

4.6 Working With Search Queries

You can use queries to the CoreMedia Search Engine to dynamically compile parts of your website's pages. Nevertheless, using this method, you do not have context information for your queries. To solve this problem, search functions provided by CoreMedia Adaptive Personalization come in handy. They enable you to include context-specific data into your queries, thus providing you with another means to adapt your site to the visitor.

Example

You use folders in the CMS repository, that represent a specific customer segment. That is, each folder contains content that will be shown to a user who is member of the respective segment. Now, you compile a page about sports products and want to show content depending on the user's segment. Let's say, Skateboard products for the young urban segment and Golf products for the successful prime-age manager segment. Now, you can use a search query similar to sports userSegment(). Where userSegment() is a search function that is evaluated at query time and presumably adds the required folder constraint to the query. That is, if the user is in the segment mapped to the folder of id 23, the string actually sent to the search engine would be sports folderid:23 (assuming folderid is the field, IDs of folders get fed to).

CoreMedia Adaptive Personalization comes with some generally useful functions in the com.coremedia.personalization.search package. Nevertheless, since search functions are very project specific, you will use these delivered functions as a starting point for your own functions.

Search Results

Table Of Contents