# Get total time greather than 3000

**URL:** <https://discuss.elastic.co/t/get-total-time-greather-than-3000/90094>\
**Category:** Elasticsearch\
**Created:** [June 20, 2017, 12:26pm UTC](https://discuss.elastic.co/t/get-total-time-greather-than-3000/90094 "2017-06-20T12:26:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ismael\_boumedien](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ismael_boumedien/32/5331_2.png) [@ismael\_boumedien](https://discuss.elastic.co/u/ismael_boumedien)\
**Post date:** [June 20, 2017, 12:26pm UTC](https://discuss.elastic.co/t/get-total-time-greather-than-3000/90094/1 "2017-06-20T12:26:27Z")

</div>

Hi guys,

based on the "totalTime" filed I want to get results greather than 3000.

{

```
        "_source": {
           "request": "",
           "apiName": "Customer_V1",
           "targetName": "ME_5530",
           "consumerId": "uddi:dea0ba6e-c824-11e6-bf86-e6d5fa77a251",
           "totalTime": "1918",
           "operationName": "GET_fact",
           "consumerIp": "10.121.104.24",
           "eventType": "TransactionalEvents",
           "sessionId": "48f88910779214d5801dffffffff50a8",
           "creationDate": 1492787156877,
           "apiVersion": "v1",
           "response": "",
           "tolalDataSize": "0",
           "providerTime": "1894",
           "apiId": "7562a23f-2663-11e7-b587-df5f1b393a20",
           "consumerName": "TOTO",
           "status": "SUCCESS"
        }

```

I tested:  
POST [http://localhost:9200/webmethodsmediato/TransactionalEvents/\_search](http://localhost:9200/webmethodsmediato/TransactionalEvents/_search)  
{  
"size": 10000,  
"from": 0,  
"query": {  
"bool": {  
"must": [{  
"term": {  
"apiName": "Customer\_V1"  
}  
},  
{  
"range": {  
"totalTime": {  
"gt": 3000,  
"lt": 4000  
}  
}  
}  
]  
}  
}  
}

Can anyone give me a tip.

Best regards

Ismael 🙂

---

<div class="post-metadata">

**Author:** ![Heinmci](https://avatars.discourse-cdn.com/v4/letter/h/6a8cbe/32.png) [@Heinmci](https://discuss.elastic.co/u/Heinmci)\
**Post date:** [June 20, 2017, 12:41pm UTC](https://discuss.elastic.co/t/get-total-time-greather-than-3000/90094/2 "2017-06-20T12:41:00Z")

</div>

Hi,  
Do you mind showing your mapping? (specifically for totalTime field)

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 20, 2017, 12:49pm UTC](https://discuss.elastic.co/t/get-total-time-greather-than-3000/90094/3 "2017-06-20T12:49:20Z")

</div>

Reindex this field as a number. You can do that with ingest pipeline and reindex API if needed.

---

<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:** [July 18, 2017, 12:49pm UTC](https://discuss.elastic.co/t/get-total-time-greather-than-3000/90094/4 "2017-07-18T12:49:27Z")

</div>

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