# Timelion 7.10 Error : Syntax Error

**URL:** https://discuss.elastic.co/t/timelion-7-10-error-syntax-error/256016
**Category:** Kibana
**Tags:** timelion
**Created:** [November 19, 2020, 4:21pm UTC](https://discuss.elastic.co/t/timelion-7-10-error-syntax-error/256016 "2020-11-19T16:21:24Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![ManuelF](https://avatars.discourse-cdn.com/v4/letter/m/e99b99/32.png) [@ManuelF](https://discuss.elastic.co/u/ManuelF)
#### Post date: [November 19, 2020, 4:21pm UTC](https://discuss.elastic.co/t/timelion-7-10-error-syntax-error/256016/1 "2020-11-19T16:21:24Z")

</div>

Hi,

Recently upgraded ELK to try v7.10.

I am getting an error in Timelion:

`Timelion request error: undefined SyntaxError: {"type":"incompleteFunction","function":"es","location":{"min":0,"max":3},"text":".es"}`

![Timelion error](https://us1.discourse-cdn.com/elastic/original/3X/a/c/ac8fe452baee7b25315e4dc62fa99136c7f6e0df.png)

This query was working fine from ELK v6.x up to v7.9.2

After some research I found out an article that explains what the issue might be: [kibana timelion in 7.10.0: command parser does not support single quotes ' anymore. #83296](https://github.com/elastic/kibana/issues/83296)

I have replaced all single quotes in my query, but I keep getting the same error.

Original query:

`.es(index='logstash-vulnwhisperer-*',q='(risk_score:>=9 AND risk_score:<=10)').label("Original"),.es(index='logstash-vulnwhisperer-*',q='(risk_score:>=9 AND risk_score:<=10)',offset=-1w).label("One week offset"),.es(index='logstash-vulnwhisperer-*',q='(risk_score:>=9 AND risk_score:<=10)').subtract(.es(index='logstash-vulnwhisperer-*',q='(risk_score:>=9 AND risk_score:<=10)',offset=-1w)).label("Difference").lines(steps=3,fill=2,width=1)`

Fixed query:

`.es(index="logstash-vulnwhisperer-*"q="(risk_score:>=9 AND risk_score:<=10)").label("Original"),.es(index="logstash-vulnwhisperer-*",q="(risk_score:>=9 AND risk_score:<=10)",offset=-1w).label("One week offset"),.es(index="logstash-vulnwhisperer-*",q="(risk_score:>=9 AND risk_score:<=10)").subtract(.es(index="logstash-vulnwhisperer-*",q="(risk_score:>=9 AND risk_score:<=10)",offset=-1w)).label("Difference").lines(steps=3,fill=2,width=1)`

Am I missing something else?  
Can you please help me with this error?

Thank you in advance

---

<div class="post-metadata">

### Author: ![wylie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wylie/32/81794_2.png) [@wylie](https://discuss.elastic.co/u/wylie)
#### Post date: [November 19, 2020, 6:25pm UTC](https://discuss.elastic.co/t/timelion-7-10-error-syntax-error/256016/2 "2020-11-19T18:25:02Z")

</div>

It looks like the parsing got stricter, so you'd have to check the whole expression. It looks like you might be missing a comma in the "fixed" query? Also, what happens if you put the `-1w` offset in quotes?

---

<div class="post-metadata">

### Author: ![ManuelF](https://avatars.discourse-cdn.com/v4/letter/m/e99b99/32.png) [@ManuelF](https://discuss.elastic.co/u/ManuelF)
#### Post date: [November 19, 2020, 7:52pm UTC](https://discuss.elastic.co/t/timelion-7-10-error-syntax-error/256016/3 "2020-11-19T19:52:18Z")

</div>

Hi @wylie,

Thank you for confirming the internal change for the new parser in Timelion

> [@ManuelF](#):
>
> kibana timelion in 7.10.0: command parser does not support single quotes ' anymore. #83296

and for pointing out a possible misspelling in the query. In fact there was a character missing. Got all Timelion queries fixed and working.

**Fix:** Replace all single quotes `'` by double quotes `"` in the Timelion queries.

Thank you

---

<div class="post-metadata">

### Author: ![braham](https://avatars.discourse-cdn.com/v4/letter/b/f0a364/32.png) [@braham](https://discuss.elastic.co/u/braham)
#### Post date: [November 25, 2020, 10:53am UTC](https://discuss.elastic.co/t/timelion-7-10-error-syntax-error/256016/4 "2020-11-25T10:53:21Z")

</div>

Thanks @ManuelF and @wylie  
It worked for us by Replace all single quotes `'` by double quotes `"` in the Timelion queries.  
But facing the problem, how to replace single quote in below scripts where both quotes are present.

```
..es(split='host.keyword:10',q='messageType.keyword:watchdog AND drupal_action.keyword : "CV submission" and url:"*job-apply*" AND tags.keyword :"web"')
```

---

<div class="post-metadata">

### Author: ![wylie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wylie/32/81794_2.png) [@wylie](https://discuss.elastic.co/u/wylie)
#### Post date: [November 25, 2020, 3:31pm UTC](https://discuss.elastic.co/t/timelion-7-10-error-syntax-error/256016/5 "2020-11-25T15:31:04Z")

</div>

We are planning to release a bug fix for this in the next patch release and next minor, so hopefully 7.10.1 and 7.11: [https://github.com/elastic/kibana/pull/84196](https://github.com/elastic/kibana/pull/84196)

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [December 23, 2020, 3:31pm UTC](https://discuss.elastic.co/t/timelion-7-10-error-syntax-error/256016/6 "2020-12-23T15:31:08Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
