[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sqlite-users
Subject:    Re: [sqlite] How to know what terms were created using FTS
From:       Scott Hess <shess () google ! com>
Date:       2012-08-27 22:54:56
Message-ID: CAA0c_LOZKwPO2HqdOJ4ddd66n36YsiXZdno4Rusuqkk5t8VxXw () mail ! gmail ! com
[Download RAW message or body]

On Sat, Aug 18, 2012 at 10:00 AM, Mohit Sindhwani <ml3p@onghu.com> wrote:
> On 17/8/2012 7:14 PM, Dominique Pell=E9 wrote:
>> This gives the tokens:
>>
>> sqlite> CREATE VIRTUAL TABLE ft USING fts4(x);
>> sqlite> INSERT INTO ft VALUES("hello world");
>> sqlite> INSERT INTO ft VALUES("hello there");
>>
>> sqlite> CREATE VIRTUAL TABLE ft_terms USING fts4aux(ft);
>>
>> sqlite> .header on
>> sqlite> SELECT * FROM ft_terms;
>> term|col|documents|occurrences
>> hello|*|2|2
>> hello|0|2|2
>> there|*|1|1
>> there|0|1|1
>> world|*|1|1
>> world|0|1|1
>
> Actually, I want to know:
> * terms for "hello world" are "hello" and "world"
> * terms for "hello there" are "hello" and "there"
> ...and so on.
>
> The aux table doesn't give an easy way to find that, as far as I can see.

Depending on how often you need to do this, perhaps you could just
create a table in the TEMP database or a memory database, and insert
only a single document.

-scott
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic