Understanding Elasticsearch searching data flow

Search is a generic term for information retrieval. Elasticsearch provides various retrieval capabilities, including full-text searches, geo searches, range searches, scripted searches, and aggregations.

How does Elasticsearch execute a search query behind the scenes? The following diagram shows data flow for searching operations.

Elasticsearch Searching Data Flow

An algorithm for finding right-truncatable prime numbers

Inspired from my status on Facebook:

The prime number 73939133 is very special, if removing each digit from right to left of that number we get another prime numbers: 7393913, 739391, 73939, 7393, 739, 73 and 7.

One of my friends gave a challenge:

Can you write a program reading a number N from keyboard then finding the nearest prime number to N that satisfies the characteristics of 73939133?

As promised him, I would solve this challenge.

Java: Type Promotion

Cách đây khá lâu mình đem đoạn mã đơn giản bên dưới hỏi một số bạn làm Java, cả juniors và seniors, tất cả các bạn đều bảo rằng đoạn mã này không có vấn đề gì, biên dịch và chạy được. byte b = 1; b = b * 2; Thật ra thì đoạn mã trên không thể biên dịch được. Trước tiên thử phân tích xem vì sao các bạn trả lời như vậy.