On 05/15/2015 02:37 PM, Milan K??? wrote:
> Hello,
> I've found that SQLite is preparing new FTS5 extension, which could be 
> better than current FTS3/4.
> If it is still in development, I would like to propose one more 
> change. In our project we would need possibility to specify which columns
> should be matched by the match operator. We use 'standardized' DB in 
> which we cannot change tables and we have several queries
> which operates only on several columns (each query needs different set 
> of columns). To achieve the required functionality we have to use
> matchinfo() structure with custom function checking whether the 
> required columns matched.
>
> For example, lets assume the following table
>
> FtsTableA | A B C D E F G H
>
> It would be nice to allow specification of 'required' columns to 
> match. I think that the following 'extended' syntax could be quite 
> consistent:
>
> select docId from FtsTableA where FtsTableA(B,C,D) match 'a* b* c*'
>
> The other solution could be to ORify the match clause, but I think it 
> would quite ugly solution and I believe
> ... match '(B:a* OR C:a* OR D:a*)(B:b* OR C:b* OR D:b*)(B:c* OR C:c* 
> OR D:c*)'

Now: ... MATCH '{B C D}:a* AND {B C D}:b* AND {B C D}:c*'

https://sqlite.org/draft/fts5.html#section_2

So some progress.

Dan.

Reply via email to