Documentation Source Text

Check-in [39f3bd86d6]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Updates to search script.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 39f3bd86d62a6d4d726f91977335073b033085a3
User & Date: dan 2010-01-06 17:38:49
Context
2010-01-06
20:57
Fix a typo on the books.html page. check-in: 82cfff06e6 user: drh tags: trunk
17:38
Updates to search script. check-in: 39f3bd86d6 user: dan tags: trunk
17:01
Add the new Symbian book to the books.html page. check-in: efbd2b8858 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to search/Makefile.

1
2
3
4
5
6









7
8
9
10

CFLAGS = -g -DSQLITE_MEMDEBUG -DSQLITE_DEBUG
CFLAGS = -g -O2 -DNDEBUG
#CFLAGS = -Os -DNDEBUG

tclsqlite3.fts3: searchc.c /home/dan/work/sqliteG/bld/tclsqlite3.c
	gcc $(CFLAGS) -DSQLITE_ENABLE_FTS3 -I/home/dan/work/sqliteG/sqlite/ext/fts3/ -static searchc.c /home/dan/work/sqliteG/bld/tclsqlite3.c -L/home/dan/tcl86/lib -ltcl8.6 -ldl -lm -o tclsqlite3.fts3 -lz -lpthread










clean:
	rm tclsqlite3.fts3


|
|
|

|
<
>
>
>
>
>
>
>
>
>




>
1
2
3
4
5

6
7
8
9
10
11
12
13
14
15
16
17
18
19
#CFLAGS = -g -DSQLITE_MEMDEBUG -DSQLITE_DEBUG
#CFLAGS = -g -O2 -DNDEBUG
CFLAGS = -Os -DNDEBUG

TCLSQLITE3C = /home/dan/work/sqliteG/bld/tclsqlite3.c


LIBSQLITE3A = /home/dan/work/sqliteG/bld/libsqlite3.a
TCLSQLITEC = /home/dan/work/sqliteG/sqlite/src/tclsqlite.c

#SQLITELIB = $(TCLSQLITEC) $(LIBSQLITE3A)
SQLITELIB = $(TCLSQLITE3C)

tclsqlite3.fts3: searchc.c $(TCLSQLITEC) $(LIBSQLITE3A)
	gcc $(CFLAGS) -DSQLITE_ENABLE_FTS3 searchc.c $(SQLITELIB) -I/home/dan/work/sqliteG/sqlite/ext/fts3/ -static -L/home/dan/tcl86/lib -ltcl8.6 -ldl -lm -o tclsqlite3.fts3 -lz -lpthread

clean:
	rm tclsqlite3.fts3

	#gcc $(CFLAGS) -DSQLITE_ENABLE_FTS3 -I/home/dan/work/sqliteG/sqlite/ext/fts3/ -static searchc.c /home/dan/work/sqliteG/bld/tclsqlite3.c -L/home/dan/tcl86/lib -ltcl8.6 -ldl -lm -o tclsqlite3.fts3 -lz -lpthread

Changes to search/search.tcl.

198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
...
567
568
569
570
571
572
573

574
575
576
577
578
579
580
581
       [expr $iStart+1]..[expr {($nRes < $iStart+10) ? $nRes : $iStart+10}] 
       of $nRes for: <b>[htmlize $::A(q)]</b>
  }]
  db eval {
    SELECT 
      result.rowid+$iStart AS resnum,
      COALESCE(title, 'No Title.') AS title,
      snippet2(page, $open, $close, $ellipsis, 0, 10) AS keywords,
      snippet2(page, $open, $close, $ellipsis, 2, 40) AS snippet,
      url,
      erank(matchinfo(page), nk, nt, nc) AS report
    FROM page, (
        SELECT 
          page.docid AS docid, url, nk, nt, nc
        FROM page, pagedata 
          WHERE page MATCH $::A(q) AND page.docid = pagedata.docid
................................................................................
}

if {![info exists env(REQUEST_METHOD)]} {
  set env(REQUEST_METHOD) GET
  set env(QUERY_STRING) rebuild=1
  set ::HEADER ""


  set env(QUERY_STRING) {q=the}
  set ::HEADER ""
}


set TITLE "Search SQLite Documentation"

if {0==[catch main res]} {







|
|







 







>
|







198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
...
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
       [expr $iStart+1]..[expr {($nRes < $iStart+10) ? $nRes : $iStart+10}] 
       of $nRes for: <b>[htmlize $::A(q)]</b>
  }]
  db eval {
    SELECT 
      result.rowid+$iStart AS resnum,
      COALESCE(title, 'No Title.') AS title,
      snippet(page, $open, $close, $ellipsis, 0, 10) AS keywords,
      snippet(page, $open, $close, $ellipsis, 2, 40) AS snippet,
      url,
      erank(matchinfo(page), nk, nt, nc) AS report
    FROM page, (
        SELECT 
          page.docid AS docid, url, nk, nt, nc
        FROM page, pagedata 
          WHERE page MATCH $::A(q) AND page.docid = pagedata.docid
................................................................................
}

if {![info exists env(REQUEST_METHOD)]} {
  set env(REQUEST_METHOD) GET
  set env(QUERY_STRING) rebuild=1
  set ::HEADER ""

  #set env(QUERY_STRING) {q="one+two+three+four"+eleven}
  set env(QUERY_STRING) {q=windows}
  set ::HEADER ""
}


set TITLE "Search SQLite Documentation"

if {0==[catch main res]} {