eventstore/bleve: index some generic tags and references on all events.
This commit is contained in:
@@ -248,13 +248,14 @@ func (b *BleveBackend) indexEvent(evt nostr.Event) error {
|
|||||||
evt.Content = pm.Name + "\n" + pm.DisplayName + "\n" + pm.About
|
evt.Content = pm.Name + "\n" + pm.DisplayName + "\n" + pm.About
|
||||||
references = append(references, pm.NIP05)
|
references = append(references, pm.NIP05)
|
||||||
}
|
}
|
||||||
case 9802:
|
}
|
||||||
|
|
||||||
for _, tag := range evt.Tags {
|
for _, tag := range evt.Tags {
|
||||||
if len(tag) < 2 {
|
if len(tag) < 2 {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
switch tag[0] {
|
switch tag[0] {
|
||||||
case "comment":
|
case "comment", "name", "title", "about", "description":
|
||||||
evt.Content += "\n\n" + tag[1]
|
evt.Content += "\n\n" + tag[1]
|
||||||
case "e":
|
case "e":
|
||||||
if ptr, err := nostr.EventPointerFromTag(tag); err == nil {
|
if ptr, err := nostr.EventPointerFromTag(tag); err == nil {
|
||||||
@@ -268,7 +269,6 @@ func (b *BleveBackend) indexEvent(evt nostr.Event) error {
|
|||||||
references = append(references, tag[1])
|
references = append(references, tag[1])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
doc := map[string]any{
|
doc := map[string]any{
|
||||||
labelKindField: strconv.Itoa(int(evt.Kind)),
|
labelKindField: strconv.Itoa(int(evt.Kind)),
|
||||||
|
|||||||
Reference in New Issue
Block a user