Tagged articles
3 articles
Page 1 of 1
Mingyi World Elasticsearch
Mingyi World Elasticsearch
Jan 14, 2025 · Databases

How to Build a Custom Elasticsearch Query that Sorts by Time Buckets and Relevance

This article walks through creating a custom Elasticsearch 8.x query that first groups documents into time buckets (e.g., within 3 days, 4‑7 days, older) using a pre‑computed time_bucket field, then sorts each bucket by the _score relevance of the content field, covering pipeline definition, mapping, sample data, DSL query, and practical considerations.

DSL queryElasticsearchIngest Pipeline
0 likes · 11 min read
How to Build a Custom Elasticsearch Query that Sorts by Time Buckets and Relevance
Test Development Learning Exchange
Test Development Learning Exchange
Sep 19, 2024 · Fundamentals

Custom Sorting in Python

This article introduces various methods to customize sorting in Python, including using sorted() function, list's .sort() method, and custom comparison functions.

Key FunctionsPythoncomparison functions
0 likes · 8 min read
Custom Sorting in Python