Is dynamic mapping reliable

Well, yeah it is reliable as far as the number of attributes are constant.
And application is suppose to send strict data. But when we are working
with php or such loosely typed language. I am getting not very good feeling
about that.

Does this make sense to create mapping of all attributes manually?

Does this add any overhead on performance or could gain some performance?

Personally, I use a non dynamic mapping.
I use dynamic = "strict" to prevent incorrectly formatted documents

On Saturday, June 23, 2012 2:38:26 AM UTC+2, Rimpy wrote:

Well, yeah it is reliable as far as the number of attributes are constant.
And application is suppose to send strict data. But when we are working
with php or such loosely typed language. I am getting not very good feeling
about that.

Does this make sense to create mapping of all attributes manually?

Does this add any overhead on performance or could gain some performance?

Hi

I prefer a non dynamic mapping as well - at least for all important data
types. We've already had some problems, where data was being autodetected
and then all other data was important as a wrong type (an example might be
a price, where the first document contains a value of 25 and mapped as an
int whereas all other documents might be a float - yes I know that prices
and floats are not too close friends)

Furthermore it helps developers to understand what is being indexed, even
if they do not know about the data structure.

At the end this is a matter of personal taste and how standardized the
formats are, which are imported into ES.

--Alexander

@Pierre and @Alexander
You are right. i've experienced such behavior and that's why now i am
getting strict what should be type cast. And What should not. for dynamic
types, we do not have any control what should be indexed
and what should not. But defining mapping i can keep control on that. And
with these settings in mind. I do find the improvement while re-indexing.
It took me 3 hours to re-index 200K entities on a very simple
machine having 2.5 Gz processor and 2 GB Ram. But when it was dynamic it
took around 24 hours.

On Sunday, June 24, 2012 2:06:11 PM UTC+5:30, Alexander Reelsen wrote:

Hi

I prefer a non dynamic mapping as well - at least for all important data
types. We've already had some problems, where data was being autodetected
and then all other data was important as a wrong type (an example might be
a price, where the first document contains a value of 25 and mapped as an
int whereas all other documents might be a float - yes I know that prices
and floats are not too close friends)

Furthermore it helps developers to understand what is being indexed, even
if they do not know about the data structure.

At the end this is a matter of personal taste and how standardized the
formats are, which are imported into ES.

--Alexander