Posts found by their words
/api/v2/search now searches statuses by words for a signed-in persona, in Mastodon's scope: what it wrote, boosted, favourited, bookmarked or was named in, and public posts of authors who let themselves be indexed (indexable, off by default). Newest first, only what the persona may see, through a text index over the posts' words in every language alike. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LsXgEaXee4GCU1hwYgPJXw
This commit is contained in:
1 parent
83d4148de1
commit
d4226a289c
4 files changed
+99
-1
No files matched your search
@@ -110,6 +110,11 @@ namespace PrivaPub.Infrastructure.Data
|
||||
await Plain<PersonaFilter>(token, f => f.AvatarId);
|
||||
await Plain<FollowedTag>(token, t => t.Name);
|
||||
await Plain<Post>(token, p => p.Tags);
|
||||
//the words status search reads, in every language alike (no stemming, no stop words); Language is not the
|
||||
//index's language field
|
||||
await DB.Default.Index<Post>().Key(p => p.Text, KeyType.Text).Key(p => p.ContentHtml, KeyType.Text).Key(p => p.SpoilerText, KeyType.Text)
|
||||
.Key(p => p.Title, KeyType.Text).Option(o => { o.DefaultLanguage = "none"; o.LanguageOverride = "textSearchLanguage"; o.Name = "words"; })
|
||||
.CreateAsync(token);
|
||||
await Plain<PersonaListMember>(token, m => m.AvatarId);
|
||||
await Plain<Mute>(token, m => m.TargetActorURI);
|
||||
await Plain<Report>(token, r => r.IsResolved, r => r.ID);
|
||||
|
||||
Reference in new issue
Block a user