<commit_before>import 'rxjs/add/operator/debounceTime'
import 'rxjs/add/operator/map'


import * as actions from './actions'

// When the query changed, refresh the search results
export const refreshSearchResultsUponQueryChange = action$ => action$
    .ofType(actions.setQuery.getType())
    .debounceTime(500) // wait until typing stops for 500ms
    .map(() => actions.refreshSearch({loadingIndicator:true}))

// When the database changed, refresh the search results
export const refreshSearchResultsUponLogChange = action$ => action$
    .ofType(actions.handlePouchChange.getType())
    .debounceTime(1000)
    .map(() => actions.refreshSearch({loadingIndicator:false}))
<commit_msg>Update search results when selected date changes.<commit_after>import 'rxjs/add/operator/debounceTime'
import 'rxjs/add/operator/map'
import 'rxjs/add/operator/filter'

import * as actions from './actions'


const searchUpdateActions = [
    actions.setQuery.getType(),
    actions.setStartDate.getType(),
    actions.setEndDate.getType(),
]

// When the query changed, refresh the search results
export const refreshSearchResultsUponQueryChange = action$ => action$
    .filter(action => searchUpdateActions.includes(action.type))
    .debounceTime(500) // wait until typing stops for 500ms
    .map(() => actions.refreshSearch({loadingIndicator:true}))

// When the database changed, refresh the search results
export const refreshSearchResultsUponLogChange = action$ => action$
    .ofType(actions.handlePouchChange.getType())
    .debounceTime(1000)
    .map(() => actions.refreshSearch({loadingIndicator:false}))

{'fraction_non_alphanumeric': 0.11830635118306351, 'fraction_numerical': 0.012453300124533, 'mean_word_length': 4.996268656716418, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 12, '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': '3355701', 'n_tokens_mistral': 458, 'n_tokens_neox': 439, 'n_words': 112}