<commit_before><template>
  <v-card>
    <v-card-title>
      <h1 class="headline">Search</h1>
      <reload-button title="Reload indices" :action="resetIndices"></reload-button>
    </v-card-title>
    <v-divider></v-divider>

    <v-card-text>
      <v-form @submit.prevent="loadData">
        <v-layout row wrap>
          <v-flex lg2>
            <v-text-field label="Search query"
                          name="query"
                          id="query"
                          messages="Querying supports the <a target='_blank' rel='noopener' href='https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html'>query string DSL</a>"
                          v-model="searchQ"
                          append-icon="clear"
                          autofocus
                          @click:append="resetQuery"></v-text-field>
          </v-flex>

          <v-flex>
            <data-loader method="catIndices" ref="indicesLoader" renderContentWhileLoading>
              <template slot-scope="data">
                <custom-v-autocomplete multiple
                                       label="Indices"
                                       name="indices"
                                       id="indices"
                                       v-model="searchIndices"
                                       :items="data.body | sortIndices"
                                       :loading="data.loading">
                  <template slot="item" slot-scope="data">
                    <v-list-tile-action>
                      <v-checkbox color="primary" :input-value="searchIndices.includes(data.item)"></v-checkbox>
                    </v-list-tile-action>
                    <v-list-tile-content>
                      {{data.item}}
                    </v-list-tile-content>
                  </template>
                </custom-v-autocomplete>
              </template>
            </data-loader>
          </v-flex>

          <v-flex lg1>
            <v-flex right>
              <v-btn type="submit" color="primary">Submit</v-btn>
            </v-flex>
          </v-flex>
        </v-layout>

        <div v-if="optionsCollapsed">
          <v-layout row wrap>
            <v-flex lg10>
              <v-text-field label="Source includes"
                            name="source_includes"
                            messages="Enter a comma separated list of columns to load"
                            v-model="searchSourceInclude"></v-text-field>
            </v-flex>

            <v-flex lg2>
              <v-text-field label="Size"
                            name="size"
                            v-model="searchSize"></v-text-field>
            </v-flex>
          </v-layout>

          <div>
            <v-flex d-inline-flex>
              <v-switch id="show_index" label="Show _index" v-model="showIndex" hide-details></v-switch>
            </v-flex>

            <v-flex d-inline-flex class="ml-5">
              <v-switch id="show_score" label="Show _score" v-model="showScore" hide-details></v-switch>
            </v-flex>
          </div>
        </div>

        <div class="clearfix">
          <v-flex d-inline-flex right>
            <a @click="showOptions" class="grey--text user-select--none">More options...
              <v-icon small>{{optionsCollapsed ? 'arrow_upwards' : 'arrow_downwards'}}</v-icon>
            </a>
          </v-flex>
        </div>
      </v-form>
    </v-card-text>

    <v-divider></v-divider>

    <data-loader method="search"
                 :methodParams="searchParams"
                 ref="resultsLoader"
                 :execute="executeSearch"
                 renderContentWhileLoading>
      <template slot-scope="data">
        <results-table :hits="data.body && data.body.hits && data.body.hits.hits || []"
                       :loading="data.loading"></results-table>
      </template>
    </data-loader>
  </v-card>
</template><commit_msg>move text to center<commit_after><template>
  <v-card>
    <v-card-title>
      <h1 class="headline">Search</h1>
      <reload-button title="Reload indices" :action="resetIndices"></reload-button>
    </v-card-title>
    <v-divider></v-divider>

    <v-card-text>
      <v-form @submit.prevent="loadData">
        <v-layout row wrap>
          <v-flex lg2>
            <v-text-field label="Search query"
                          name="query"
                          id="query"
                          messages="Querying supports the <a target='_blank' rel='noopener' href='https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html'>query string DSL</a>"
                          v-model="searchQ"
                          append-icon="clear"
                          autofocus
                          @click:append="resetQuery"></v-text-field>
          </v-flex>

          <v-flex>
            <data-loader method="catIndices" ref="indicesLoader" renderContentWhileLoading>
              <template slot-scope="data">
                <custom-v-autocomplete multiple
                                       label="Indices"
                                       name="indices"
                                       id="indices"
                                       v-model="searchIndices"
                                       :items="data.body | sortIndices"
                                       :loading="data.loading">
                  <template slot="item" slot-scope="data">
                    <v-list-tile-action>
                      <v-checkbox color="primary" :input-value="searchIndices.includes(data.item)"></v-checkbox>
                    </v-list-tile-action>
                    <v-list-tile-content>
                      {{data.item}}
                    </v-list-tile-content>
                  </template>
                </custom-v-autocomplete>
              </template>
            </data-loader>
          </v-flex>

          <v-flex lg1>
            <v-flex right>
              <v-btn type="submit" color="primary">Submit</v-btn>
            </v-flex>
          </v-flex>
        </v-layout>

        <div v-if="optionsCollapsed">
          <v-layout row wrap>
            <v-flex lg10>
              <v-text-field label="Source includes"
                            name="source_includes"
                            messages="Enter a comma separated list of columns to load"
                            v-model="searchSourceInclude"></v-text-field>
            </v-flex>

            <v-flex lg2>
              <v-text-field label="Size"
                            name="size"
                            v-model="searchSize"></v-text-field>
            </v-flex>
          </v-layout>

          <div>
            <v-flex d-inline-flex>
              <v-switch id="show_index" label="Show _index" v-model="showIndex" hide-details></v-switch>
            </v-flex>

            <v-flex d-inline-flex class="ml-5">
              <v-switch id="show_score" label="Show _score" v-model="showScore" hide-details></v-switch>
            </v-flex>
          </div>
        </div>

        <div class="text-xs-center">
          <a @click="showOptions" class="grey--text user-select--none">More options...
            <v-icon small>{{optionsCollapsed ? 'arrow_upwards' : 'arrow_downwards'}}</v-icon>
          </a>
        </div>
      </v-form>
    </v-card-text>

    <v-divider></v-divider>

    <data-loader method="search"
                 :methodParams="searchParams"
                 ref="resultsLoader"
                 :execute="executeSearch"
                 renderContentWhileLoading>
      <template slot-scope="data">
        <results-table :hits="data.body && data.body.hits && data.body.hits.hits || []"
                       :loading="data.loading"></results-table>
      </template>
    </data-loader>
  </v-card>
</template>
{'fraction_non_alphanumeric': 0.13938473224458792, 'fraction_numerical': 0.002025572857323712, 'mean_word_length': 1.27994227994228, 'pattern_counts': {'":': 0, '<': 169, '<?xml version=': 0, '>': 169, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4707407', 'n_tokens_mistral': 2200, 'n_tokens_neox': 2137, 'n_words': 336}