Fossil

Check-in [29f1fbf3ae]
Login

Check-in [29f1fbf3ae]

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

Overview
Comment:plain-text search the configured doc branch Previously, it would always search trunk, but build links using the doc branch
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | patmaddox/search-branches
Files: files | file ages | folders
SHA3-256: 29f1fbf3ae85bad03a79f4e500a06d287618be54d736e03e8778ed1f3dd2f20e
User & Date: patmaddox 2024-08-30 04:26:49
Context
2024-08-30
05:03
plain-text search multiple branches ... (check-in: 46da6619d1 user: patmaddox tags: patmaddox/search-branches)
04:26
plain-text search the configured doc branch Previously, it would always search trunk, but build links using the doc branch ... (check-in: 29f1fbf3ae user: patmaddox tags: patmaddox/search-branches)
2024-08-27
19:38
Fix one mis-changed line in [898a70ce82a5] which would have broken builds on OS/2. ... (check-in: 94c8af02ea user: stephan tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/search.c.

802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
      db_multi_exec(
        "INSERT INTO x(label,url,score,id,date,snip)"
        "  SELECT printf('Document: %%s',title('d',blob.rid,foci.filename)),"
        "         printf('/doc/%T/%%s',foci.filename),"
        "         search_score(),"
        "         'd'||blob.rid,"
        "         (SELECT datetime(event.mtime) FROM event"
        "            WHERE objid=symbolic_name_to_rid('trunk')),"
        "         search_snippet()"
        "    FROM foci CROSS JOIN blob"
        "   WHERE checkinID=symbolic_name_to_rid('trunk')"
        "     AND blob.uuid=foci.uuid"
        "     AND search_match(title('d',blob.rid,foci.filename),"
        "                      body('d',blob.rid,foci.filename))"
        "     AND %z",
        zDocBr, glob_expr("foci.filename", zDocGlob)
      );
    }
  }
  if( (srchFlags & SRCH_WIKI)!=0 ){
    db_multi_exec(
      "WITH wiki(name,rid,mtime) AS ("
      "  SELECT substr(tagname,6), tagxref.rid, max(tagxref.mtime)"







|


|




|







802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
      db_multi_exec(
        "INSERT INTO x(label,url,score,id,date,snip)"
        "  SELECT printf('Document: %%s',title('d',blob.rid,foci.filename)),"
        "         printf('/doc/%T/%%s',foci.filename),"
        "         search_score(),"
        "         'd'||blob.rid,"
        "         (SELECT datetime(event.mtime) FROM event"
        "            WHERE objid=symbolic_name_to_rid('%T')),"
        "         search_snippet()"
        "    FROM foci CROSS JOIN blob"
        "   WHERE checkinID=symbolic_name_to_rid('%T')"
        "     AND blob.uuid=foci.uuid"
        "     AND search_match(title('d',blob.rid,foci.filename),"
        "                      body('d',blob.rid,foci.filename))"
        "     AND %z",
        zDocBr, zDocBr, zDocBr, glob_expr("foci.filename", zDocGlob)
      );
    }
  }
  if( (srchFlags & SRCH_WIKI)!=0 ){
    db_multi_exec(
      "WITH wiki(name,rid,mtime) AS ("
      "  SELECT substr(tagname,6), tagxref.rid, max(tagxref.mtime)"