Documents with the different attributes sets in Sphinx and Solr

给你一囗甜甜゛ 提交于 2019-12-25 04:58:13

问题


Is this is are possible to have indexed documents with the different set of the attributes.

For example:
There is some amount of the documents with the attr1,attr2, attr3 and soe amount of the documents with the attr4, attr5, attr6 ?
Can all of this documents be included in the one index without predefining all possible attributes from both types ?


回答1:


yes, you can use dynamic fields is Solr for this purpose.




回答2:


With Sphinx you may use json fields (sql_attr_json) where you will save your key:values. We have same situation, it depends on customer, which data he will save to Sphinx/Solr.

Unfortunately in current version of sphinx (tested 2.2.3 beta) json may not contain more than 4gb of data : http://sphinxsearch.com/forum/view.html?id=12550 - so it depends on amount of your data. We had 15 key:value pairs in json and only 6M of records fitted to 4GB.




回答3:


With Sphinx, I believe you have to set all your attributes ahead of time in your sphinx.conf file. There is no equivalent to Solr's dynamic fields.



来源:https://stackoverflow.com/questions/11248031/documents-with-the-different-attributes-sets-in-sphinx-and-solr

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