Added basic search implementation with display components

This commit is contained in:
Vincent Allen
2025-10-16 09:24:52 -04:00
852 changed files with 6519 additions and 29467 deletions

View File

@@ -5,6 +5,7 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using NpgsqlTypes;
using OpenArchival.DataAccess;
#nullable disable
@@ -407,26 +408,140 @@ namespace OpenArchival.DataAccess.Migrations
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("AllSearchString")
.IsRequired()
.HasColumnType("text");
b.Property<NpgsqlTsVector>("AllSearchVector")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("tsvector")
.HasAnnotation("Npgsql:TsVectorConfig", "english")
.HasAnnotation("Npgsql:TsVectorProperties", new[] { "AllSearchString" });
b.Property<int>("CategoryId")
.HasColumnType("integer");
b.Property<string>("DefectsSearchString")
.IsRequired()
.HasColumnType("text");
b.Property<NpgsqlTsVector>("DefectsSearchVector")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("tsvector")
.HasAnnotation("Npgsql:TsVectorConfig", "english")
.HasAnnotation("Npgsql:TsVectorProperties", new[] { "DefectsSearchString" });
b.Property<string>("Description")
.HasColumnType("text");
b.Property<string>("DescriptionSearchString")
.IsRequired()
.HasColumnType("text");
b.Property<NpgsqlTsVector>("DescriptionSearchVector")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("tsvector")
.HasAnnotation("Npgsql:TsVectorConfig", "english")
.HasAnnotation("Npgsql:TsVectorProperties", new[] { "DescriptionSearchString" });
b.Property<string>("FileContentSearchString")
.IsRequired()
.HasColumnType("text");
b.Property<NpgsqlTsVector>("FileContentSearchVector")
.IsRequired()
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("tsvector")
.HasAnnotation("Npgsql:TsVectorConfig", "english")
.HasAnnotation("Npgsql:TsVectorProperties", new[] { "FileContentSearchString" });
b.Property<string>("FilenamesSearchString")
.IsRequired()
.HasColumnType("text");
b.Property<NpgsqlTsVector>("FilenamesSearchVector")
.IsRequired()
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("tsvector")
.HasAnnotation("Npgsql:TsVectorConfig", "english")
.HasAnnotation("Npgsql:TsVectorProperties", new[] { "FilenamesSearchString" });
b.Property<bool>("IsPublicallyVisible")
.HasColumnType("boolean");
b.Property<string>("ListedNamesSearchString")
.IsRequired()
.HasColumnType("text");
b.Property<NpgsqlTsVector>("ListedNamesSearchVector")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("tsvector")
.HasAnnotation("Npgsql:TsVectorConfig", "english")
.HasAnnotation("Npgsql:TsVectorProperties", new[] { "ListedNamesSearchString" });
b.Property<string>("TagsSearchString")
.IsRequired()
.HasColumnType("text");
b.Property<NpgsqlTsVector>("TagsSearchVector")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("tsvector")
.HasAnnotation("Npgsql:TsVectorConfig", "english")
.HasAnnotation("Npgsql:TsVectorProperties", new[] { "TagsSearchString" });
b.Property<string>("Title")
.IsRequired()
.HasColumnType("text");
b.Property<string>("TitleSearchString")
.IsRequired()
.HasColumnType("text");
b.Property<NpgsqlTsVector>("TitleSearchVector")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("tsvector")
.HasAnnotation("Npgsql:TsVectorConfig", "english")
.HasAnnotation("Npgsql:TsVectorProperties", new[] { "TitleSearchString" });
b.Property<int>("TypeId")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("AllSearchVector");
NpgsqlIndexBuilderExtensions.HasMethod(b.HasIndex("AllSearchVector"), "GIN");
b.HasIndex("CategoryId");
b.HasIndex("DefectsSearchVector");
NpgsqlIndexBuilderExtensions.HasMethod(b.HasIndex("DefectsSearchVector"), "GIN");
b.HasIndex("DescriptionSearchVector");
NpgsqlIndexBuilderExtensions.HasMethod(b.HasIndex("DescriptionSearchVector"), "GIN");
b.HasIndex("FileContentSearchVector");
NpgsqlIndexBuilderExtensions.HasMethod(b.HasIndex("FileContentSearchVector"), "GIN");
b.HasIndex("FilenamesSearchVector");
NpgsqlIndexBuilderExtensions.HasMethod(b.HasIndex("FilenamesSearchVector"), "GIN");
b.HasIndex("ListedNamesSearchVector");
NpgsqlIndexBuilderExtensions.HasMethod(b.HasIndex("ListedNamesSearchVector"), "GIN");
b.HasIndex("TagsSearchVector");
NpgsqlIndexBuilderExtensions.HasMethod(b.HasIndex("TagsSearchVector"), "GIN");
b.HasIndex("TitleSearchVector");
NpgsqlIndexBuilderExtensions.HasMethod(b.HasIndex("TitleSearchVector"), "GIN");
b.HasIndex("TypeId");
b.ToTable("ArtifactGroupings");