Issue 11217

Create hierarchical nub id filter

11217
Reporter: mdoering
Assignee: mdoering
Type: Improvement
Summary: Create hierarchical nub id filter
Priority: Critical
Resolution: Fixed
Status: Closed
Created: 2012-05-22 12:26:10.635
Updated: 2013-12-17 15:17:12.506
Resolved: 2012-12-21 13:19:07.192
        
Description: To activate the download link on species pages a search filter taking a nub id is needed. All records that have this nub(taxon) id in their parental hierarchy should be included in the match. For example when I want to download the family Asteraceae (nubid=3065) all genera, species and below that belong to the Asteraceae family should match.

Querying HBase might be done using the lft/rgt nested set indices or on a field which contains all parental nub ids (materialized path).]]>
    


Author: omeyn@gbif.org
Comment: Rather than lft rgt indices would be better to just add a filter to the hbase table scan that checks "higher taxa" for a given id.  Since we're doing a full scan anyway, it doesn't cost extra, and saves the headache of maintaining the lft rgt index.
Created: 2012-10-01 11:35:55.576
Updated: 2012-10-01 11:35:55.576


Author: trobertson@gbif.org
Created: 2012-11-21 10:28:34.889
Updated: 2012-11-21 10:30:01.905
        
Talk to Tim about other options before implementing (this can be done without modifying the current HBase design)

E.g. This can be done by:

WHERE kingdom_id=? OR phylum_id=? OR class_id=? OR .... nub_id=?
    


Author: omeyn@gbif.org
Comment: [~trobertson@gbif.org] your where clause is what i meant with a "scan that checks higher taxa"
Created: 2012-11-22 15:08:36.559
Updated: 2012-11-22 15:08:36.559


Author: mdoering@gbif.org
Comment: done by treating the taxon_key parameter special via appendTaxonKeyFilter in the HiveQueryVisitor.java in http://code.google.com/p/gbif-occurrencestore/source/detail?r=1746
Created: 2012-12-21 13:19:07.224
Updated: 2012-12-21 13:19:07.224