Full text search follow up#375
Conversation
|
@rwasef1830 thanks, I'll review and merge ASAP. Regarding the array literal caveat, is it possible for you to check for non-constant values and to throw an informative message? This way users will at least know exactly what's going? |
|
@roji The exception thrown is NotSupportedException. The stack trace of one of them (in case of ArrayToTsVector) is: It is coming outside of Npgsql code. EF Core decides to client evaluate ArrayToTsVector and then calls it directly which throws NotSupportedException. In order to fix this, would need to go through Linq expression visitors and handle the case only to throw an exception. Last time I tried to do this I found my handle new array init expression visitor getting called for internal EF structures in other unrelated unit tests and I wasn't able to find a way to distinguish between array init expressions that EF Core expects to not get handled and array init expressions that do. It was messy and fragile so I went back on that idea. |
|
@rwasef1830 ok, that does sound like too much trouble. I'll review a bit later and merge. I don't recall anymore if there's an issue open on the EF Core repo for these array issues, so that they're at least tracked? |
* tsvector concat operator support. * ts_delete function support. * ts_filter function support. * array_to_tsvector function support (table columns in array are not supported).
@roji This is a follow up to #315 that implements a few missing methods and operators for full text search and resolves issue #373:
There is a caveat however, due to limitations in EF Core, all functions that take array parameters can only accept constant values (ie: the array must be computable outside the query). Attempts to use an array with elements that come from range variables from tables will result in NotSupportedException being thrown from deep within EF Core itself.