<commit_before>open-orchestra-model-bundle
===========================

The Open Orchestra model bundle

| Service       | Badge         |
| ------------- |:-------------:|
| Travis | [![Build Status](https://travis-ci.org/open-orchestra/open-orchestra-model-bundle.svg)](https://travis-ci.org/open-orchestra/open-orchestra-model-bundle) |
| CodeClimate (quality) | [![Code Climate](https://codeclimate.com/github/open-orchestra/open-orchestra-model-bundle/badges/gpa.svg)](https://codeclimate.com/github/open-orchestra/open-orchestra-model-bundle) |
| CodeClimate (coverage) | [![Test Coverage](https://codeclimate.com/github/open-orchestra/open-orchestra-model-bundle/badges/coverage.svg)](https://codeclimate.com/github/open-orchestra/open-orchestra-model-bundle/coverage) |
| Sensio insight | [![SensioLabsInsight](https://insight.sensiolabs.com/projects/e6c86919-8c4a-4b5a-9619-7b671e4a4ae1/big.png)](https://insight.sensiolabs.com/projects/e6c86919-8c4a-4b5a-9619-7b671e4a4ae1) |
| VersionEye | [![Dependency Status](https://www.versioneye.com/user/projects/551e8799971f781c4800017c/badge.svg?style=flat)](https://www.versioneye.com/user/projects/551e8799971f781c4800017c) |

Usage
-----

Once you have installed the bundle, you should activate the aggregator query bundle also in the AppKernel::registerBundles() :

    new OpenOrchestra\ModelBundle\OpenOrchestraModelBundle(),
    new Solution\MongoAggregationBundle\SolutionMongoAggregationBundle(),

This will allow you to create aggregation query in your repositories by using the method :

    AbstractRepository::createAggregationQuery()

With the aggregation, mongo does not return the original document, but by using the `$$ROOT` parameter, you can add all 
the fields of the document to the response.

To hydrate all the documents using the database result, use the method :

    AbstractRepository::hydrateAggregateQuery()
<commit_msg>change account sension insight<commit_after>open-orchestra-model-bundle
===========================

The Open Orchestra model bundle

| Service       | Badge         |
| ------------- |:-------------:|
| Travis | [![Build Status](https://travis-ci.org/open-orchestra/open-orchestra-model-bundle.svg)](https://travis-ci.org/open-orchestra/open-orchestra-model-bundle) |
| CodeClimate (quality) | [![Code Climate](https://codeclimate.com/github/open-orchestra/open-orchestra-model-bundle/badges/gpa.svg)](https://codeclimate.com/github/open-orchestra/open-orchestra-model-bundle) |
| CodeClimate (coverage) | [![Test Coverage](https://codeclimate.com/github/open-orchestra/open-orchestra-model-bundle/badges/coverage.svg)](https://codeclimate.com/github/open-orchestra/open-orchestra-model-bundle/coverage) |
| Sensio insight | [![SensioLabsInsight](https://insight.sensiolabs.com/projects/22e9c4d6-0a06-4570-9053-38236f69cdee/big.png)](https://insight.sensiolabs.com/projects/22e9c4d6-0a06-4570-9053-38236f69cdee) |
| VersionEye | [![Dependency Status](https://www.versioneye.com/user/projects/551e8799971f781c4800017c/badge.svg?style=flat)](https://www.versioneye.com/user/projects/551e8799971f781c4800017c) |

Usage
-----

Once you have installed the bundle, you should activate the aggregator query bundle also in the AppKernel::registerBundles() :

    new OpenOrchestra\ModelBundle\OpenOrchestraModelBundle(),
    new Solution\MongoAggregationBundle\SolutionMongoAggregationBundle(),

This will allow you to create aggregation query in your repositories by using the method :

    AbstractRepository::createAggregationQuery()

With the aggregation, mongo does not return the original document, but by using the `$$ROOT` parameter, you can add all 
the fields of the document to the response.

To hydrate all the documents using the database result, use the method :

    AbstractRepository::hydrateAggregateQuery()

{'fraction_non_alphanumeric': 0.15126930123004448, 'fraction_numerical': 0.043967547762365874, 'mean_word_length': 5.009433962264151, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 20, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '34677', 'n_tokens_mistral': 1313, 'n_tokens_neox': 1214, 'n_words': 211}