<commit_before>#
# Cookbook Name:: solr
# Recipe:: default
#
# Copyright 2013, <NAME>
#

if node['solr']['install_java']
  include_recipe 'apt'
  include_recipe 'java'
end

extract_path = "#{node['solr']['dir']}-#{node['solr']['version']}"
solr_path = "#{extract_path}/#{node['solr']['version'].split('.')[0].to_i < 5 ? 'example' : 'server'}"

ark 'solr' do
  url node['solr']['url']<commit_msg>Create the solr user and group.<commit_after>#
# Cookbook Name:: solr
# Recipe:: default
#
# Copyright 2013, <NAME>
#

if node['solr']['install_java']
  include_recipe 'apt'
  include_recipe 'java'
end

extract_path = "#{node['solr']['dir']}-#{node['solr']['version']}"
solr_path = "#{extract_path}/#{node['solr']['version'].split('.')[0].to_i < 5 ? 'example' : 'server'}"

user node['solr']['user'] do
  comment 'User that owns the solr data dir.'
  home node['solr']['data_dir']
  system true
  shell '/bin/false'
  only_if { node['solr']['user'] != 'root' }
end

group node['solr']['group'] do
  members node['solr']['user']
  append true
  system true
  only_if { node['solr']['group'] != 'root' }
end

ark 'solr' do
  url node['solr']['url']
{'fraction_non_alphanumeric': 0.23137598597721298, 'fraction_numerical': 0.010517090271691499, 'mean_word_length': 5.6395348837209305, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '3782352', 'n_tokens_mistral': 434, 'n_tokens_neox': 427, 'n_words': 94}