# Disabling \_source field

**URL:** <https://discuss.elastic.co/t/disabling--source-field/2849>\
**Category:** Elasticsearch\
**Created:** [March 17, 2010, 9:14am UTC](https://discuss.elastic.co/t/disabling--source-field/2849 "2010-03-17T09:14:54Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)\
**Post date:** [March 18, 2010, 2:42pm UTC](https://discuss.elastic.co/t/disabling--source-field/2849/21 "2010-03-18T14:42:09Z")

</div>

> Yes, it is ... so you may want to provide a nice perl API for  
> Terrastore as well 😉 ... okay, that was shameless, please forgive me

haha 🙂

actually, it'd be easy to repurpose Elasticsearch.pm for that. If I had time....

One thing I'm working on for Elasticsearch is a query builder, so I can transform this:

{  
"keywords" : "foo bar",  
"active\_or\_featured" : {  
"or" : {  
"featured" : "1",  
"status" : "active"  
}  
},  
"publish\_date" : {  
"\>=" : "2009-09-01",  
"\<=" : "2009-09-30",  
"!=" : "2009-09-24"  
},  
"keyword\_fields" : "text name"  
}

Into this:

{  
"filteredQuery" : {  
"filter" : {  
"bool" : {  
"must" : [  
{  
"bool" : {  
"must" : [  
{  
"bool" : {  
"mustNot" : [  
{  
"term" : {  
"publish\_date" : "2009-09-24"  
}  
}  
]  
}  
},  
{  
"range" : {  
"publish\_date" : {  
"to" : "2009-09-30",  
"exclude\_to" : 0,  
"from" : "2009-09-01",  
"exclude\_from" : 0  
}  
}  
}  
]  
}  
},  
{  
"bool" : {  
"should" : [  
{  
"term" : {  
"featured" : "1"  
}  
},  
{  
"term" : {  
"status" : "active"  
}  
}  
]  
}  
}  
]  
}  
},  
"query" : {  
"field" : {  
"text name" : {  
"boost" : 1,  
"query" : "foo bar"  
}  
}  
}  
}  
}

> 

--  
Web Announcements Limited is a company registered in England and Wales,  
with company number 05608868, with registered address at 10 Arvon Road,  
London, N5 1PR.

---

<div class="post-metadata">

**Author:** ![Sergio\_Bossa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sergio_bossa/32/3312_2.png) [@Sergio\_Bossa](https://discuss.elastic.co/u/Sergio_Bossa)\
**Post date:** [March 18, 2010, 2:46pm UTC](https://discuss.elastic.co/t/disabling--source-field/2849/22 "2010-03-18T14:46:37Z")

</div>

On Thu, Mar 18, 2010 at 3:42 PM, Clinton Gormley  
[clinton@iannounce.co.uk](mailto:clinton@iannounce.co.uk) wrote:

> actually, it'd be easy to repurpose Elasticsearch.pm for that. If I had time....

No worries, keep up with the excellent work on your ES client 😉

--  
Sergio Bossa  
[http://www.linkedin.com/in/sergiob](http://www.linkedin.com/in/sergiob)

---

<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 6, 2017, 4:25am UTC](https://discuss.elastic.co/t/disabling--source-field/2849/23 "2017-07-06T04:25:14Z")

</div>



[Previous page](https://discuss.elastic.co/t/disabling--source-field/2849.md?page=1)
