I haven't fully digested your species hierarchy requirements, but you can do
just about anything in a Solr update processor. So you can parse the string
and then put pieces into different fields to represent portions of the
hierarchy. Then at query time, your application facet navigation is simply
using the prefix from the facet selection as a filter on one of those fields
in which the various hierarchy components are stored.
Alternatively, you may be able to get by using the path hierarchy tokenizer:
http://lucene.apache.org/core/4_0_0/analyzers-common/org/apache/lucene/analysis/path/PathHierarchyTokenizerFactory.html
Or maybe a combination of the two approaches.
I think I have some examples of it in my e-book.
-- Jack Krupansky
-----Original Message-----
From: Dan Bolser
Sent: Friday, July 4, 2014 11:57 AM
To: solr-user
Subject: Re: Field for 'species' data?
The problem is that each document has a single species (or
super-species, or sub-species), and needs to get information about
it's place in the hierarchy 'elsewhere', i.e. in an externally encoded
hierarchy.
I don't, for example, have data in this format:
SPECIES: "Hordeum / Hordeum vulgare / Hordeum vulgare var. hybernum"
but rather
SPECIES: "Hordeum vulgare".
How can I add in that data at analysis time?
Cheers,
Dan.
On 4 July 2014 04:19, Gora Mohanty <g...@mimirtech.com> wrote:
On 3 July 2014 21:40, Dan Bolser <dbol...@ebi.ac.uk> wrote:
Hi,
Does anyone on the list have experience with hierarchical facets,
specifically for species data?
[...]
Maybe not specifically for species data, but hierarchical faceting works
pretty well with Solr. Please see
http://wiki.apache.org/solr/HierarchicalFaceting
For your use case, I would probably use pivot facets:
http://wiki.apache.org/solr/HierarchicalFaceting#Pivot_Facets
Regards,
Gora