# Problem with fs\_river: multi\_field type mapping

**URL:** <https://discuss.elastic.co/t/problem-with-fs-river-multi-field-type-mapping/11535>\
**Category:** Elasticsearch\
**Created:** [April 10, 2013, 3:26pm UTC](https://discuss.elastic.co/t/problem-with-fs-river-multi-field-type-mapping/11535 "2013-04-10T15:26:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yahia](https://avatars.discourse-cdn.com/v4/letter/y/d9b06d/32.png) [@yahia](https://discuss.elastic.co/u/yahia)\
**Post date:** [April 10, 2013, 3:26pm UTC](https://discuss.elastic.co/t/problem-with-fs-river-multi-field-type-mapping/11535/1 "2013-04-10T15:26:43Z")

</div>

Hi all,

\*i declared an index as follows: \*

curl -XPUT '[http://localhost:9200/mydocs/](http://localhost:9200/mydocs/)' -d '{  
"settings" : {"index" : {"analysis" :  
{"analyzer" : {  
"synfromfile" : {"tokenizer" : "whitespace","filter" : ["synonym"]},  
"autocomplete" : {"tokenizer" : "whitespace","filter" :  
["lowercase","engram"]}},  
"filter" : {"synonym" : {"type" : "synonym", "synonyms\_path" :  
"C:\TempElasticSearch\synonym\synonyms.txt"},  
"engram" : {"type" : "edgeNGram","min\_gram" : 3,"max\_gram" : 10}}}}}}'

_And a mapping as follows:_

curl -XPUT '[http://localhost:9200/mydocs/doc/\_mapping](http://localhost:9200/mydocs/doc/_mapping)' -d '  
{  
"doc": {  
"properties": {  
"file": {  
"type": "attachment",  
"path": "full",  
"fields": {  
"file": {  
"type": "string",  
"store": "yes",  
"term\_vector": "with\_positions\_offsets",  
"analyzer" : "synfromfile"  
},  
_"author":{_  
_"type":"multi\_field",_  
_"store": "yes",_  
_"fields" : {_  
_"author" : {_  
_"type" : "string"_  
_},_  
_"authac" : {_  
_"type" : "string",_  
_"analyzer" : "autocomplete"_  
_}_  
_}_  
_},_  
"title": {  
"type": "string",  
"store": "yes",  
"analyzer" : "autocomplete"  
},  
"date": {  
"type": "date",  
"format": "dateOptionalTime",  
"store": "yes"  
},  
"keywords": {  
"type": "string",  
"store": "yes",  
"analyzer" : "autocomplete"  
},  
"content\_type": {  
"type": "string",  
"store": "yes"  
} } }} }}'

_and I tested with this query:_

curl -XGET 'localhost:9200/mydocs/doc/\_search?pretty' -d '  
{

"query" : {  
_"term" : { "file.author" : "yahia" }_  
},  
"facets" : {  
"content" : {  
"terms" : {  
_"field" : "file.author.authac"_  
}  
}  
}  
}'

_and I got this result_

{  
"took" : 7,  
"timed\_out" : false,  
"\_shards" : {  
"total" : 5,  
"successful" : 5,  
"failed" : 0  
},  
"hits" : {  
"total" : 1,  
"max\_score" : 0.5945348,  
"hits" : [ {  
"\_index" : "mydocs",  
"\_type" : "doc",  
"\_id" : "19943db2a847cbb66daf35446bab775",  
"\_score" : 0.5945348, "\_source" :  
{"name":"ElasticSearch.docx","postDate":1365145991688,"pathEncoded":"8580d27817ab2e7da7fd9c55a

54c81cc","rootpath":"8580d27817ab2e7da7fd9c55a54c81cc","virtualpath":"c","file":{"\_name":"ElasticSearch.docx","content":"UEs  
} ]  
},  
"facets" : {  
"content" : {  
"\_type" : "terms",  
"missing" : 1,  
"total" : 0,  
"other" : 0,  
"terms" : []  
}  
}  
}

\*the problem is that fs-river can not copy data in the field "\*_authac"  
which exists in the author attribute !!!_  
\*  
\*  
\*is that I made an error in the configuration of the mapping ??  
\*

_Cordially_  
\*  
\*  
_Yahia AMMAR_

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![yahia](https://avatars.discourse-cdn.com/v4/letter/y/d9b06d/32.png) [@yahia](https://discuss.elastic.co/u/yahia)\
**Post date:** [April 10, 2013, 3:40pm UTC](https://discuss.elastic.co/t/problem-with-fs-river-multi-field-type-mapping/11535/2 "2013-04-10T15:40:41Z")

</div>

_I want to apply the autocomplete in the author field, and also keep the  
auriginal value of this field, which is why I used the muti-type field ..._

--  
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).  
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, 2:41am UTC](https://discuss.elastic.co/t/problem-with-fs-river-multi-field-type-mapping/11535/3 "2017-07-06T02:41:45Z")

</div>


