How should I implement search for a CRUD app?

blov · · 256 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>Hello gophers!</p> <p>I&#39;m building a simple web app to improve my Go skills. I&#39;m using gorm with postgres and gin which has made things very easy for all the basic CRUD stuff, but I&#39;m at a point where I want to add some search functionality.</p> <p>I haven&#39;t found many guides on this topic and I&#39;m not sure where to go next. If anyone has some basic advice, links to useful guides, or has some code they could share that would be awesome!</p> <hr/>**评论:**<br/><br/>theromeo3517: <pre><p>Postgres had decent full text search, I I would start there</p></pre>very-little-gravitas: <pre><p>Seconded. Use Postgres FTS, or even just ILIKE if your needs are simple (matching terms in blog post title and keywords fields or something like that).</p></pre>recurrency: <pre><p>Agree w prev poster on using postgres, for the record if you want an all go embedded solution you could try <code>bleve</code>: <a href="" rel="nofollow"></a></p></pre>burnaftertweeting: <pre><p>How fast does it need to be and how approx. how many records do you expect to search through?</p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

256 次点击  
加入收藏 微博
0 回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传