错误:索引'产品':太多字符串属性(当前索引格式允许最多4 GB)

时间:2015-05-18 16:53:10

标签: database indexing full-text-search search-engine sphinx

尝试使用25GB数据索引数据库中的表时得到此信息。 Sphinx包含索引声明,其中包含以下字段:

sql_field_string    = field_indexer #some keywords
sql_field_string    = product_name
sql_field_string    = description
sql_attr_float      = price
sql_field_string    = product_url
sql_field_string    = image_url
sql_field_string    = sku
sql_attr_uint       = merchant_id
sql_attr_uint       = network_id     

所有这些都必须编入索引。
怎么解决这个问题?

多个索引或分布式索引是非常痛苦的解决方案。

1 个答案:

答案 0 :(得分:1)

目前暂无问题解决方案。

有几种解决方法:

  • 使用分布式索引
  • 使你的attrs全文字段(但它使他们"不可选择")
  • 在sphinx中搜索并向数据库查询此attrs(2个具有所有缺点的查询)

您可以选择较少痛苦的解决方法或切换到其他搜索引擎......