Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

The /wiki/spaces/PD/pages/24707083 page explains how to add or change the metadata of a SOLR document. However, the one piece of information you cannot change that way is the document's location. And sometimes this is just what you want or need to do. For example, when your website is running on https but the SSL offloading is performed by the loadbalancer in front of your server, indexing the website with the https url's is not possible. You have to change them to http.

The wmasolrsearch bundle of GX WebManager defines a UrlProvider service in the nl.gx.product.wmasolrsearch.api package for this purpose.

Adding url's

To add your own set of url's to the SOLR index, you can define a new Service that implements the UrlProvider interface and implements the method

    List<String> getUrlList(boolean includeAll);

Using the OSGi dependency mechanism in GX WebManager, this new UrlProvider service is automatically picked up by the SearchService, and its list of url's is appended to the default list of GX WebManager.

Changing or excluding url's

Urls can be changed and or removed by creating a new UrlFilter service. The method filterURLs must be implemented and return the new filtered urls. Similar to the UrlProvider all UrlFilter services are automatically picked up by the SearchService when the OSGi bundle is installed.

Example

See also the attached example: urlProviderService.zip

  • No labels