knowledge-base: retract an accepted record or its clauses on the operator's Approve
The operator prefers removing a wrong decision to stacking a correcting record on it, and withdraw took only reserved or proposed records. retract asks the operator through the router like a record that needs the operator, and changes nothing until the Approve; a retracted record or clause no longer holds in ask, holds, get, links and progress, history keeps every version, and the whole-set rules still read a retracted record's links so a retraction alone raises no finding. withdraw with retraction true takes a waiting one back.
This commit is contained in:
@@ -210,10 +210,13 @@ func (s *memStore) Search(_ context.Context, question string, limit int) ([]Hit,
|
||||
}
|
||||
for k, e := range s.entries {
|
||||
r := e.versions[e.current-1].Record
|
||||
if r.Status == StatusReserved || r.Status == StatusWithdrawn {
|
||||
if r.Status == StatusReserved || r.Status == StatusWithdrawn || r.Status == StatusRetracted {
|
||||
continue
|
||||
}
|
||||
for _, c := range r.Clauses {
|
||||
if c.Status == ClauseRetracted {
|
||||
continue
|
||||
}
|
||||
if n := score(c.Text); n > 0 {
|
||||
hits = append(hits, Hit{Key: k, Clause: c.N, Rank: n})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user