Re: Error "unable to use function MATCH in the requested context"

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error "unable to use function MATCH in the requested context"

Jens Alfke-2

> On Jul 11, 2017, at 10:35 AM, Richard Hipp <[hidden email]> wrote:
>
> Generally speaking, FTS4 (and FTS3 and FTS5) requires no more than one
> MATCH operator  in the WHERE clause for each FTS4 table in the FROM
> clause, and that one MATCH operator must be a conjunct.

Sorry, another question: Is it possible to work around this by putting each MATCH operation in a nested SELECT statement, and then combining the results of those statements?

(I’d try this out myself in the CLI, but it gives ‘unknown tokenizer’ errors because we use a custom tokenizer for our FTS tables.)

—Jens
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error "unable to use function MATCH in the requested context"

Richard Hipp-3
On 7/11/17, Jens Alfke <[hidden email]> wrote:

>
>> On Jul 11, 2017, at 10:35 AM, Richard Hipp <[hidden email]> wrote:
>>
>> Generally speaking, FTS4 (and FTS3 and FTS5) requires no more than one
>> MATCH operator  in the WHERE clause for each FTS4 table in the FROM
>> clause, and that one MATCH operator must be a conjunct.
>
> Sorry, another question: Is it possible to work around this by putting each
> MATCH operation in a nested SELECT statement, and then combining the results
> of those statements?

I think so, yes, depending on the details of your SELECT statement, of course.

>
> (I’d try this out myself in the CLI, but it gives ‘unknown tokenizer’ errors
> because we use a custom tokenizer for our FTS tables.)
>

Surely you should prioritize creating a loadable extension containing
your custom tokenizer, for occasions such as this, no?

--
D. Richard Hipp
[hidden email]
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error "unable to use function MATCH in the requested context"

Jens Alfke-2

> On Jul 11, 2017, at 12:02 PM, Richard Hipp <[hidden email]> wrote:
>
> Surely you should prioritize creating a loadable extension containing
> your custom tokenizer, for occasions such as this, no?

It’s one of those nice-to-have things that I never get around to, because any time the need for it arises, it’s because I’ve got a higher priority issue and don’t want to push it on the stack for a few hours while I figure out how to build a SQLite extension. (I think the technical term for this is “yak shaving”.)

A co-worker did actually build such an extension for the previous generation of our product. I should dig up the source code and update it for our current schema.

—Jens
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Loading...