Documentation Source Text

Check-in [d53c90f145]
Login

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

Overview
Comment:Adjust the search script to change an empty title into "No Title".
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d53c90f145b407ab31b98fdd786fb08745b361a6
User & Date: drh 2012-05-31 08:00:14.661
Context
2012-05-31
08:10
Add the COMBINED_LOG_FORMAT compile-time option to althttpd.c. Also catch errors opening a /tmp file and report them. (check-in: f5c16dc36c user: drh tags: trunk)
08:00
Adjust the search script to change an empty title into "No Title". (check-in: d53c90f145 user: drh tags: trunk)
2012-05-30
14:25
Fix the "search" box so that it accepts upper and lower case search terms (with case folding) and OR and NEAR search and phrase searches. Exclude some of the aggregate documents from indexing. (check-in: 26dedb8a9a user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to search/search.tcl.
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
    <p>Search results 
       [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, 2, 40) AS snippet,
      url,
      CASE WHEN $score THEN erank(matchinfo(page), nk, nt, nc)
           ELSE '' END AS report
    FROM page, (
        SELECT 
          page.docid AS docid, url, nk, nt, nc







|







242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
    <p>Search results 
       [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(NULLIF(title,''), 'No Title.') AS title,
      snippet(page, $open, $close, $ellipsis, 2, 40) AS snippet,
      url,
      CASE WHEN $score THEN erank(matchinfo(page), nk, nt, nc)
           ELSE '' END AS report
    FROM page, (
        SELECT 
          page.docid AS docid, url, nk, nt, nc