Implemented Fulltext search across tags and linebreaks for letters

This commit is contained in:
schnulller
2022-06-19 00:01:14 +02:00
parent 078c4b75b8
commit 4ef0e260e0
24 changed files with 510 additions and 148 deletions

View File

@@ -0,0 +1,6 @@
namespace HaDocument.Interfaces;
public interface ISearchable {
public string Element { get; }
public string Index { get; }
}

View File

@@ -2,9 +2,9 @@ using System;
using System.Collections.Generic;
using System.Collections.Immutable;
namespace HaDocument.Models {
public class Comment{
public string Entry { get; } = "";
namespace HaDocument.Models{
public class Comment : HaDocument.Interfaces.ISearchable {
public string Element { get; } = "";
public string Index { get; } = "";
public string Type { get; } = "";
public string Lemma { get; } = "";
@@ -21,7 +21,7 @@ namespace HaDocument.Models {
SortedDictionary<string, Comment> subComments,
string parent=""
) {
Entry = entry;
Element = entry;
Index = index;
Type = type;
Lemma = lemma;

View File

@@ -1,5 +1,5 @@
namespace HaDocument.Models {
public class Editreason {
public class Editreason : HaDocument.Interfaces.ISearchable {
public string Index { get; } = "";
public string Element { get; } = "";
public string Letter { get; } = "";

View File

@@ -1,5 +1,5 @@
namespace HaDocument.Models {
public class Letter : HaModel {
public class Letter : HaModel, HaDocument.Interfaces.ISearchable {
public string Index { get; } = "";
public string Element { get; } = "";

View File

@@ -1,5 +1,5 @@
namespace HaDocument.Models {
public class Marginal {
public class Marginal : HaDocument.Interfaces.ISearchable {
public string Index { get; } = "";
public string Letter { get; } = "";
public string Page { get; } = "";

View File

@@ -1,5 +1,5 @@
namespace HaDocument.Models {
public class Tradition {
public class Tradition : HaDocument.Interfaces.ISearchable {
public string Index { get; } = "";
public string Element { get; } = "";

View File

@@ -156,8 +156,6 @@ namespace HaDocument.Reactors {
(_availableVolumes == null && _availableYearRange.Item1 == 0 && _availableYearRange.Item2 == 0)
) {
var ZHInfo = !inZH ? null : new ZHInfo(AltLineNumbering, dateChanged, Volume, Page);
if (Autopsic == "0")
System.Diagnostics.Debugger.Break();
var meta = new Meta(
Index,
Autopsic,