enanomapper / data.enanomapper.net

Report issues or feature requests for eNanoMapper search page at
http://search.data.enanomapper.net
0 stars 2 forks source link

Auto-closing of range tags #93

Closed thejonan closed 7 years ago

thejonan commented 7 years ago

The problem of self-closing tags, that prevents range manipulation was found, and it is because of query results returned, which cause crash. Let's focus on this pivot-tag: P-Chem/Granulometry/Length. The initial query (cURL syntax):

curl 'https://sandbox.ideaconsult.net/solr/enm_shard1_replica1/autophrase?facet.limit=-1&facet.mincount=1&fq=%7B!collapse%20field%3Ds_uuid%7Dfalse&fl=id%2Ctype_s%2Cs_uuid%2Cdoc_uuid%2Ctopcategory%2Cendpointcategory%2Cguidance%2CsubstanceType%2Cname%2Cpublicname%2Creference%2Creference_owner%2Cinterpretation_result%2Creference_year%2Ccontent%2Cowner_name%2CP-CHEM.PC_GRANULOMETRY_SECTION.SIZE%2CCASRN.CORE%2CCASRN.COATING%2CCASRN.CONSTITUENT%2CCASRN.ADDITIVE%2CCASRN.IMPURITY%2CEINECS.CONSTITUENT%2CEINECS.ADDITIVE%2CEINECS.IMPURITY%2CChemicalName.CORE%2CChemicalName.COATING%2CChemicalName.CONSTITUENT%2CChemicalName.ADDITIVE%2CChemicalName.IMPURITY%2CTradeName.CONSTITUENT%2CTradeName.ADDITIVE%2CTradeName.IMPURITY%2CCOMPOSITION.CORE%2CCOMPOSITION.COATING%2CCOMPOSITION.CONSTITUENT%2CCOMPOSITION.ADDITIVE%2CCOMPOSITION.IMPURITY&json.nl=map&expand=true&expand.rows=3&q.alt=*%3A*&rows=20&facet=true&facet.field=%7B!ex%3Downer_name_tag%7Downer_name&facet.field=%7B!ex%3DsubstanceType_tag%7DsubstanceType&facet.field=%7B!ex%3Dcell_tag%7D_childDocuments_.params.Cell_line&facet.field=%7B!ex%3Dspecies_tag%7D_childDocuments_.params.Species&facet.field=%7B!ex%3Dinterpretation_tag%7Dinterpretation_result&facet.field=%7B!ex%3Dreference_year_tag%7Dreference_year&facet.field=%7B!ex%3Dreference_tag%7Dreference&facet.field=%7B!ex%3Dprotocol_tag%7Dguidance&facet.field=%7B!ex%3Dinstruments_tag%7D_childDocuments_.params.DATA_GATHERING_INSTRUMENTS&facet.field=%7B!ex%3Dendpointcategory_tag%7Dendpointcategory&facet.field=%7B!ex%3Deffectendpoint_tag%7Deffectendpoint&f.owner_name.facet.mincount=3&f.substanceType.facet.mincount=2&f.substanceType.facet.limit=-1&f._childDocuments_.params.Cell_line.facet.mincount=1&f.interpretation_result.facet.mincount=2&f.reference_year.facet.mincount=1&f.reference.facet.mincount=2&f.guidance.facet.mincount=2&facet.pivot=%7B!stats%3Dstudies_stats%20ex%3Dstudies_tag%7Dtopcategory%2Cendpointcategory%2Ceffectendpoint%2Cunit&stats=true&stats.field=%7B!tag%3Dstudies_stats%20min%3Dtrue%20max%3Dtrue%7DloValue&q=*%3A*&wt=json' -H 'Origin: http://evil.com/' -H 'Accept-Encoding: gzip, deflate, sdch, br' -H 'Accept-Language: en-US,en;q=0.8' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.98 Safari/537.36' -H 'Accept: application/json, text/javascript, */*; q=0.01' -H 'Cache-Control: max-age=0' -H 'Connection: keep-alive' --compressed

returns the following two sub-facets: mocrometer and nm, for unit field in the pivot topcategory,endpointcategory,effectendpoint,unit. After adding Length as a filter:

curl 'https://sandbox.ideaconsult.net/solr/enm_shard1_replica1/autophrase?facet.limit=-1&facet.mincount=1&fq=%7B!collapse%20field%3Ds_uuid%7Dfalse&fq=%7B!tag%3Deffectendpoint_tag%7Deffectendpoint%3ALength&fl=id%2Ctype_s%2Cs_uuid%2Cdoc_uuid%2Ctopcategory%2Cendpointcategory%2Cguidance%2CsubstanceType%2Cname%2Cpublicname%2Creference%2Creference_owner%2Cinterpretation_result%2Creference_year%2Ccontent%2Cowner_name%2CP-CHEM.PC_GRANULOMETRY_SECTION.SIZE%2CCASRN.CORE%2CCASRN.COATING%2CCASRN.CONSTITUENT%2CCASRN.ADDITIVE%2CCASRN.IMPURITY%2CEINECS.CONSTITUENT%2CEINECS.ADDITIVE%2CEINECS.IMPURITY%2CChemicalName.CORE%2CChemicalName.COATING%2CChemicalName.CONSTITUENT%2CChemicalName.ADDITIVE%2CChemicalName.IMPURITY%2CTradeName.CONSTITUENT%2CTradeName.ADDITIVE%2CTradeName.IMPURITY%2CCOMPOSITION.CORE%2CCOMPOSITION.COATING%2CCOMPOSITION.CONSTITUENT%2CCOMPOSITION.ADDITIVE%2CCOMPOSITION.IMPURITY&json.nl=map&expand=true&expand.rows=3&q.alt=*%3A*&rows=20&facet=true&facet.field=%7B!ex%3Downer_name_tag%7Downer_name&facet.field=%7B!ex%3DsubstanceType_tag%7DsubstanceType&facet.field=%7B!ex%3Dcell_tag%7D_childDocuments_.params.Cell_line&facet.field=%7B!ex%3Dspecies_tag%7D_childDocuments_.params.Species&facet.field=%7B!ex%3Dinterpretation_tag%7Dinterpretation_result&facet.field=%7B!ex%3Dreference_year_tag%7Dreference_year&facet.field=%7B!ex%3Dreference_tag%7Dreference&facet.field=%7B!ex%3Dprotocol_tag%7Dguidance&facet.field=%7B!ex%3Dinstruments_tag%7D_childDocuments_.params.DATA_GATHERING_INSTRUMENTS&facet.field=%7B!ex%3Dendpointcategory_tag%7Dendpointcategory&facet.field=%7B!ex%3Deffectendpoint_tag%7Deffectendpoint&f.owner_name.facet.mincount=3&f.substanceType.facet.mincount=2&f.substanceType.facet.limit=-1&f._childDocuments_.params.Cell_line.facet.mincount=1&f.interpretation_result.facet.mincount=2&f.reference_year.facet.mincount=1&f.reference.facet.mincount=2&f.guidance.facet.mincount=2&facet.pivot=%7B!stats%3Dstudies_stats%20ex%3Dstudies_tag%7Dtopcategory%2Cendpointcategory%2Ceffectendpoint%2Cunit&stats=true&stats.field=%7B!tag%3Dstudies_stats%20min%3Dtrue%20max%3Dtrue%7DloValue&q=*%3A*&wt=json' -H 'Accept: application/json, text/javascript, */*; q=0.01' -H 'Connection: keep-alive' -H 'Origin: http://evil.com/' -H 'Accept-Encoding: gzip, deflate, sdch, br' -H 'Accept-Language: en-US,en;q=0.8' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.98 Safari/537.36' --compressed

the pivot facet statistics changes (of course), but for the same sub-face (P-Chem/PC_GRANULOMETRY_SECTION/Length), the returned unit sub-facets are three: micrometer, nm and microm - this additional one is crashing the UI.

vedina commented 7 years ago

Hm, the query results are based on the data, can't change this.

Can you check the same query, but with the new data model?

vedina commented 7 years ago

This is fixed with the new jToxKit