blob: 29a6035caa57809cbd591366bc844aa255d69c57 [file] [log] [blame]
{
{% if last %}"last": "{{ last }}",{% endif %}
{% if prev %}"prev": "{{ prev }}",{% endif %}
{% if next %}"next": "{{ next }}",{% endif %}
{% if first %}"first": "{{ first }}",{% endif %}
"results":[
{% for doc in docs %}
{
"time": "{{ doc['time'] }}",
"point": "Point({{ doc['loc'].split(',')[1] }} {{ doc['loc'].split(',')[0] }})",
"sea_water_temperature": {{ doc['SST'] | jsonify }},
"sea_water_temperature_depth": {{ doc['SST_depth'] | jsonify }},
"sea_water_temperature_quality": {{ doc['SST_quality'] | jsonify }},
"wind_speed": {{ doc['wind_speed'] | jsonify }},
"eastward_wind": {{ doc['wind_u'] | jsonify }},
"northward_wind": {{ doc['wind_v'] | jsonify }},
"wind_depth": {{ doc['wind_depth'] | jsonify }},
"wind_speed_quality": {{ doc['wind_speed_quality'] | jsonify }},
"wind_component_quality": {{ doc['wind_component_quality'] | jsonify }},
"sea_water_salinity": {{ doc['SSS'] | jsonify }},
"sea_water_salinity_depth": {{ doc['SSS_depth'] | jsonify }},
"sea_water_salinity_quality": {{ doc['SSS_quality'] | jsonify }},
"platform": {{ doc['platform'] | jsonify }},
"device": {{ doc['device'] | jsonify }},
"mission": {{ doc['mission'] | jsonify }},
"metadata": "{{ doc['meta'] }}"
}
{% if not loop.last %}
,
{% endif %}
{% endfor %}
]
,"totalResults":{{ numFound }}
,"startIndex":{{ startIndex }}
,"itemsPerPage":{{ itemsPerPage }}
{% if stats %}
,
"stats_fields": {{ stats['stats_fields'] | jsonify }}
{% endif %}
{% if facets %}
,
"facets":[
{% for key, facet in facets['facet_fields'].iteritems() %}
{
"field": "{{ key }}",
"values":[
{% for i in range(0, facet|count, 2) %}
{
"count":{{facet[i+1] }},
"value": "{{ facet[i] }}"
}
{% if not loop.last %}
,
{% endif %}
{% endfor %}
]
}
{% if not loop.last %}
,
{% endif %}
{% endfor %}
]
{% endif %}
}