a love letter to tangled (android, iOS, and a search API)
at main 28 lines 1.2 kB view raw
1{{define "title"}}Search &mdash; Twister API{{end}} 2{{define "content"}} 3<h1>Search</h1> 4<p>Search endpoints run PostgreSQL full-text queries over indexed Tangled 5documents. Results include highlighted snippets and weighted relevance scores. 6If Constellation is configured, repository results are enriched with star counts.</p> 7{{range .}}{{template "doc-entry" .}}{{end}} 8<h2>Query syntax</h2> 9<p>The keyword search uses PostgreSQL web-style query parsing:</p> 10<table> 11 <thead><tr><th>Feature</th><th>Example</th></tr></thead> 12 <tbody> 13 <tr><td>Simple terms</td><td><code>go search</code></td></tr> 14 <tr><td>Exclude term</td><td><code>rust -unsafe</code></td></tr> 15 <tr><td>Phrase</td><td><code>"pull request"</code></td></tr> 16 <tr><td>Natural-language</td><td><code>repo issue parser</code></td></tr> 17 </tbody> 18</table> 19<h2>Errors</h2> 20<table> 21 <thead><tr><th>Status</th><th>Condition</th></tr></thead> 22 <tbody> 23 <tr><td>400</td><td>Missing <code>q</code>, invalid <code>limit</code>/<code>offset</code>, or unknown parameter.</td></tr> 24 <tr><td>500</td><td>Internal search failure.</td></tr> 25 </tbody> 26</table> 27{{end}} 28{{template "layout" .}}