<commit_before>import Ember from 'ember';
import _ from "npm:lodash";
import hbs from 'htmlbars-inline-precompile';

export default Ember.Component.extend({

  search: Ember.inject.service('AlgoliaSearch'),

  isSearchVisible: Ember.computed('standardSetIds', function(){
    return _.chain(this.get('standardSetIds'))
            .filter(s => !_.contains(s, 'blank'))
            .value().length > 0
  }),


  didUpdateAttrs(){
    Ember.run.throttle(this, this.searchAlgolia, 30)
  },

  searchAlgolia(){
    if (this.get('query') == "" || Ember.isNone(this.get('query'))){
      this.set('results', null)
      return
    }
    this.get('search.index').search(this.get('query'), {
      attributesToRetrieve: 'id',
      tagFilters: this.get('standardSetIds')
    }).then(data => {<commit_msg>Make the tag filters be "ors"<commit_after>import Ember from 'ember';
import _ from "npm:lodash";
import hbs from 'htmlbars-inline-precompile';

export default Ember.Component.extend({

  search: Ember.inject.service('AlgoliaSearch'),

  isSearchVisible: Ember.computed('standardSetIds', function(){
    return _.chain(this.get('standardSetIds'))
            .filter(s => !_.contains(s, 'blank'))
            .value().length > 0
  }),


  didUpdateAttrs(){
    Ember.run.throttle(this, this.searchAlgolia, 30)
  },

  searchAlgolia(){
    if (this.get('query') == "" || Ember.isNone(this.get('query'))){
      this.set('results', null)
      return
    }
    this.get('search.index').search(this.get('query'), {
      attributesToRetrieve: 'id',
      tagFilters: [this.get('standardSetIds')]
    }).then(data => {
{'fraction_non_alphanumeric': 0.1763975155279503, 'fraction_numerical': 0.0037267080745341614, 'mean_word_length': 3.6560693641618496, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '5375832', 'n_tokens_mistral': 542, 'n_tokens_neox': 523, 'n_words': 91}