# Attachment field questions and some more

**URL:** <https://discuss.elastic.co/t/attachment-field-questions-and-some-more/15392>\
**Category:** Elasticsearch\
**Created:** [January 24, 2014, 4:25am UTC](https://discuss.elastic.co/t/attachment-field-questions-and-some-more/15392 "2014-01-24T04:25:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Iv\_Igi](https://avatars.discourse-cdn.com/v4/letter/i/c5a1d2/32.png) [@Iv\_Igi](https://discuss.elastic.co/u/Iv_Igi)\
**Post date:** [January 24, 2014, 4:25am UTC](https://discuss.elastic.co/t/attachment-field-questions-and-some-more/15392/1 "2014-01-24T04:25:49Z")

</div>

Hello there! I have some questions about Attachment field, results  
highlighting and suggesting.

1. Is the Attachment field storing whole file or extracted text only by  
default?
2. If it stores the whole file is there any way to make it store only  
extracted text? Or should I extract it with Apache Tika first and then put  
it to ES storage for that purpose?
3. Is it possible to set min and max for number of words that will be  
displayed in highlight field?
4. And almost the same for suggestions. Can I set up phrase  
suggestioning? I.e. returning "Green grass", "Green logo", etc. for "Green"  
suggestion query.

Regards, Iv Igi.

--  
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/8ef29407-5c30-4d3b-bf3e-b968c82dd9eb%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8ef29407-5c30-4d3b-bf3e-b968c82dd9eb%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [January 27, 2014, 10:24am UTC](https://discuss.elastic.co/t/attachment-field-questions-and-some-more/15392/2 "2014-01-27T10:24:17Z")

</div>

Hey,

the attachment stuff, is on the top of my head only.

1. The original document is stored as base64 inside of the source. which is  
also stored on indexing. The field itself is not stored iirc.
2. You could exclude it from being stored in the source. Using tika as a  
preprocessing step is another issue, but might be a good idea, as it does  
not require you to restart your whole cluster, in case you would want to  
update your tika version for example.
3. You can configure the fragment\_size, which should help you there, see  
[Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-highlighting.html#_highlighted_fragments)
4. Elasticsearch has three different suggester implementations for  
different use-cases. There is a specific phrase suggester, but maybe your  
use-case is actually using the completion suggester, see

> **[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.

> **[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.

> **[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.

> **[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.

[Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/blog/you-complete-me/) (blog post about the  
completion suggester).

Hope this helps.

--Alex

On Fri, Jan 24, 2014 at 5:25 AM, Iv Igi [sayoneas@gmail.com](mailto:sayoneas@gmail.com) wrote:

> Hello there! I have some questions about Attachment field, results  
> highlighting and suggesting.
> 
> 1. Is the Attachment field storing whole file or extracted text only  
> by default?
> 2. If it stores the whole file is there any way to make it store only  
> extracted text? Or should I extract it with Apache Tika first and then put  
> it to ES storage for that purpose?
> 3. Is it possible to set min and max for number of words that will be  
> displayed in highlight field?
> 4. And almost the same for suggestions. Can I set up phrase  
> suggestioning? I.e. returning "Green grass", "Green logo", etc. for "Green"  
> suggestion query.
> 
> Regards, Iv Igi.
> 
> --  
> 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/8ef29407-5c30-4d3b-bf3e-b968c82dd9eb%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8ef29407-5c30-4d3b-bf3e-b968c82dd9eb%40googlegroups.com)  
> .  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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/CAGCwEM\_z97GG4RbbN1S6%3D1R96PGM7Ec%2Be3chTbBa7pMZR8w87w%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAGCwEM_z97GG4RbbN1S6%3D1R96PGM7Ec%2Be3chTbBa7pMZR8w87w%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:54am UTC](https://discuss.elastic.co/t/attachment-field-questions-and-some-more/15392/3 "2017-07-06T01:54:39Z")

</div>


