Is SQLite development now delving into 'new' ideas? Perhaps it will soon be
time to submit to one of the Academic journals, and thus give John.Newby
something to write about in his University dissertation.  

I do not know of another example of public domain R&D.

Just a stray thought...

Christian Werner

> Academic journals are generally only interested in new ideas.
> SQLite deliberately uses only ideas that are 20 years old or
> older in order to avoid patent problems. Hence....
> --
> D. Richard Hipp   

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, April 28, 2006 12:37 PM
To: [email protected]
Subject: Re: [sqlite] proposed full text search mechanism


Dennis Cote <[EMAIL PROTECTED]> wrote:
> 
> Richard has posted a proposal for a unique full text search capability 
> using an even more interesting virtual table mechanism on the wiki at 
> http://www.sqlite.org/cvstrac/wiki?p=FullTextIndex
> 
> I don't quite follow this section though.
> 
> > To search for documents, do a select with a WHERE clause constraint on 
> > the EX1.PATTERN column, like this:
> >
> >   SELECT docid FROM ex1
> >    WHERE pattern='"George Washington" slept here';
> >  
> 
> When I look at the proposed set of callback functions that are used to 
> implement the "indexer" (on the virtual tables page at 
> http://www.sqlite.org/cvstrac/wiki?p=VirtualTables), I can't see how it 
> will be passed the string to search for. Can anyone explain how this is 
> supposed to work?
> 

The virtual table will be claim to support an index on
the PATTERN column.  So when something of the form

    PATTERN = <constant expression>

appears in the WHERE clause, the query optimizer will
open an index cursor on the virtual table, rather than
a table cursor, and preposition the index cursor to the
entry where the PATTERN column was equal to the query
expression.  The virtual table implementation will
perform a full-text search in response to any such 
actions.  Subsequent calls to the xNext() method in
the vtab structure will return successive rows in the
result set of the full-text search.

Any other use of the PATTERN column will return NULL.
Attempts to modify the PATTERN column will throw a
constraint error.  This makes the PATTERN column rather
"special" which has raised a few eyebrows.  I am open
to alternative proposals, but this is the best interface
I have seen so far.

--
D. Richard Hipp   <[EMAIL PROTECTED]>

Reply via email to