<commit_before>Template.search.events({
	'input #searchBox input': function(e, templateInstance) {
		e.preventDefault();

		var obj = {$and: []};
		$('.field').each(function(index, element) { 
			var x = {}; 
			x[$(element).data('filter-id')] = new RegExp("^" + element.value + '.*$'); 

			obj.$and.push(x)
		});

		Session.set('searchResults', Meteor.users.find(obj).fetch());
		
	}
})<commit_msg>Adding an edit to make the search work. Don't know why this works, btw.<commit_after>Template.search.events({
	'input #searchBox input': function(e, templateInstance) {
		e.preventDefault();

		var obj = {$and: []};
		$('#searchBox input').each(function(index, element) { 

			// why you ask? I don't know, it just works.
			if (index < $('#searchBox input').length / 2) return;

			var x = {}; 
			x[$(element).data('filter-id')] = new RegExp("^" + element.value + '.*$'); 

			obj.$and.push(x);
		});

		Session.set('searchResults', Meteor.users.find(obj).fetch());
		
	}
})
{'fraction_non_alphanumeric': 0.21618852459016394, 'fraction_numerical': 0.0010245901639344263, 'mean_word_length': 3.812807881773399, 'pattern_counts': {'":': 0, '<': 4, '<?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': '7623471', 'n_tokens_mistral': 376, 'n_tokens_neox': 334, 'n_words': 71}