Skip to content

Commit

Permalink
Minor update
Browse files Browse the repository at this point in the history
  • Loading branch information
TLCFEM committed Nov 27, 2024
1 parent c2fef7f commit fe42ad1
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/mb/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,17 +298,12 @@ async def search_records(query: QueryConfig = QueryConfig()):
)


@app.post("/stats")
@app.get("/stats")
async def aggregation_stats():
client = await async_elastic()
results = await client.search(
index="record",
query={
"range": {
"magnitude": {"gte": 1, "lte": 10},
"maximum_acceleration": {"gte": 0},
}
},
query={"range": {"magnitude": {"gte": 1, "lte": 10}}},
aggs={
"magnitude": {"histogram": {"field": "magnitude", "interval": 1}},
"pga": {"histogram": {"field": "maximum_acceleration", "interval": 200}},
Expand Down

0 comments on commit fe42ad1

Please sign in to comment.