From 5faccd9250c235b26bc9ab98ba6be1c770da5db1 Mon Sep 17 00:00:00 2001 From: guqing Date: Tue, 23 Jan 2024 11:17:10 +0800 Subject: [PATCH] chore: add status.expert to index spec --- .../src/main/java/run/halo/app/infra/SchemeInitializer.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/application/src/main/java/run/halo/app/infra/SchemeInitializer.java b/application/src/main/java/run/halo/app/infra/SchemeInitializer.java index f87d48637e..7b1eba70b3 100644 --- a/application/src/main/java/run/halo/app/infra/SchemeInitializer.java +++ b/application/src/main/java/run/halo/app/infra/SchemeInitializer.java @@ -141,6 +141,10 @@ public void onApplicationEvent(@NonNull ApplicationContextInitializedEvent event .setName("status.phase") .setIndexFunc( simpleAttribute(Post.class, post -> post.getStatusOrDefault().getPhase()))); + indexSpecs.add(new IndexSpec() + .setName("status.excerpt") + .setIndexFunc( + simpleAttribute(Post.class, post -> post.getStatusOrDefault().getExcerpt()))); }); schemeManager.register(Category.class); schemeManager.register(Tag.class);