OrientDB: text searching using gremlin
Question: I am using OrientDB and the gremlin console that comes with.

I am trying to search a pattern in text property. I have Email vertices with
ebodyText property. The problem is that the result of querying with SQL like
command and Gremlin language is quite different.

If I use SQL like query such as:

`select count(*) from Email where eBodyText like '%Syria%'`

it returns 24.

But if I query in gremlin console such as:

`g.V.has('eBodyText').filter{it.eBodyText.matches('.*Syria.*')}.count()`

it returns none.

Same queries with a different keyword 'memo' returns 161 by SQL but 20 by
gremlin.

Why does this behave like this? Is there a problem with the syntax of gremlin
command? Is there a better way to search text in gremlin?

I guess there might be a problem of setting properties in the upload script
which uses python driver 'pyorient'. [Python script used to upload the
dataset](https://github.com/romanegloo/cs505_proj2/blob/master/scripts/importCsv.py)

Thanks for your help.

[![enter image description
here](http://i.stack.imgur.com/YjaIh.png)](http://i.stack.imgur.com/YjaIh.png)
[![enter image description
here](http://i.stack.imgur.com/jkZHg.png)](http://i.stack.imgur.com/jkZHg.png)


Answer: I tried with 2.1.15 and I had no problem.

These are the records.

[![enter image description
here](http://i.stack.imgur.com/Neaoj.png)](http://i.stack.imgur.com/Neaoj.png)

[![enter image description
here](http://i.stack.imgur.com/ry8Jg.png)](http://i.stack.imgur.com/ry8Jg.png)

[![enter image description
here](http://i.stack.imgur.com/IY4KG.png)](http://i.stack.imgur.com/IY4KG.png)

[![enter image description
here](http://i.stack.imgur.com/RHBOu.png)](http://i.stack.imgur.com/RHBOu.png)

**EDITED**

I added some vertexes to my DB and now the `count()` is 11

**QUERY:**

    
    
    g.V.has('eBodyText').filter{it.eBodyText.contains('Syria')}.count()
    

**OUTPUT:**

    
    
    ==>11
    

Hope it helps.

