[
https://issues.apache.org/jira/browse/ASTERIXDB-1300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15428479#comment-15428479
]
Yingyi Bu commented on ASTERIXDB-1300:
--------------------------------------
Yes, "skip-index" can do the job. However, it might be a bit tedious if there
are many qualified indexes.
The following example is what I initially thought for this issue:
{noformat}
let $region :=
create-rectangle(create-point(-128.43007812500002,20.298506037222175),
create-point(-64.26992187500002,54
.56902589732035))
let $ts_start := datetime("2015-11-11T00:00:00Z")
let $ts_end := datetime("2015-12-18T23:59:59Z")
let $keyword := "hello"
for $t in dataset dsTweet
where
/* +use-index (time_index, location_index) */
$t.create_at >= $ts_start and $t.create_at < $ts_end
and spatial-intersect($t.location, $region)
and contains($t.message, $keyword)
return $t
{noformat}
The hint dictates the compiler to only use the time_index and location_index.
> Hint for desired index names
> ----------------------------
>
> Key: ASTERIXDB-1300
> URL: https://issues.apache.org/jira/browse/ASTERIXDB-1300
> Project: Apache AsterixDB
> Issue Type: Improvement
> Reporter: Yingyi Bu
> Assignee: Jianfeng Jia
> Priority: Critical
> Labels: soon
>
> Add a hint in the filter expression in the where clause to allow a user to
> specify desired indexes to use for a particular query.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)