No source in es

DO NOT MERGE. I'm creating this for review purposes.

Changes to prevent us from storing source document or source fields in ElasticSearch
See also: https://issues.apache.org/jira/browse/USERGRID-255
I think we can easily write a migration to do this.  We already have the
migration framework in place, we just need to write something that will
iterate all apps and types, then update the mapping accordingly.  A lot of
the functions have already been written, so we should be able to re-use
them and just change our action for each entity type to update the mapping
in ES..

On Tue, Dec 2, 2014 at 8:09 PM, John Ament <notifications@github.com> wrote:

> In
> stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/IndexingUtils.java:
>
> > @@ -151,69 +151,99 @@ public static XContentBuilder createDoubleStringIndexMapping(
> >
> >                  .startObject( type )
> >
> > +                    // don't store source object in ES
> > +                    .field("_source")
>
> It looks like this branch would only be invoked if the index doesn't
> exist. If you want to reapply mappings, you need to do something like
>
> esProvider.getClient().admin().indices().putMapping(new PutMappingRequest(indexName)
> .source(XContentBuilder));
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/apache/incubator-usergrid/pull/112/files#r21210325>.
>