Wiki

Clone wiki

url-pattern-facet / Home

url-pattern-facet

org.cdlib.dsc.solr.TransformCopyProcessorFactory extends UpdateRequestProcessorFactory 'Override'ing processAdd() to add facet values based on the value of "url" field.

org.cdlib.dsc.solr.SimpleFacet has a method fieldTransform that takes the String of the url and return the String to go in the host field

org.cdlib.dsc.solr.SimpleFacetTest is a very simple jUnit test

ant build

will remove the classes directory, create it again, compile the sources, and run the jUnit test.

License

BSD style Copyright 2010 UC Regents all rights reserved

version 1

This version is under active development. It adds an index field "host" such that a page with a url of http://example.org/test will get a value example.org in the index.

version 2

add a second level domain option (ignore subdomains) to group all so www.example.edu and library.example.edu all get example.edu

add regex based facet value substituion, keeping in mind that the facet values are also going to be used for display labels to the end user; if no regex's match, just output a hostname?

Updated