SQL> SELECT * FROM ( 2 SELECT sequence#, archived, applied, 3 TO_CHAR(completion_time, 'RRRR/MM/DD HH24:MI') AS completed 4 FROM sys.v$archived_log 5 ORDER BY sequence# DESC) 6 WHERE ROWNUM <= 10 7 / SEQUENCE# ARCHIVED APPLIED COMPLETED ---------- -------- ------- ---------------- 11211 YES NO 2004/09/16 09:30 11210 YES YES 2004/09/16 09:00 11209 YES YES 2004/09/16 08:30 11208 YES YES 2004/09/16 08:00 11207 YES YES 2004/09/16 07:30 11206 YES YES 2004/09/16 07:00 11205 YES YES 2004/09/16 06:30 11204 YES YES 2004/09/16 06:30 11203 YES YES 2004/09/16 06:30 11202 YES YES 2004/09/16 06:00 10 rows selected.
We'll explore scenarios involving nested queries, aggregations, custom scoring, and hybrid queries that combine multiple search criteria. 1. Nested Queries ElasticSearch Example: ElasticSearch supports nested documents, which allows for querying on nested fields with complex conditions. Query: Find products where the product has a review with a rating of 5 and the review text contains "excellent". { "query": { "nested": { "path": "reviews", "query": { "bool": { "must": [ { "match": { "reviews.rating": 5 } }, { "match": { "reviews.text": "excellent" } } ] } } } } } Redis Limitation: Redis does not support nested documents natively. While you can store nested structures in JSON documents using the RedisJSON module, querying these nested structures with complex condi...
Comments