# Differences between with .raw and without .raw

**URL:** <https://discuss.elastic.co/t/differences-between-with-raw-and-without-raw/125579>\
**Category:** Elasticsearch\
**Created:** [March 26, 2018, 10:07am UTC](https://discuss.elastic.co/t/differences-between-with-raw-and-without-raw/125579 "2018-03-26T10:07:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shwesinhan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shwesinhan/32/78663_2.png) [@shwesinhan](https://discuss.elastic.co/u/shwesinhan)\
**Post date:** [March 26, 2018, 10:07am UTC](https://discuss.elastic.co/t/differences-between-with-raw-and-without-raw/125579/1 "2018-03-26T10:07:04Z")

</div>

hi

does anyone explain differences between with .raw and without .raw?  
eg:

> {  
> "query": {  
> "bool": {  
> "must": [  
> {  
> "term": {  
> "project\_type.raw": "TEST"  
> }  
> }  
> ]  
> }  
> }  
> }

{  
"query": {  
"bool": {  
"must": [  
{  
"term": {  
"project\_type": "TEST"  
}  
}  
]  
}  
}  
}

---

<div class="post-metadata">

**Author:** ![jnatten](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jnatten/32/71781_2.png) [@jnatten](https://discuss.elastic.co/u/jnatten)\
**Post date:** [March 26, 2018, 10:23am UTC](https://discuss.elastic.co/t/differences-between-with-raw-and-without-raw/125579/2 "2018-03-26T10:23:32Z")

</div>

Most likely this is [multi-fields](https://www.elastic.co/guide/en/elasticsearch/guide/current/multi-fields.html) where project\_type is a [textField](https://www.elastic.co/guide/en/elasticsearch/reference/current/text.html) used for full text search, and project\_type.raw is a [keywordField](https://www.elastic.co/guide/en/elasticsearch/reference/current/keyword.html) used for aggregations, scripts, sorting or something along those lines.

---

<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:** [April 23, 2018, 10:24am UTC](https://discuss.elastic.co/t/differences-between-with-raw-and-without-raw/125579/3 "2018-04-23T10:24:06Z")

</div>

Closed on April 23, 2018, 10:24am UTC

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