Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.net 从sphinx检索富文本内容_.net_Sphinx - Fatal编程技术网

.net 从sphinx检索富文本内容

.net 从sphinx检索富文本内容,.net,sphinx,.net,Sphinx,我是斯芬克斯搜索的新手。 我有一个富文本内容的表字段,在那里我必须进行文本搜索。 我的conf文件包含 index test1 { source = src1 path = c:/sphinx/data/test1 docinfo = extern charset_type = utf-8 } 我在utf8\u unicode\u ci中使用MySQL和数据库字段类型

我是斯芬克斯搜索的新手。 我有一个富文本内容的表字段,在那里我必须进行文本搜索。 我的conf文件包含

index test1
{
    source          = src1
    path            = c:/sphinx/data/test1
    docinfo         = extern
    charset_type            = utf-8     
}   
我在utf8\u unicode\u ci中使用MySQL和数据库字段类型

使用从下载的sphinx dotnet客户端

现在的问题是,

当我尝试使用search命令从命令提示符中检索内容时,它会显示富文本内容

当我尝试从我的应用程序中执行此操作时,它会将rest选择到除富文本列以外的属性,并且不会给出任何错误。我在.net客户端中的代码是

   foreach (Sphinx.Client.Commands.Search.SearchQueryResult result in searchCommand.Result.QueryResults)
                    {
                        foreach (Sphinx.Client.Commands.Search.Match match in result.Matches)
                        {
                            Console.WriteLine("Document ID: {0}", match.DocumentId);
                            Console.WriteLine("Weight: {0}", match.Weight);                               

                            foreach (var attr in match.AttributesValues)
                            {
                                Console.WriteLine("Attribute '{0}', type: '{1}', value: '{2}'", attr.Name, Enum.GetName(typeof(Sphinx.Client.Commands.Search.AttributeFilterType), attr.AttributeType), attr.GetValue());
                                string str1 = attr.Name + " --" + attr.GetValue().ToString();
      Environment.NewLine);
                            }
                            Console.WriteLine();
                        }                           
                    }
提前谢谢

问候


当然,我终于找到了问题所在

我不想为索引添加rtf列

一旦我在sql_field_string中添加了rtf内容字段并重新编制了索引, 它开始工作了

问候

苏莱松