[ 
https://issues.apache.org/jira/browse/ASTERIXDB-2153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16227364#comment-16227364
 ] 

Taewoo Kim edited comment on ASTERIXDB-2153 at 11/1/17 5:49 PM:
----------------------------------------------------------------

Two issues:
1) During the compilation of a fulltext search query, if the search option 
(AND, OR) is not provided, then the optimizer is supposed to add the default 
one - AND. However, currently, the optimization rule only considers when a 
WHERE predicate contains a single condition - only fulltext search condition. 
If it has more conditions such as the above case (create_at > x and ...), it 
can't add the default option. 

2) During the runtime, runtime evaluator thinks that it always has the search 
option and set AND or OR based on it. However, since the option is not set in 
this case during the optimization phase, the fulltext search does not conduct 
AND search. 



was (Author: wangsaeu):
Two issues:
1) During the compilation of a fulltext search query, if the search option 
(AND, OR) is not provided, then the optimizer supposed to add the default one - 
AND. However, currently, the optimization rule only considers when a WHERE 
predicate contains a single condition - only fulltext search condition. If it 
has more conditions such as the above case (create_at > x and ...), it can't 
add the default option. 

2) During the runtime, runtime evaluator thinks that it always has the search 
option and set AND or OR based on it. However, since the option is not set in 
this case during the optimization phase, the fulltext search does not conduct 
AND search. 


> Fulltext does not handle the search option properly
> ---------------------------------------------------
>
>                 Key: ASTERIXDB-2153
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-2153
>             Project: Apache AsterixDB
>          Issue Type: Bug
>            Reporter: Taewoo Kim
>            Assignee: Taewoo Kim
>            Priority: Major
>
> Fulltext search does not handle the search option (conjunctive - AND or 
> disjuctive - OR) properly when a WHERE predicate contains multiple conditions 
> like the following case. It always conducts a disjunctive (OR) search even 
> though the option tells to do "AND" search. 
> {code}
> select t.`text` from twitter.ds_tweet t
> where t.`create_at` >= datetime('2017-10-10T16:48:28.980Z') and t.`create_at` 
> < datetime('2017-10-10T17:48:28.980Z') and ftcontains(t.`text`, 
> ['house','of','cards'], {'mode':'all'});
> {code}
> {code}
> select t.`text` from twitter.ds_tweet t
> where t.`create_at` >= datetime('2017-10-10T16:48:28.980Z') and t.`create_at` 
> < datetime('2017-10-10T17:48:28.980Z') and ftcontains(t.`text`, 
> ['house','of','cards']);
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to