You might be able to stick in a couple of PatternReplaceFilterFactory
in a row with regular expressions to catch different levels.

Something like:

<filter class="solr.PatternReplaceFilterFactory"
pattern="^[^0-9][^/]+/[^/]/[^/]+$" replacement="2$0" />
<filter class="solr.PatternReplaceFilterFactory"
pattern="^[^0-9][^/]+/[^/]$" replacement="1$0" />
...

I did not test this, you may need to escape some thing or put explicit
groups in there.

Regards,
   Alex.
P.s. 
http://www.solr-start.com/javadoc/solr-lucene/org/apache/lucene/analysis/pattern/PatternReplaceFilterFactory.html

Personal: http://www.outerthoughts.com/ and @arafalov
Solr resources and newsletter: http://www.solr-start.com/ and @solrstart
Solr popularizers community: https://www.linkedin.com/groups?gid=6713853


On 17 November 2014 15:01, rashmy1 <rashmy.appanerava...@siemens.com> wrote:
> Hi Alexandre,
> Yes, I've read this post and that's the 'Option1' listed in my initial post.
>
> I'm looking to see if Solr has any in-built tokenizer that splits the tokens
> and prepends with the depth information. I'd like to avoid building depth
> information into the filed values if Solr already has something that can be
> used.
>
> Thanks!
>
>
>
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/Hierarchical-faceting-tp4169263p4169536.html
> Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to