<commit_before>﻿// ----------------------------------------------------------------------------
//  Licensed to FlexSearch under one or more contributor license 
//  agreements. See the NOTICE file distributed with this work 
//  for additional information regarding copyright ownership. 
//
//  This source code is subject to terms and conditions of the 
//  Apache License, Version 2.0. A copy of the license can be 
//  found in the License.txt file at the root of this distribution. 
//  You may also obtain a copy of the License at:
// 
//     http://www.apache.org/licenses/LICENSE-2.0
// 
//  By using this source code in any fashion, you are agreeing
//  to be bound by the terms of the Apache License, Version 2.0.
//
//  You must not remove this notice, or any other, from this software.
// ----------------------------------------------------------------------------
namespace FlexSearch.Core

open Microsoft.FSharp.Reflection
open System
open System.Collections.Concurrent
open System.Collections.Generic
open System.Reflection

/// Extrenal representation of messages which will be send to
/// the end user. 
[<CLIMutableAttribute>]
type OperationMessage = 
    { Properties : array<string * string>
      Message : string
      ErrorCode : string }

type MessageKeyword =
    | Node 
    | Index 
    | Search 
    | Document 
    | Default
    | Plugin

type MessageLevel =
    | Critical
    | Error
    | Warning
    | Info
    | Verbose
    | Nothing

/// Interface to expose internal message format
type IMessage = 
    abstract OperationMessage : unit -> OperationMessage
    abstract LogProperty : unit -> MessageKeyword * MessageLevel<commit_msg>refactor(logging) : add level startup to the keywords<commit_after>﻿// ----------------------------------------------------------------------------
//  Licensed to FlexSearch under one or more contributor license 
//  agreements. See the NOTICE file distributed with this work 
//  for additional information regarding copyright ownership. 
//
//  This source code is subject to terms and conditions of the 
//  Apache License, Version 2.0. A copy of the license can be 
//  found in the License.txt file at the root of this distribution. 
//  You may also obtain a copy of the License at:
// 
//     http://www.apache.org/licenses/LICENSE-2.0
// 
//  By using this source code in any fashion, you are agreeing
//  to be bound by the terms of the Apache License, Version 2.0.
//
//  You must not remove this notice, or any other, from this software.
// ----------------------------------------------------------------------------
namespace FlexSearch.Core

open Microsoft.FSharp.Reflection
open System
open System.Collections.Concurrent
open System.Collections.Generic
open System.Reflection

/// Extrenal representation of messages which will be send to
/// the end user. 
[<CLIMutableAttribute>]
type OperationMessage = 
    { Properties : array<string * string>
      Message : string
      ErrorCode : string }

type MessageKeyword =
    | Node 
    | Index 
    | Search 
    | Document 
    | Default
    | Plugin
    | Startup

type MessageLevel =
    | Critical
    | Error
    | Warning
    | Info
    | Verbose
    | Nothing

/// Interface to expose internal message format
type IMessage = 
    abstract OperationMessage : unit -> OperationMessage
    abstract LogProperty : unit -> MessageKeyword * MessageLevel
{'fraction_non_alphanumeric': 0.15870206489675517, 'fraction_numerical': 0.0035398230088495575, 'mean_word_length': 2.0604693140794224, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '2244439', 'n_tokens_mistral': 837, 'n_tokens_neox': 812, 'n_words': 348}