<commit_before>﻿using System;
using System.Data.SqlClient;
using System.Diagnostics;
using System.IO;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Dapper;
using Lucene.Net.Analysis.Standard;
using Lucene.Net.Documents;
using Lucene.Net.Index;
using Lucene.Net.Search;
using Lucene.Net.Store;

namespace SqlDirectory.Demo
{
    class Program
    {
        static void Main(string[] args)
        {
            using (var connection = new SqlConnection(@"MultipleActiveResultSets=True;Data Source=(localdb)\v11.0;Initial Catalog=TestLucene;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False"))
            {
                connection.Open();
                SqlServerDirectory.ProvisionDatabase(connection, "[search]", true);
            }

            //var t1 = Task.Factory.StartNew(Do);
            //var t2 = Task.Factory.StartNew(Do);
            //var t3 = Task.Factory.StartNew(Do);

            //Task.WaitAll(t1, t2, t3);
            LockCanBeReleased();
        }

        static void LockCanBeReleased()<commit_msg>demo app<commit_after>﻿using System;
using System.Data.SqlClient;
using System.Diagnostics;
using System.IO;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Dapper;
using Lucene.Net.Analysis.Standard;
using Lucene.Net.Documents;
using Lucene.Net.Index;
using Lucene.Net.Search;
using Lucene.Net.Store;

namespace SqlDirectory.Demo
{
    class Program
    {
        static void Main(string[] args)
        {
            using (var connection = new SqlConnection(@"MultipleActiveResultSets=True;Data Source=(localdb)\v11.0;Initial Catalog=TestLucene;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False"))
            {
                connection.Open();
                SqlServerDirectory.ProvisionDatabase(connection, "[search]", true);
            }

            var t1 = Task.Factory.StartNew(Do);
            var t2 = Task.Factory.StartNew(Do);
            var t3 = Task.Factory.StartNew(Do);

            Task.WaitAll(t1, t2, t3);
        }

        static void LockCanBeReleased()
{'fraction_non_alphanumeric': 0.10950605778191985, 'fraction_numerical': 0.010251630941286114, 'mean_word_length': 2.9250457038391224, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1852498', 'n_tokens_mistral': 632, 'n_tokens_neox': 611, 'n_words': 125}