Skip to content

Instantly share code, notes, and snippets.

@jasongilman
Created December 23, 2011 02:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasongilman/90c73a011836f5c37bfa to your computer and use it in GitHub Desktop.
Save jasongilman/90c73a011836f5c37bfa to your computer and use it in GitHub Desktop.
query, indexed document, and mapping file that produces elastic search problem
# The simplest query that I can get to fail
{"fields":["dataset_id","granule_ur"],"from":0,"query":{"filtered":{"filter":{"and":[{"and":[{"nested":{"path":"minimum_bounding_rectangles","query":{"constant_score":{"filter":{"and":[{"or":[{"and":[{"or":[{"range":{"west":{"from":-180.0,"to":-3.1640000000000001}}}]},{"term":{"antimeridian":true}}]},{"and":[{"range":{"west":{"from":-180.0,"to":-3.1640000000000001}}},{"range":{"east":{"from":-60.116999999999997,"to":180.0}}}]}]}]}}}}},{"term":{"echo_collection_id":"C1293-NSIDCV0TST"}}]},{"term":{"permitted_group_ids":"guest"}}]},"query":{"match_all":{}}}},"size":2100,"sort":["dataset_id.lowercase"]}
# The only possible document that could match the query. The echo_collection_id in it is a unique identifier
{
"_id": "C1293-NSIDCV0TST",
"_index": "echo",
"_source": {
"begin_date": "2002-06-16T01:00:00-0000",
"browse_only": false,
"dataset_id": "SMEX02 SMACEX Tower Meteorological/Flux Data: Iowa",
"dataset_id.lowercase": "smex02 smacex tower meteorological/flux data: iowa",
"dataset_ln": "SMEX02 SMACEX Tower Meteorological/Flux Data: Iowa",
"dataset_ln.lowercase": "smex02 smacex tower meteorological/flux data: iowa",
"dataset_sn": "NSIDC-0438",
"dataset_sn.lowercase": "nsidc-0438",
"dataset_version_id": "Undefined",
"dataset_version_id.lowercase": "undefined",
"description": "Notice to Data Users: The documentation for this data set was provided solely by the Principal Investigator(s) and was not further developed, thoroughly reviewed, or edited by NSIDC. Thus, support for this data set may be limited.\n\nThis data set contains meteorological and flux data collected from 16 June 2002 through 09 July 2002 within the Walnut Creek watershed in central Iowa, USA. The data set includes eddy covariance and ancillary data measured from a variety of sensors mounted on meteorological towers in agricultural fields. The study was part of the Soil Moisture Experiment 2002 (SMEX02) and the Soil Moisture Atmosphere Coupling Experiment (SMACEX), run by Canada's National Research Council (NRC). Parameters for this data set include net radiation, air and soil temperature, a variety of flux parameters, mean wind speed/direction, friction velocity, vapor pressure, and other meteorological parameters. Data are provided in tab-delimited ASCII text files and are available via FTP.\n\nThese data were collected as part of a validation study for the Advanced Microwave Scanning Radiometer - Earth Observing System (AMSR-E). AMSR-E is a mission instrument launched aboard NASA's Aqua Satellite on 04 May 2002. AMSR-E validation studies linked to SMEX are designed to evaluate the accuracy of AMSR-E soil moisture data. Specific validation objectives include assessing and refining soil moisture algorithm performance; verifying soil moisture estimation accuracy; investigating the effects of vegetation, surface temperature, topography, and soil texture on soil moisture accuracy; and determining the regions that are useful for AMSR-E soil moisture measurements.",
"description.lowercase": "notice to data users: the documentation for this data set was provided solely by the principal investigator(s) and was not further developed, thoroughly reviewed, or edited by nsidc. thus, support for this data set may be limited.\n\nthis data set contains meteorological and flux data collected from 16 june 2002 through 09 july 2002 within the walnut creek watershed in central iowa, usa. the data set includes eddy covariance and ancillary data measured from a variety of sensors mounted on meteorological towers in agricultural fields. the study was part of the soil moisture experiment 2002 (smex02) and the soil moisture atmosphere coupling experiment (smacex), run by canada's national research council (nrc). parameters for this data set include net radiation, air and soil temperature, a variety of flux parameters, mean wind speed/direction, friction velocity, vapor pressure, and other meteorological parameters. data are provided in tab-delimited ascii text files and are available via ftp.\n\nthese data were collected as part of a validation study for the advanced microwave scanning radiometer - earth observing system (amsr-e). amsr-e is a mission instrument launched aboard nasa's aqua satellite on 04 may 2002. amsr-e validation studies linked to smex are designed to evaluate the accuracy of amsr-e soil moisture data. specific validation objectives include assessing and refining soil moisture algorithm performance; verifying soil moisture estimation accuracy; investigating the effects of vegetation, surface temperature, topography, and soil texture on soil moisture accuracy; and determining the regions that are useful for amsr-e soil moisture measurements.",
"dif_id": [
"NSIDC-0438"
],
"dif_id.lowercase": [
"nsidc-0438"
],
"echo_collection_id": "C1293-NSIDCV0TST",
"echo_collection_id.lowercase": "c1293-nsidcv0tst",
"echo_insert_date": "2010-05-10T21:16:54-0000",
"echo_last_update": "2010-05-14T18:11:21-0000",
"end_date": "2002-07-09T23:59:59-0000",
"instrument_ln": [
"EDDY CORRELATION DEVICES",
"HUMIDITY SENSORS",
"ANEMOMETERS",
"SOIL HEAT FLUX TRANSDUCER",
"THERMOCOUPLES",
"CO2 ANALYZERS",
"SONIC ANEMOMETER",
"RADIOMETERS"
],
"instrument_ln.lowercase": [
"eddy correlation devices",
"humidity sensors",
"anemometers",
"soil heat flux transducer",
"thermocouples",
"co2 analyzers",
"sonic anemometer",
"radiometers"
],
"instrument_sn": [
"EDDY CORRELATION DEVICES",
"HUMIDITY SENSORS",
"ANEMOMETERS",
"SOIL HEAT FLUX TRANSDUCER",
"THERMOCOUPLES",
"CO2 ANALYZERS",
"SONIC ANEMOMETER",
"RADIOMETERS"
],
"instrument_sn.lowercase": [
"eddy correlation devices",
"humidity sensors",
"anemometers",
"soil heat flux transducer",
"thermocouples",
"co2 analyzers",
"sonic anemometer",
"radiometers"
],
"minimum_bounding_rectangles": [
{
"antimeridian": false,
"east": -93.530000000000001,
"north": 41.990000000000002,
"south": 41.93,
"west": -93.75
}
],
"online_access_url": [
"http://nsidc.org/data/nsidc-0438.html"
],
"online_access_url.lowercase": [
"http://nsidc.org/data/nsidc-0438.html"
],
"online_only": true,
"permitted_group_ids": [
"guest",
"registered",
"448AC23C-AFEA-12DE-7E94-01B943454373",
"70E7D47F-70C0-DD39-938A-64FB65E731F5",
"7C70DD684E182FB6E04400144F3877CD",
"2E390D1C-081B-7AB7-1805-5EA4184A9513",
"B7B65D34-99FC-B59B-95D0-E2CE5C05A3BB"
],
"platform_ln": [
"GROUND-BASED OBSERVATIONS",
"Not Applicable"
],
"platform_ln.lowercase": [
"ground-based observations",
"not applicable"
],
"platform_sn": [
"GROUND-BASED OBSERVATIONS",
"N/A"
],
"platform_sn.lowercase": [
"ground-based observations",
"n/a"
],
"provider_id": "NSIDCV0TST",
"provider_id.lowercase": "nsidcv0tst",
"science_keywords": [
{
"category_keyword": "EARTH SCIENCE",
"category_keyword.lowercase": "earth science",
"term_keyword": "ATMOSPHERIC RADIATION",
"term_keyword.lowercase": "atmospheric radiation",
"topic_keyword": "ATMOSPHERE",
"topic_keyword.lowercase": "atmosphere",
"variable_level_1_keyword": "LONGWAVE RADIATION",
"variable_level_1_keyword.lowercase": "longwave radiation"
},
{
"category_keyword": "EARTH SCIENCE",
"category_keyword.lowercase": "earth science",
"term_keyword": "ATMOSPHERIC RADIATION",
"term_keyword.lowercase": "atmospheric radiation",
"topic_keyword": "ATMOSPHERE",
"topic_keyword.lowercase": "atmosphere",
"variable_level_1_keyword": "HEAT FLUX",
"variable_level_1_keyword.lowercase": "heat flux"
},
{
"category_keyword": "EARTH SCIENCE",
"category_keyword.lowercase": "earth science",
"term_keyword": "ATMOSPHERIC RADIATION",
"term_keyword.lowercase": "atmospheric radiation",
"topic_keyword": "ATMOSPHERE",
"topic_keyword.lowercase": "atmosphere",
"variable_level_1_keyword": "NET RADIATION",
"variable_level_1_keyword.lowercase": "net radiation"
},
{
"category_keyword": "EARTH SCIENCE",
"category_keyword.lowercase": "earth science",
"term_keyword": "ATMOSPHERIC PRESSURE",
"term_keyword.lowercase": "atmospheric pressure",
"topic_keyword": "ATMOSPHERE",
"topic_keyword.lowercase": "atmosphere",
"variable_level_1_keyword": "ATMOSPHERIC PRESSURE MEASUREMENTS",
"variable_level_1_keyword.lowercase": "atmospheric pressure measurements"
},
{
"category_keyword": "EARTH SCIENCE",
"category_keyword.lowercase": "earth science",
"term_keyword": "ATMOSPHERIC WINDS",
"term_keyword.lowercase": "atmospheric winds",
"topic_keyword": "ATMOSPHERE",
"topic_keyword.lowercase": "atmosphere",
"variable_level_1_keyword": "SURFACE WINDS",
"variable_level_1_keyword.lowercase": "surface winds"
},
{
"category_keyword": "EARTH SCIENCE",
"category_keyword.lowercase": "earth science",
"term_keyword": "ATMOSPHERIC RADIATION",
"term_keyword.lowercase": "atmospheric radiation",
"topic_keyword": "ATMOSPHERE",
"topic_keyword.lowercase": "atmosphere",
"variable_level_1_keyword": "RADIATIVE FLUX",
"variable_level_1_keyword.lowercase": "radiative flux"
},
{
"category_keyword": "EARTH SCIENCE",
"category_keyword.lowercase": "earth science",
"term_keyword": "SOILS",
"term_keyword.lowercase": "soils",
"topic_keyword": "AGRICULTURE",
"topic_keyword.lowercase": "agriculture",
"variable_level_1_keyword": "SOIL TEMPERATURE",
"variable_level_1_keyword.lowercase": "soil temperature"
},
{
"category_keyword": "EARTH SCIENCE",
"category_keyword.lowercase": "earth science",
"term_keyword": "ATMOSPHERIC RADIATION",
"term_keyword.lowercase": "atmospheric radiation",
"topic_keyword": "ATMOSPHERE",
"topic_keyword.lowercase": "atmosphere",
"variable_level_1_keyword": "SHORTWAVE RADIATION",
"variable_level_1_keyword.lowercase": "shortwave radiation"
},
{
"category_keyword": "EARTH SCIENCE",
"category_keyword.lowercase": "earth science",
"term_keyword": "ATMOSPHERIC TEMPERATURE",
"term_keyword.lowercase": "atmospheric temperature",
"topic_keyword": "ATMOSPHERE",
"topic_keyword.lowercase": "atmosphere",
"variable_level_1_keyword": "AIR TEMPERATURE",
"variable_level_1_keyword.lowercase": "air temperature"
}
],
"search_keyword": "NSIDCV0TST nsidcv0tst C1293-NSIDCV0TST c1293 c1293-nsidcv0tst SMEX02 SMACEX Tower Meteorological/Flux Data: Iowa smex02 smacex tower meteorological flux data: iowa meteorological/flux NSIDC-0438 nsidc 0438 nsidc-0438 Notice to Data Users: The documentation for this data set was provided solely by the Principal Investigator(s) and was not further developed, thoroughly reviewed, or edited by NSIDC. Thus, support for this data set may be limited.\n\nThis data set contains meteorological and flux data collected from 16 June 2002 through 09 July 2002 within the Walnut Creek watershed in central Iowa, USA. The data set includes eddy covariance and ancillary data measured from a variety of sensors mounted on meteorological towers in agricultural fields. The study was part of the Soil Moisture Experiment 2002 (SMEX02) and the Soil Moisture Atmosphere Coupling Experiment (SMACEX), run by Canada's National Research Council (NRC). Parameters for this data set include net radiation, air and soil temperature, a variety of flux parameters, mean wind speed/direction, friction velocity, vapor pressure, and other meteorological parameters. Data are provided in tab-delimited ASCII text files and are available via FTP.\n\nThese data were collected as part of a validation study for the Advanced Microwave Scanning Radiometer - Earth Observing System (AMSR-E). AMSR-E is a mission instrument launched aboard NASA's Aqua Satellite on 04 May 2002. AMSR-E validation studies linked to SMEX are designed to evaluate the accuracy of AMSR-E soil moisture data. Specific validation objectives include assessing and refining soil moisture algorithm performance; verifying soil moisture estimation accuracy; investigating the effects of vegetation, surface temperature, topography, and soil texture on soil moisture accuracy; and determining the regions that are useful for AMSR-E soil moisture measurements. notice to data users: the documentation for this set was provided solely by principal investigator(s) and not further developed, thoroughly reviewed, or edited thus, support may be limited contains collected from 16 june 2002 through 09 july within walnut creek watershed in central iowa, usa includes eddy covariance ancillary measured a variety of sensors mounted on towers agricultural fields study part soil moisture experiment (smex02) atmosphere coupling (smacex), run canada's national research council (nrc) parameters include net radiation, air temperature, parameters, mean wind speed direction, friction velocity, vapor pressure, other are tab delimited ascii text files available via ftp these were as validation advanced microwave scanning radiometer earth observing system (amsr e) amsr e is mission instrument launched aboard nasa's aqua satellite 04 studies linked smex designed evaluate accuracy specific objectives assessing refining algorithm performance; verifying estimation accuracy; investigating effects vegetation, surface topography, texture determining regions that useful measurements nsidc. limited. usa. fields. (nrc). speed/direction, parameters. tab-delimited ftp. - (amsr-e). amsr-e 2002. data. measurements. Undefined undefined EARTH SCIENCE science ATMOSPHERE ATMOSPHERIC RADIATION atmospheric radiation LONGWAVE RADIATION longwave HEAT FLUX heat NET RADIATION ATMOSPHERIC PRESSURE pressure ATMOSPHERIC PRESSURE MEASUREMENTS ATMOSPHERIC WINDS winds SURFACE WINDS RADIATIVE FLUX radiative AGRICULTURE agriculture SOILS soils SOIL TEMPERATURE temperature SHORTWAVE RADIATION shortwave ATMOSPHERIC TEMPERATURE AIR TEMPERATURE GROUND-BASED OBSERVATIONS ground based observations ground-based N/A n n/a Not Applicable applicable EDDY CORRELATION DEVICES correlation devices HUMIDITY SENSORS humidity ANEMOMETERS anemometers SOIL HEAT FLUX TRANSDUCER transducer THERMOCOUPLES thermocouples CO2 ANALYZERS co2 analyzers SONIC ANEMOMETER sonic anemometer RADIOMETERS radiometers",
"start_date": "2002-06-16T01:00:00-0000"
},
"_type": "dataset",
"_version": 2,
"exists": true
}
# The mapping file
{"dataset": {
"dynamic" : "strict",
"_all" : {"enabled" : false},
"_source" : {"compress" : true},
"properties":
{
"permitted_group_ids":{"type":"string","index":"not_analyzed"},
"provider_id":{"type":"string","index":"not_analyzed"},
"provider_id.lowercase":{"type":"string","index":"not_analyzed"},
"echo_collection_id":{"type":"string","index":"not_analyzed"},
"echo_collection_id.lowercase":{"type":"string","index":"not_analyzed"},
"archive_center":{"type":"string","index":"not_analyzed"},
"archive_center.lowercase":{"type":"string","index":"not_analyzed"},
"dataset_id":{"type":"string","index":"not_analyzed"},
"dataset_id.lowercase":{"type":"string","index":"not_analyzed"},
"dataset_ln":{"type":"string","index":"not_analyzed"},
"dataset_ln.lowercase":{"type":"string","index":"not_analyzed"},
"dataset_sn":{"type":"string","index":"not_analyzed"},
"dataset_sn.lowercase":{"type":"string","index":"not_analyzed"},
"dataset_version_id":{"type":"string","index":"not_analyzed"},
"dataset_version_id.lowercase":{"type":"string","index":"not_analyzed"},
"description":{"type":"string","index":"not_analyzed"},
"description.lowercase":{"type":"string","index":"not_analyzed"},
"processing_level":{"type":"string","index":"not_analyzed"},
"processing_level.lowercase":{"type":"string","index":"not_analyzed"},
"suggested_usage":{"type":"string","index":"not_analyzed"},
"suggested_usage.lowercase":{"type":"string","index":"not_analyzed"},
"version_desc":{"type":"string","index":"not_analyzed"},
"version_desc.lowercase":{"type":"string","index":"not_analyzed"},
"addl_attr_name":{"type":"string","index":"not_analyzed"},
"addl_attr_name.lowercase":{"type":"string","index":"not_analyzed"},
"campaign_ln":{"type":"string","index":"not_analyzed"},
"campaign_ln.lowercase":{"type":"string","index":"not_analyzed"},
"campaign_sn":{"type":"string","index":"not_analyzed"},
"campaign_sn.lowercase":{"type":"string","index":"not_analyzed"},
"dif_id":{"type":"string","index":"not_analyzed"},
"dif_id.lowercase":{"type":"string","index":"not_analyzed"},
"instrument_ln":{"type":"string","index":"not_analyzed"},
"instrument_ln.lowercase":{"type":"string","index":"not_analyzed"},
"instrument_sn":{"type":"string","index":"not_analyzed"},
"instrument_sn.lowercase":{"type":"string","index":"not_analyzed"},
"online_access_url":{"type":"string","index":"not_analyzed"},
"online_access_url.lowercase":{"type":"string","index":"not_analyzed"},
"online_resource_url":{"type":"string","index":"not_analyzed"},
"online_resource_url.lowercase":{"type":"string","index":"not_analyzed"},
"platform_ln":{"type":"string","index":"not_analyzed"},
"platform_ln.lowercase":{"type":"string","index":"not_analyzed"},
"platform_sn":{"type":"string","index":"not_analyzed"},
"platform_sn.lowercase":{"type":"string","index":"not_analyzed"},
"sensor_ln":{"type":"string","index":"not_analyzed"},
"sensor_ln.lowercase":{"type":"string","index":"not_analyzed"},
"sensor_sn":{"type":"string","index":"not_analyzed"},
"sensor_sn.lowercase":{"type":"string","index":"not_analyzed"},
"spatial_keyword":{"type":"string","index":"not_analyzed"},
"spatial_keyword.lowercase":{"type":"string","index":"not_analyzed"},
"temporal_keyword":{"type":"string","index":"not_analyzed"},
"temporal_keyword.lowercase":{"type":"string","index":"not_analyzed"},
"twod_coord_name":{"type":"string","index":"not_analyzed"},
"twod_coord_name.lowercase":{"type":"string","index":"not_analyzed"},
"online_only":{"type":"boolean","index":"not_analyzed"},
"browse_only":{"type":"boolean","index":"not_analyzed"},
"restriction_flag":{"type":"float"},
"search_keyword":{"type":"string"},
"orbit_inclination_angle":{"type":"float"},
"orbit_swath_width":{"type":"float"},
"orbit_period":{"type":"float"},
"orbit_number_of_orbits":{"type":"float"},
"orbit_start_clat":{"type":"float"},
"echo_insert_date":{"type":"date","format":"yyyy-MM-dd'T'HH:mm:ssZ||yyyy-MM-dd'T'HH:mm:ss.SSSZ"},
"begin_date":{"type":"date","format":"yyyy-MM-dd'T'HH:mm:ssZ||yyyy-MM-dd'T'HH:mm:ss.SSSZ"},
"echo_last_update":{"type":"date","format":"yyyy-MM-dd'T'HH:mm:ssZ||yyyy-MM-dd'T'HH:mm:ss.SSSZ"},
"minimum_bounding_rectangles": {
"type" : "nested",
"dynamic" : "strict",
"properties": {
"west":{"type":"double"},
"north":{"type":"double"},
"east":{"type":"double"},
"south":{"type":"double"},
"antimeridian":{"type":"boolean"}
}
},
"science_keywords" : {
"type" : "nested",
"dynamic" : "strict",
"properties" : {
"category_keyword":{"type":"string","index":"not_analyzed"},
"category_keyword.lowercase":{"type":"string","index":"not_analyzed"},
"topic_keyword":{"type":"string","index":"not_analyzed"},
"topic_keyword.lowercase":{"type":"string","index":"not_analyzed"},
"term_keyword":{"type":"string","index":"not_analyzed"},
"term_keyword.lowercase":{"type":"string","index":"not_analyzed"},
"variable_level_1_keyword":{"type":"string","index":"not_analyzed"},
"variable_level_1_keyword.lowercase":{"type":"string","index":"not_analyzed"},
"variable_level_2_keyword":{"type":"string","index":"not_analyzed"},
"variable_level_2_keyword.lowercase":{"type":"string","index":"not_analyzed"},
"variable_level_3_keyword":{"type":"string","index":"not_analyzed"},
"variable_level_3_keyword.lowercase":{"type":"string","index":"not_analyzed"},
"detailed_variable_keyword":{"type":"string","index":"not_analyzed"},
"detailed_variable_keyword.lowercase":{"type":"string","index":"not_analyzed"}
}
},
"start_date":{"type":"date","format":"yyyy-MM-dd'T'HH:mm:ssZ||yyyy-MM-dd'T'HH:mm:ss.SSSZ"},
"end_date":{"type":"date","format":"yyyy-MM-dd'T'HH:mm:ssZ||yyyy-MM-dd'T'HH:mm:ss.SSSZ"},
"addl_attr_string":{"type":"string","index":"not_analyzed"},
"addl_attr_string.lowercase":{"type":"string","index":"not_analyzed"},
"addl_attr_numeric":{"type":"long"}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment