You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Stephan Schubert <ma...@stephan-schubert.com> on 2014/01/06 06:43:42 UTC

PathHierarchyTokenizerFactory storage for pivot facets

I want to store the levels of an path/url in seperate fields to make use
of pivot faceting. I thought about using the
PathHierarchyTokenizerFactory for that. But how can I store the several
levels of an url in seperate fields?

Example:

Doc1 - Path: a/b/c/d
Doc2 - Path: f/g/h/i

Document 1 should store the value of a in a field something like
urllevel1, b in field
urllevel2, c in urllevel 3 and so on.
The same for document 2 like f in field urllevel1, g in urllevel2  and h
in urllevel3.

Is the PathHierarchyTokenizerFactory the right approach for that? I know
the PathHierarchyTokenizerFactory splits the path up, but I don't know
how I can store the several levels in the specific fields and set it up
in the schema.xml.


Re: PathHierarchyTokenizerFactory storage for pivot facets

Posted by Ahmet Arslan <io...@yahoo.com>.
Hi Stephan,

If you want to populate some fields from Path info, UpdateRequestProcessorFactory is a better fit. You can use URLClassifyProcessor(Factory).java as an example.

Ahmet


On Monday, January 6, 2014 7:46 AM, Stephan Schubert <ma...@stephan-schubert.com> wrote:
I want to store the levels of an path/url in seperate fields to make use
of pivot faceting. I thought about using the
PathHierarchyTokenizerFactory for that. But how can I store the several
levels of an url in seperate fields?

Example:

Doc1 - Path: a/b/c/d
Doc2 - Path: f/g/h/i

Document 1 should store the value of a in a field something like
urllevel1, b in field
urllevel2, c in urllevel 3 and so on.
The same for document 2 like f in field urllevel1, g in urllevel2  and h
in urllevel3.

Is the PathHierarchyTokenizerFactory the right approach for that? I know
the PathHierarchyTokenizerFactory splits the path up, but I don't know
how I can store the several levels in the specific fields and set it up
in the schema.xml.