Searching in couchdb or do river thru an elastic search

余生颓废 提交于 2019-12-10 22:08:40

问题


I understand we create views on couchdb and then we can search. Another interesting approach is to connect couchdb with elasticsearch thru river and search in elasticsearch. I have two questions:

  • in terms of disk space usage, will elasticsearch be more efficient?
  • what would be the pros and cons of using couchdb search vs using elasticsearch on top of couchdb?

Thanks!


回答1:


In terms of disk usage:

  • https://github.com/logstash/logstash/wiki/Elasticsearch-Storage-Optimization
  • http://till.klampaeckel.de/blog/archives/95-Operating-CouchDB.html

As Marcin pointed out, Elasticsearch excels in full-text-search and its flexibility of analyzer and search functionality.




回答2:


Only thing CouchDB queries can give you is the key -> value mapping. You can search the ordered dictionary, but you cannot search in the multi-dimensional data, with regular expression or even the key that contain a keyword as a substring (e.g. you have data "Mr. John Smith", and you want it to be found by the query with the keyword "John"). ElasticSearch fills the gap and provides additional indexing of the data. It is mainly useful for full-text indexing, but also supports geospatial data.



来源:https://stackoverflow.com/questions/13025065/searching-in-couchdb-or-do-river-thru-an-elastic-search

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!