Coreseek®  
 | 首页 | 注册 | 回复 | 搜索 | 统计资料 |                 网站首页产品服务开放源码安装使用常见问题中文手册社区交流联系我们 
全文检索 论坛首页 / 全文检索 /

在sql_attr_string真是release之前,大家都怎么实现这个功能?

 
__Untitled
会员
#1 | 发表时间: 2009 12 22 21:51
回复 
比如过滤国家/省份/城市这样的数据?

谢谢。
HonestQiao
会员
#2 | 发表时间: 2009 12 23 01:07
回复 
生成对应的id

但是sql_attr_string仅用于存储,不提供任何其他功能。
__Untitled
会员
#3 | 发表时间: 2009 12 23 16:15
回复 
如果仅是存储而不参与过滤,意义是什麽呢?
__Untitled
会员
#4 | 发表时间: 2009 12 23 23:57
回复 
在sphinx上看到的

sql_field_string = both full text indexed and an index attribute
sql_attr_string = index attribute only

so sql_field_string will be returned as an attribute as well as the field's contents
indexed for searching. This means you won't need to select the field twice if you need it
as an attribute and to perform a full text search on it.
HonestQiao
会员
#5 | 发表时间: 2009 12 24 19:45
回复 
sql_field_string这个是支持全文检索和返回存储信息的。

要实现国家/省份/城市,使用确定的int过滤最好。
wjackie
会员
#6 | 发表时间: 2010 05 13 16:49
回复 
sql_field_string用于设置过滤条件怎么使用?
接口文件规定过滤值都必须是整型的,字符串的无法使用。
linzhoulxyz
会员
#7 | 发表时间: 2010 05 14 09:26
回复 
CRC32
bernana
会员
#8 | 发表时间: 2011 01 10 10:09
回复 
HonestQiao:
sql_field_string这个是支持全文检索和返回存储信息的。

要实现国家/省份/城市,使用确定的int过滤最好。

这个在1.11版本里已经支持了么?我测试了下sql_field_string = TITLE
但是返回的还是0 ??这个怎么使用呀?
bernana
会员
#9 | 发表时间: 2011 01 10 10:22
回复 
还是说现在获得搜索内容还是得根据索引ID去mysql数据库里查?
HonestQiao
会员
#10 | 发表时间: 2011 01 10 11:31
回复 
csft 4.0测试版提供存储字符串的功能。
但是有诸多限制,请仔细查看:www.coreseek.cn/docs/sphinx-1.11-beta.html#rt-indexes
bernana
会员
#11 | 发表时间: 2011 01 10 14:05
回复 
我测试了下
index rt
{
    type = rt
    path = /usr/local/sphinx/data/rt
    rt_field = title
}

但是报错:
skipping non-plain index 'rt'...

我想问下我这个里面缺少什么么?比如:source?

我想要的功能是
$cl = new SphinxClient ();
$cl->SetServer('localhost',3312);
$cl->SetMatchMode(SPH_MATCH_ANY);
$cl->SetSortMode (SPH_SORT_RELEVANCE);
$results = $cl->Query( $_GET['key'], 'main' );

能从$resutl里获得标题的全部字段。我尝试了下
sql_field_string = TITLE
好像并不能返回字符串信息。现在的4.0能实现这个功能么?
如果能能提供一个例程给我么?或者关于该功能实现需要的代码。不胜感谢。
HonestQiao
会员
#12 | 发表时间: 2011 01 10 20:59
回复 
rt初学者,请严格按照 www.coreseek.cn/docs/sphinx-1.11-beta.html#rt-indexes 的说明和步骤操作,不要自创而无法解决。

按照步骤,一切正常。
同时仔细研读  www.coreseek.cn/docs/sphinx-1.11-beta.html#rt-caveats 了解限制
lqfmaxwell
会员
#13 | 发表时间: 2011 11 25 10:21
回复 
这个有人解决了吗?我也遇到这个问题了
lqfmaxwell
会员
#14 | 发表时间: 2011 11 25 10:27
回复 
为什么我的sql_attr_string属性,输出的值都是0
sql_attr_string = name
["name"]=> string(1) "0"

环境:Sphinx 2.0.1-beta
HonestQiao
会员
#15 | 发表时间: 2011 11 29 17:49
回复 
请使用test_rtindex.cmd测试,并按照其中的提示信息操作处理
 
回复
Bold Style  Italic Style  Image 链接  URL 链接 
发帖注意:
  • 网址中请去掉http://开头,例如:您需要输入www.coreseek.cn,而不是http://www.coreseek.cn
  • 咨询问题,请贴出详细的操作系统版本、Coreseek版本(Linux环境请给出编译参数)
  • 请仔细查看中文手册和本站安装指南,确认操作正确
  • 请仔细查看常见问题解答,也许你的问题已经有解决方法

» 帐号  » 密码 
发帖前请登陆, 或者 注册 .