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*)'
Moreover, when a user would need to parse matchinfo e.g. to detect which
'token' matched in which column, the
matchinfo would be unnecessarily large and more difficult to parse.
And I also believe that with the syntax I used above it could be even easier to
implement in SQLite in a way
that is faster than parsing the long match clause with ORs.
What do you think?
Milan
<javascript:r(9)>