Files
mostlymatter/server
Agniva De Sarker 8eadf849bb MM-60790: Prevent stemming in DB search when search term is a fully quoted string (#30214)
When a search term is a fully quoted string, we want to avoid
stemming if it is supported by the search backend.

For Postgres, it does provide a feature by which if we use the
"simple" search config, then no stemming is performed and an exact
match with the word is done without having to resort
to LIKE queries.

Unfortunately, for ES/OS this is not an option because
the message field is a text field, which means ES/OS will analyze it,
stem it and store it in its root form. Therefore, no exact match
can be possible with ES/OS.

The only solution here is to have yet another keyword field
for message which will store it in its raw form. But this
will effectively double the disk storage for post indices
and not a good design choice.

Ref: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-term-query.html#avoid-term-query-text-fields

https://mattermost.atlassian.net/browse/MM-60790

```release-note
NONE
```

* re-arrange the tests to run only on DB

```release-note
NONE
```

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-03-19 12:10:29 +05:30
..
2023-03-22 17:22:27 -04:00
2025-03-17 14:22:07 +01:00
2025-03-17 14:22:07 +01:00
2025-03-17 14:22:07 +01:00
2025-03-13 12:00:15 -04:00
2023-03-22 17:22:27 -04:00
2025-03-17 14:22:07 +01:00
2025-03-17 14:22:07 +01:00
2025-01-30 15:18:09 +01:00
2023-03-22 17:22:27 -04:00
2025-03-17 14:22:07 +01:00
2023-03-22 17:22:27 -04:00
2023-03-22 17:22:27 -04:00
2025-03-17 14:22:07 +01:00
2025-02-06 21:48:08 +05:30
2025-03-17 14:22:07 +01:00
2024-05-15 12:05:13 -03:00