matrix-org / synapse

Synapse: Matrix homeserver written in Python/Twisted.
https://matrix-org.github.io/synapse
Apache License 2.0
11.83k stars 2.13k forks source link

"Search Function Issue: Inconsistent Results When Editing Messages in a Room" #16527

Closed MATwave closed 1 year ago

MATwave commented 1 year ago

Description

If you edit a message and search for it using the old content, the message is found with the new content. However, if you try to search for a message with the new content, nothing is found at all.

Server - matrix.org.

image image

I also asked questions in "Synapse Admins."

Steps to reproduce

  1. I created an unencrypted room.
  2. I wrote a message.
  3. I found the message.
  4. I edited the message.
  5. Searched for the old content - found it.
  6. Searched for the new content - couldn't find it.

Homeserver

matrix.org

Synapse Version

Current release: 1.94.0 of app.element.io

Installation Method

I don't know

Database

i think PostgreSQL

Workers

Single process

Platform

image

Configuration

No response

Relevant log output

{
  "content": {
    "body": " * second",
    "m.mentions": {},
    "m.new_content": {
      "body": "second",
      "m.mentions": {},
      "msgtype": "m.text"
    },
    "m.relates_to": {
      "event_id": "$HeuNX2mrIdpffEW_fQXORBm8Me_CL2O4aLIAMIrTtkg",
      "rel_type": "m.replace"
    },
    "msgtype": "m.text"
  },
  "origin_server_ts": 1697804524733,
  "sender": "@satanislaw:matrix.org",
  "type": "m.room.message",
  "unsigned": {
    "age": 1179232,
    "transaction_id": "m1697804524537.8"
  },
  "event_id": "$ACJY7rxe8K_DSsXBIkxboXRDGVaLShKXsLEsaCPfEqs",
  "room_id": "!NxLdNKzSnAOevffwBg:matrix.org"
}

Anything else that would be useful to know?

I also asked questions in "Synapse Admins."

clokep commented 1 year ago

I think this is essentially a duplicate of #8686.