<commit_before>import React from 'react';
import PropTypes from 'prop-types';
import { browserHistory } from 'react-router';
import tt from 'counterpart';

class ElasticSearchInput extends React.Component {
    constructor(props) {
        super(props);
        this.state = {
            value: '',
        };
        this.handleChange = this.handleChange.bind(this);
        this.handleSubmit = this.handleSubmit.bind(this);
    }

    handleChange(event) {
        this.setState({ value: event.target.value });
    }

    handleSubmit = e => {
        e.preventDefault();
        browserHistory.push(`/search/relevance/${this.state.value}`);
    };

    render() {
        return (
            <span>
                <form className={'search-input'} onSubmit={this.handleSubmit}>
                    <svg<commit_msg>search input should use new query param<commit_after>import React from 'react';
import PropTypes from 'prop-types';
import { browserHistory } from 'react-router';
import tt from 'counterpart';

class ElasticSearchInput extends React.Component {
    constructor(props) {
        super(props);
        this.state = {
            value: '',
        };
        this.handleChange = this.handleChange.bind(this);
        this.handleSubmit = this.handleSubmit.bind(this);
    }

    handleChange(event) {
        this.setState({ value: event.target.value });
    }

    handleSubmit = e => {
        e.preventDefault();
        browserHistory.push(`/search?q=${this.state.value}`);
    };

    render() {
        return (
            <span>
                <form className={'search-input'} onSubmit={this.handleSubmit}>
                    <svg
{'fraction_non_alphanumeric': 0.1292270531400966, 'fraction_numerical': 0.0, 'mean_word_length': 2.3073852295409183, 'pattern_counts': {'":': 0, '<': 9, '<?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': '3136219', 'n_tokens_mistral': 449, 'n_tokens_neox': 448, 'n_words': 91}