2013-04-01 33 views
0

我已经配置了狮身人面像中的所有内容,并且还旋转了索引。但是,当我搜索狮身人面像服务器(终端命令),它只显示匹配计数如下,我不知道在这个问题上。狮身人面像搜索结果不显示值

[[email protected] server]# sudo search -i gplay 'Cut the Rope' 
Sphinx 2.0.4-id64-release (r3135) 
Copyright (c) 2001-2012, Andrew Aksyonoff 
Copyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com) 

using config file '/etc/sphinx/sphinx.conf'... 
index 'gplay': query 'Cut the Rope ': returned 2 matches of 2 total in 0.000 sec 

displaying matches: 
1. document=6, weight=10515 
2. document=3, weight=9482 

words: 
1. 'cut': 5 documents, 15 hits 
2. 'the': 72 documents, 2162 hits 
3. 'rope': 4 documents, 12 hits 

在上面的结果中,它不显示文档值。请在这个问题上提出建议。

注:我已经运行在CentOS的狮身人面像与鲈版本狮身人面像

+0

这只是斯芬克斯的工作方式。它不存储原始数据。它只是索引它的搜索。如果您需要原始数据,则必须打开数据库或切换到类似elasticsearch(或任何基于Lucene的平台) –

回答

0

像科林提到,狮身人面像的不存储已编制索引的原始文本 - 被称为领域。由于未存储无法退回。

但是,如果你想可以存储他们的属性,以避免不得不回到数据库。

属性可以返回结果集

+0

是的。正确。我在sphinx.conf中添加了[sql_attr_uint = idappsdata sql_attr_string = app_title sql_attr_string = app_id sql_attr_float = app_ratings],重新启动,重新索引了sphinx服务器。现在,我在结果集中获得了上述字段值app_title,app_id和app_ratings。 – Raja