Issue 12582
NameType filter in NameUsage search is handled incorrectly
12582
Reporter: fmendez
Type: Bug
Summary: NameType filter in NameUsage search is handled incorrectly
Description: NameType is stored as integer in Solr but the ws parameter expects a enum literal org.gbif.api.vocabulary.NameType.*
Priority: Major
Resolution: Invalid
Status: Closed
Created: 2013-01-10 12:17:17.725
Updated: 2013-12-09 14:01:23.648
Resolved: 2013-01-25 10:55:57.666
Author: mdoering@gbif.org
Comment: ... which is correct, we use the integer in solr to save space and gain performance, but expose all enums in the ws layer via their value names. The translation of enum to int should be done in the search service. The generic solr query builder for example does so already
Created: 2013-01-10 12:19:12.251
Updated: 2013-01-10 12:19:12.251
Author: mdoering@gbif.org
Comment: is this a clb issue rather than portal one?
Created: 2013-01-10 12:20:10.171
Updated: 2013-01-10 12:20:10.171
Author: fmendez@gbif.org
Comment: yes is a clb issue
Created: 2013-01-10 12:30:29.53
Updated: 2013-01-10 12:30:29.53
Author: mdoering@gbif.org
Comment: can you post a search that is handled wrongly?
Created: 2013-01-10 12:45:44.434
Updated: 2013-01-10 12:45:44.434
Author: fmendez@gbif.org
Created: 2013-01-10 13:24:57.617
Updated: 2013-01-10 13:24:57.617
well, the query looks ok: q=%28canonical_name_as_phrase%3Apuma%5E1000%29+OR+%28canonical_name_as%3Apuma%5E300%29&rows=20&start=0&q.alt=*%3A*&fq=%28-name_type%3A6+OR+-name_type%3A3%29&fq=dataset_key%3Ad7dddbf4-2cf0-4f39-9b2a-bb099caae36c&hl.snippets=10&hl.fragsize=0 name_type is correctly translated from enum to integer.
There's an issue: "fq=%28-name_type%3A6+OR+-name_type%3A3%29" should be and AND instead of a OR.