# Identify mapping property names by myself while using river(mongo river)

**URL:** https://discuss.elastic.co/t/identify-mapping-property-names-by-myself-while-using-river-mongo-river/9735
**Category:** Elasticsearch
**Created:** [November 16, 2012, 7:02am UTC](https://discuss.elastic.co/t/identify-mapping-property-names-by-myself-while-using-river-mongo-river/9735 "2012-11-16T07:02:50Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![spancer\_ray](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spancer_ray/32/76303_2.png) [@spancer\_ray](https://discuss.elastic.co/u/spancer_ray)
#### Post date: [November 16, 2012, 7:02am UTC](https://discuss.elastic.co/t/identify-mapping-property-names-by-myself-while-using-river-mongo-river/9735/1 "2012-11-16T07:02:50Z")

</div>

Hi All,

I've a question, can I identify the mapping properties' names avoid using the collections' fields' names?

e.g. I have a collection 'users' which has two properties 'user\_name' and 'user\_age' in mongodb, while river users, I have to configure my mapping as below to make the river job run successfully:

{  
"user" :  
{   
"properties" :  
{  
"user\_name":  
{  
"type":"string",  
"index\_analyzer":"ansj",  
"search\_analyzer":"ansj",  
"null\_value" : "NA"   
},

```
		"user_age":
		{
			"type":"string",
			"null_value" : "NA"	
		}  
				
	}
}

```

}

Is there any settings I can use to avoid using the same name with my collection field name while using river?

I hope I can use my mapping property names like 'username', 'age'.. Can anyone help?

Thanks,  
Spancer

---

<div class="post-metadata">

### Author: ![Richard\_Louapre](https://avatars.discourse-cdn.com/v4/letter/r/e19adc/32.png) [@Richard\_Louapre](https://discuss.elastic.co/u/Richard_Louapre)
#### Post date: [November 28, 2012, 2:57pm UTC](https://discuss.elastic.co/t/identify-mapping-property-names-by-myself-while-using-river-mongo-river/9735/2 "2012-11-28T14:57:02Z")

</div>

Hi Spancer,

The mapping is implicit in the current version of MongoDB river so you  
cannot change it.

But feel free to create a new issue / feature from github repository so it  
can be addressed.

Thanks,  
Richard.

On Friday, November 16, 2012 2:02:50 AM UTC-5, spancer ray wrote:

> Hi All,
> 
> I've a question, can I identify the mapping properties' names avoid using  
> the collections' fields' names?
> 
> e.g. I have a collection 'users' which has two properties 'user\_name' and  
> 'user\_age' in mongodb, while river users, I have to configure my mapping  
> as below to make the river job run successfully:
> 
> {  
> "user" :  
> {  
> "properties" :  
> {  
> "user\_name":  
> {  
> "type":"string",  
> "index\_analyzer":"ansj",  
> "search\_analyzer":"ansj",  
> "null\_value" :  
> "NA"  
> },
> 
> ```
> "user_age": 
> { 
> "type":"string", 
> "null_value" : "NA"         
> }   
>                                      
> } 
> } 
> 
> ```
> 
> }
> 
> Is there any settings I can use to avoid using the same name with my  
> collection field name while using river?
> 
> I hope I can use my mapping property names like 'username', 'age'.. Can  
> anyone help?
> 
> Thanks,  
> Spancer
> 
> --  
> View this message in context:  
> [http://elasticsearch-users.115913.n3.nabble.com/Identify-mapping-property-names-by-myself-while-using-river-mongo-river-tp4025566.html](http://elasticsearch-users.115913.n3.nabble.com/Identify-mapping-property-names-by-myself-while-using-river-mongo-river-tp4025566.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).

--

---

<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, 3:02am UTC](https://discuss.elastic.co/t/identify-mapping-property-names-by-myself-while-using-river-mongo-river/9735/3 "2017-07-06T03:02:27Z")

</div>


