<commit_before>import Search from '../../models/elasticsearch/search'

export const browse = {
  state: {
    search: new Search({}),
    results: []
  },
  mutations: {
    setSearchQ (state, q) {
      state.search.q = q
      state.search.evaluate()
    },
    setSearchSize (state, size) {
      state.search.size = size
      state.search.evaluate()
    },
    setSearchFrom (state, from) {
      state.search.from = from
      state.search.evaluate()
    },
    setSearchIndex (state, index) {
      state.search.index = index
      state.search.evaluate()
    },
    setBrowseResults (state, results) {
      state.results = results
    }
  }
}<commit_msg>- only save the first 100 results to localstorage<commit_after>import Search from '../../models/elasticsearch/search'

export const browse = {
  state: {
    search: new Search({}),
    results: []
  },
  mutations: {
    setSearchQ (state, q) {
      state.search.q = q
      state.search.evaluate()
    },
    setSearchSize (state, size) {
      state.search.size = size
      state.search.evaluate()
    },
    setSearchFrom (state, from) {
      state.search.from = from
      state.search.evaluate()
    },
    setSearchIndex (state, index) {
      state.search.index = index
      state.search.evaluate()
    },
    setBrowseResults (state, results) {
      results.hits.hits = results.hits.hits.slice(0, 100)
      state.results = results
    }
  }
}
{'fraction_non_alphanumeric': 0.1352112676056338, 'fraction_numerical': 0.004929577464788733, 'mean_word_length': 2.343529411764706, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '3073512', 'n_tokens_mistral': 458, 'n_tokens_neox': 443, 'n_words': 95}