Skip to content

Refactor message body full-text search configuration and tests - #5708

Open
johnsimons wants to merge 2 commits into
masterfrom
john_MessagesView
Open

Refactor message body full-text search configuration and tests#5708
johnsimons wants to merge 2 commits into
masterfrom
john_MessagesView

Conversation

@johnsimons

Copy link
Copy Markdown
Member

The EnableFullTextSearchOnBodies setting is only honored by the RavenDB persister, which uses it to control whether message bodies are indexed for full-text search. EF Core persisters, by design, always index message bodies.

This change removes the redundant EnableFullTextSearchOnBodies setting from the EF Core persistence configuration. Corresponding acceptance tests are updated: a new test is added specifically for RavenDB to verify that the setting correctly disables body search, while the previously shared test for disabled body search is removed as it's not applicable to EF Core.

The `EnableFullTextSearchOnBodies` setting is only honored by the RavenDB persister, which uses it to control whether message bodies are indexed for full-text search. EF Core persisters, by design, always index message bodies.

This change removes the redundant `EnableFullTextSearchOnBodies` setting from the EF Core persistence configuration. Corresponding acceptance tests are updated: a new test is added specifically for RavenDB to verify that the setting correctly disables body search, while the previously shared test for disabled body search is removed as it's not applicable to EF Core.
Search introduces IFullTextSearchDialect beside IIngestionSqlDialect. The full text indexes already existed but nothing queried them. SQL Server ORs two FREETEXT predicates, PostgreSQL matches the indexed tsvector against websearch_to_tsquery with the terms rejoined by OR, so both keep the OR semantics RavenDB's Search defaults to.

PostgreSQL only uses an expression index when the query expression parses to the same tree, and a mismatch is silent: search keeps working, on a sequential scan. The indexed expression is now a constant written the way EF renders it, and FullTextSearchIndexTests fails if the two drift apart.

SQL Server setup now fails with a named error when the Full-Text Search feature is missing, rather than migrating into an instance whose search
endpoint throws.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants