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

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

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
Sent from the ElasticSearch Users mailing list archive at Nabble.com.

--