如何使用apache drill做页面搜索
How to use apache drill do page search
我想使用 apache drill 进行页面搜索。但是只提供了一个有限的关键词,不知道怎么写好sql.Do有没有人能帮帮我?谢谢!
Drill 支持两个 LIMIT and OFFSET 运算符。因此,可以使用这些来实现分页。
示例查询:
SELECT * FROM cp.`employee.json` order by employee_id LIMIT 20 OFFSET 10 ROWS
Drill 的一些重要观点 docs:
The OFFSET number must be a positive integer and cannot be larger than the number of rows in the underlying result set or no rows are returned.
You can use the OFFSET clause in conjunction with the LIMIT and ORDER BY clauses.
When used with the LIMIT option, OFFSET rows are skipped before starting to count the LIMIT rows that are returned. If the LIMIT option is not used, the number of rows in the result set is reduced by the number of rows that are skipped.
The rows skipped by an OFFSET clause still have to be scanned, so it might be inefficient to use a large OFFSET value.
我想使用 apache drill 进行页面搜索。但是只提供了一个有限的关键词,不知道怎么写好sql.Do有没有人能帮帮我?谢谢!
Drill 支持两个 LIMIT and OFFSET 运算符。因此,可以使用这些来实现分页。
示例查询:
SELECT * FROM cp.`employee.json` order by employee_id LIMIT 20 OFFSET 10 ROWS
Drill 的一些重要观点 docs:
The OFFSET number must be a positive integer and cannot be larger than the number of rows in the underlying result set or no rows are returned. You can use the OFFSET clause in conjunction with the LIMIT and ORDER BY clauses.
When used with the LIMIT option, OFFSET rows are skipped before starting to count the LIMIT rows that are returned. If the LIMIT option is not used, the number of rows in the result set is reduced by the number of rows that are skipped.
The rows skipped by an OFFSET clause still have to be scanned, so it might be inefficient to use a large OFFSET value.