Fossil Forum

fts5 search for term containing colon
Login

fts5 search for term containing colon

fts5 search for term containing colon

(1) By brickviking on 2023-05-28 02:38:47 [source]

Reason for question

I'm trying to collect a small list of various interwiki links for later, which generally look like src:/timeline?c=1347a1ddb9a565e9 which renders like 1347a1ddb9a5 and some that look like fossil:/doc/trunk/www/checkin_names.wiki (Check-in Names) .

Preparation

I maintain some local repositories which are user-made clones of the various repositories, such as fossil, fossil-forums, sqlite and sqlite-forums. I went into the settings and turned on search, putting * into the Document Glob List box, setting the respective items (Documents, Tickets, Forum etc) to search within, and clicked on the button at the bottom. Selecting "Porter Stemmer" doesn't seem to have made any difference to the results I got, just perhaps produced more of them.

What I tried to do

Recently, I tried searching for the term wasm:, with a colon embedded. On my fossil-forum clone, I got hits, though for the search term wasm instead. Over on the sqlite-forum website, I got this yellow page saying there was no such column as wasm:. I did look at the sqlite3 docs relating to fts3 and fts5 and now understand that the colon forms part of a column specifier, hence the error message below.

Result

Database error: no such column: wasm: {INSERT INTO x(label,url,score,id,date,snip) SELECT ftsdocs.label, ftsdocs.url, rank(matchinfo(ftsidx,'pcsx')), ftsdocs.type || ftsdocs.rid, datetime(ftsdocs.mtime), snippet(ftsidx,-1,'<mark>','</mark>',' ... ',35) FROM ftsidx CROSS JOIN ftsdocs WHERE ftsidx MATCH 'wasm:' AND ftsdocs.rowid=ftsidx.rowid AND (ftsdocs.type='f')}

So, what have I configured differently between the two sites?

What I finally did

In the end I had to search for that specific term by deconstructing the repo in question and running a grep over all the artifacts. Crude, but it worked.

Finally, the main question.

Is there a fossil-user-facing way to search for terms such as item: where the word item isn't already a column name?

Sorry about the verbosity, but I wasn't sure how to refine the problem further.

Regards, brickviking

(Post 22)