# Is there a method can trim meaning field before they returned when I search?

**URL:** <https://discuss.elastic.co/t/is-there-a-method-can-trim-meaning-field-before-they-returned-when-i-search/18487>\
**Category:** Elasticsearch\
**Created:** [July 5, 2014, 9:35am UTC](https://discuss.elastic.co/t/is-there-a-method-can-trim-meaning-field-before-they-returned-when-i-search/18487 "2014-07-05T09:35:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![11158](https://avatars.discourse-cdn.com/v4/letter/1/d9b06d/32.png) [@11158](https://discuss.elastic.co/u/11158)\
**Post date:** [July 5, 2014, 9:35am UTC](https://discuss.elastic.co/t/is-there-a-method-can-trim-meaning-field-before-they-returned-when-i-search/18487/1 "2014-07-05T09:35:09Z")

</div>

Dear all:

I have a reasonable need, but I can't find how to deal with it on es  
official docs and books, is anyone know, please teach it to me! thank you!

I have a large set of docs, which hold a lot of fields, such as a user info  
page. If I want analysis the gender distribution of all of users whose  
live in "city"="1000"(1000 is a city code), I don't need other field except  
"city" and "gender", How can I exclude these meaningless field before they  
are returned when I search or scan. Because there are a lots of doc, If  
transmit the entire doc will wast many time and bandwidth, and I have to  
trim the additional information in myself program. so, is there a method  
can deal with problem for me? thank you.

by magigo

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/788a37d0-a180-4b20-8a65-d4d22de2b260%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/788a37d0-a180-4b20-8a65-d4d22de2b260%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![vineeth\_mohan\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vineeth_mohan_2/32/747_2.png) [@vineeth\_mohan\_2](https://discuss.elastic.co/u/vineeth_mohan_2)\
**Post date:** [July 5, 2014, 1:47pm UTC](https://discuss.elastic.co/t/is-there-a-method-can-trim-meaning-field-before-they-returned-when-i-search/18487/2 "2014-07-05T13:47:58Z")

</div>

Hello Magigo ,

Use the fields feature.  
You can tell which all fields you are interested in and it will return only  
those fields -

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

Thanks  
Vineeth

On Sat, Jul 5, 2014 at 3:05 PM, 纪路 [magievanerv@gmail.com](mailto:magievanerv@gmail.com) wrote:

> Dear all:
> 
> I have a reasonable need, but I can't find how to deal with it on es  
> official docs and books, is anyone know, please teach it to me! thank you!
> 
> I have a large set of docs, which hold a lot of fields, such as a user  
> info page. If I want analysis the gender distribution of all of users  
> whose live in "city"="1000"(1000 is a city code), I don't need other field  
> except "city" and "gender", How can I exclude these meaningless field  
> before they are returned when I search or scan. Because there are a lots of  
> doc, If transmit the entire doc will wast many time and bandwidth, and I  
> have to trim the additional information in myself program. so, is there a  
> method can deal with problem for me? thank you.
> 
> by magigo
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/788a37d0-a180-4b20-8a65-d4d22de2b260%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/788a37d0-a180-4b20-8a65-d4d22de2b260%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/788a37d0-a180-4b20-8a65-d4d22de2b260%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/788a37d0-a180-4b20-8a65-d4d22de2b260%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAGdPd5koOkXW5MVsXA%2BMOED%2Bi5Rmp6-DL2vx-xVt\_0WuPGFdJg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAGdPd5koOkXW5MVsXA%2BMOED%2Bi5Rmp6-DL2vx-xVt_0WuPGFdJg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![vineeth\_mohan\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vineeth_mohan_2/32/747_2.png) [@vineeth\_mohan\_2](https://discuss.elastic.co/u/vineeth_mohan_2)\
**Post date:** [July 5, 2014, 1:49pm UTC](https://discuss.elastic.co/t/is-there-a-method-can-trim-meaning-field-before-they-returned-when-i-search/18487/3 "2014-07-05T13:49:27Z")

</div>

Also you need to start using this -

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

Normal fields are depreciated.

Thanks  
Vineeth

On Sat, Jul 5, 2014 at 7:17 PM, vineeth mohan [vm.vineethmohan@gmail.com](mailto:vm.vineethmohan@gmail.com)  
wrote:

> Hello Magigo ,
> 
> Use the fields feature.  
> You can tell which all fields you are interested in and it will return  
> only those fields -  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-fields.html)
> 
> Thanks  
> Vineeth
> 
> On Sat, Jul 5, 2014 at 3:05 PM, 纪路 [magievanerv@gmail.com](mailto:magievanerv@gmail.com) wrote:
> 
> > Dear all:
> > 
> > I have a reasonable need, but I can't find how to deal with it on es  
> > official docs and books, is anyone know, please teach it to me! thank you!
> > 
> > I have a large set of docs, which hold a lot of fields, such as a user  
> > info page. If I want analysis the gender distribution of all of users  
> > whose live in "city"="1000"(1000 is a city code), I don't need other field  
> > except "city" and "gender", How can I exclude these meaningless field  
> > before they are returned when I search or scan. Because there are a lots of  
> > doc, If transmit the entire doc will wast many time and bandwidth, and I  
> > have to trim the additional information in myself program. so, is there a  
> > method can deal with problem for me? thank you.
> > 
> > by magigo
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/788a37d0-a180-4b20-8a65-d4d22de2b260%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/788a37d0-a180-4b20-8a65-d4d22de2b260%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/788a37d0-a180-4b20-8a65-d4d22de2b260%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/788a37d0-a180-4b20-8a65-d4d22de2b260%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAGdPd5%3Dtx1pcTGJv141VVnZu1-rxwzv02BbpjBe2n0CLuGFaUw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAGdPd5%3Dtx1pcTGJv141VVnZu1-rxwzv02BbpjBe2n0CLuGFaUw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![11158](https://avatars.discourse-cdn.com/v4/letter/1/d9b06d/32.png) [@11158](https://discuss.elastic.co/u/11158)\
**Post date:** [July 6, 2014, 3:03am UTC](https://discuss.elastic.co/t/is-there-a-method-can-trim-meaning-field-before-they-returned-when-i-search/18487/4 "2014-07-06T03:03:45Z")

</div>

Hi Vineeth:

Thank for your answer, "source filtering" is very useful. About fields, it  
seems that its function is different from source filtering, it can prevent  
additional fields from load in the system before search, is it? The  
depreciated function is partial, not fields, is my opinion right?

Thanks  
Magigo

On Sat, Jul 5, 2014 at 9:49 PM, vineeth mohan [vm.vineethmohan@gmail.com](mailto:vm.vineethmohan@gmail.com)  
wrote:

> Also you need to start using this -  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-source-filtering.html)
> 
> Normal fields are depreciated.
> 
> Thanks  
> Vineeth
> 
> On Sat, Jul 5, 2014 at 7:17 PM, vineeth mohan [vm.vineethmohan@gmail.com](mailto:vm.vineethmohan@gmail.com)  
> wrote:
> 
> > Hello Magigo ,
> > 
> > Use the fields feature.  
> > You can tell which all fields you are interested in and it will return  
> > only those fields -  
> > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-fields.html)
> > 
> > Thanks  
> > Vineeth
> > 
> > On Sat, Jul 5, 2014 at 3:05 PM, 纪路 [magievanerv@gmail.com](mailto:magievanerv@gmail.com) wrote:
> > 
> > > Dear all:
> > > 
> > > I have a reasonable need, but I can't find how to deal with it on es  
> > > official docs and books, is anyone know, please teach it to me! thank you!
> > > 
> > > I have a large set of docs, which hold a lot of fields, such as a user  
> > > info page. If I want analysis the gender distribution of all of users  
> > > whose live in "city"="1000"(1000 is a city code), I don't need other field  
> > > except "city" and "gender", How can I exclude these meaningless field  
> > > before they are returned when I search or scan. Because there are a lots of  
> > > doc, If transmit the entire doc will wast many time and bandwidth, and I  
> > > have to trim the additional information in myself program. so, is there a  
> > > method can deal with problem for me? thank you.
> > > 
> > > by magigo
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google  
> > > Groups "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send  
> > > an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > > To view this discussion on the web visit  
> > > [https://groups.google.com/d/msgid/elasticsearch/788a37d0-a180-4b20-8a65-d4d22de2b260%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/788a37d0-a180-4b20-8a65-d4d22de2b260%40googlegroups.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/788a37d0-a180-4b20-8a65-d4d22de2b260%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/788a37d0-a180-4b20-8a65-d4d22de2b260%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > .  
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> You received this message because you are subscribed to a topic in the  
> Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit  
> [https://groups.google.com/d/topic/elasticsearch/6gcjWJXV\_F4/unsubscribe](https://groups.google.com/d/topic/elasticsearch/6gcjWJXV_F4/unsubscribe).  
> To unsubscribe from this group and all its topics, send an email to  
> [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/CAGdPd5%3Dtx1pcTGJv141VVnZu1-rxwzv02BbpjBe2n0CLuGFaUw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAGdPd5%3Dtx1pcTGJv141VVnZu1-rxwzv02BbpjBe2n0CLuGFaUw%40mail.gmail.com)  
> [https://groups.google.com/d/msgid/elasticsearch/CAGdPd5%3Dtx1pcTGJv141VVnZu1-rxwzv02BbpjBe2n0CLuGFaUw%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAGdPd5%3Dtx1pcTGJv141VVnZu1-rxwzv02BbpjBe2n0CLuGFaUw%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAOJ-sHTxcLsCpnqsRCa5binpoz04UumQZof6UX3pxv%2Bs8TxQyg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOJ-sHTxcLsCpnqsRCa5binpoz04UumQZof6UX3pxv%2Bs8TxQyg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:17am UTC](https://discuss.elastic.co/t/is-there-a-method-can-trim-meaning-field-before-they-returned-when-i-search/18487/5 "2017-07-06T01:17:45Z")

</div>


