<commit_before>using Premotion.Mansion.Core;
using Premotion.Mansion.Core.Types;

namespace Premotion.Mansion.Repository.ElasticSearch.Schema.Descriptors
{
	/// <summary>
	/// Represents the <see cref="TypeDescriptor"/> for elastic search tree relation properties.
	/// </summary>
	[TypeDescriptor(Constants.DescriptorNamespaceUri, "treeRelations")]
	public class TreeRelationsPropertyMappingDescriptor : PropertyMappingBaseDescriptor
	{
		#region Overrides of PropertyMappingBaseDescriptor
		/// <summary>
		/// Adds <see cref="PropertyMapping"/>s of <paramref name="property"/> to the given <paramref name="typeMapping"/>.
		/// </summary>
		/// <param name="context">The <see cref="IMansionContext"/>.</param>
		/// <param name="property">The <see cref="IPropertyDefinition"/> of the property for which to add the <see cref="PropertyMapping"/>s.</param>
		/// <param name="typeMapping">The <see cref="TypeMapping"/> to which to add the new <see cref="PropertyMapping"/>s.</param>
		protected override void DoAddMappingTo(IMansionContext context, IPropertyDefinition property, TypeMapping typeMapping)
		{
			typeMapping.Add(new TreeRelationsPropertyMapping());
			typeMapping.Add(new MultiFieldPropertyMapping(
									"name",
			                	"name",
			                	"untouched",
			                	new[]
			                	{
			                		new SingleValuedPropertyMapping("name")
			                		{
			                			Type = "string",
			                			Index = "analyzed",
											Boost = 5
			                		},
			                		new SingleValuedPropertyMapping("untouched")
			                		{
			                			Type = "string",
			                			Index = "not_analyzed",
											Boost = 5
			                		}
			                	}
			                	));
			typeMapping.Add(new SingleValuedPropertyMapping("type")
			                {
			                	Type = "string",
			                	Index = "not_analyzed"
			                });
			typeMapping.Add(new SingleValuedPropertyMapping("order")
			                {
			                	Type = "long"
			                });
			typeMapping.Add(new IgnoredPropertyMapping("depth"));
			typeMapping.Add(new IgnoredPropertyMapping("structure"));
			typeMapping.Add(new IgnoredPropertyMapping("path"));
			typeMapping.Add(new IgnoredPropertyMapping("parentId"));
			typeMapping.Add(new IgnoredPropertyMapping("parentPointer"));
			typeMapping.Add(new IgnoredPropertyMapping("parentPath"));
			typeMapping.Add(new IgnoredPropertyMapping("parentStructure"));
		}
		#endregion
	}
}<commit_msg>* name boost<commit_after>using Premotion.Mansion.Core;
using Premotion.Mansion.Core.Types;

namespace Premotion.Mansion.Repository.ElasticSearch.Schema.Descriptors
{
	/// <summary>
	/// Represents the <see cref="TypeDescriptor"/> for elastic search tree relation properties.
	/// </summary>
	[TypeDescriptor(Constants.DescriptorNamespaceUri, "treeRelations")]
	public class TreeRelationsPropertyMappingDescriptor : PropertyMappingBaseDescriptor
	{
		#region Overrides of PropertyMappingBaseDescriptor
		/// <summary>
		/// Adds <see cref="PropertyMapping"/>s of <paramref name="property"/> to the given <paramref name="typeMapping"/>.
		/// </summary>
		/// <param name="context">The <see cref="IMansionContext"/>.</param>
		/// <param name="property">The <see cref="IPropertyDefinition"/> of the property for which to add the <see cref="PropertyMapping"/>s.</param>
		/// <param name="typeMapping">The <see cref="TypeMapping"/> to which to add the new <see cref="PropertyMapping"/>s.</param>
		protected override void DoAddMappingTo(IMansionContext context, IPropertyDefinition property, TypeMapping typeMapping)
		{
			typeMapping.Add(new TreeRelationsPropertyMapping());
			typeMapping.Add(new MultiFieldPropertyMapping(
			                	"name",
			                	"name",
			                	"untouched",
			                	new[]
			                	{
			                		new SingleValuedPropertyMapping("name")
			                		{
			                			Type = "string",
			                			Index = "analyzed",
			                			Boost = 5
			                		},
			                		new SingleValuedPropertyMapping("untouched")
			                		{
			                			Type = "string",
			                			Index = "not_analyzed"
			                		}
			                	}
			                	));
			typeMapping.Add(new SingleValuedPropertyMapping("type")
			                {
			                	Type = "string",
			                	Index = "not_analyzed"
			                });
			typeMapping.Add(new SingleValuedPropertyMapping("order")
			                {
			                	Type = "long"
			                });
			typeMapping.Add(new IgnoredPropertyMapping("depth"));
			typeMapping.Add(new IgnoredPropertyMapping("structure"));
			typeMapping.Add(new IgnoredPropertyMapping("path"));
			typeMapping.Add(new IgnoredPropertyMapping("parentId"));
			typeMapping.Add(new IgnoredPropertyMapping("parentPointer"));
			typeMapping.Add(new IgnoredPropertyMapping("parentPath"));
			typeMapping.Add(new IgnoredPropertyMapping("parentStructure"));
		}
		#endregion
	}
}
{'fraction_non_alphanumeric': 0.11462146021961087, 'fraction_numerical': 0.0005779233288383741, 'mean_word_length': 2.238927011852776, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 41, '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': '5569016', 'n_tokens_mistral': 1558, 'n_tokens_neox': 1294, 'n_words': 258}