Question

I am new to sphinx search. I am having a table field with rich text content where i have to do text search. my conf file contains

index test1
{
    source          = src1
    path            = c:/sphinx/data/test1
    docinfo         = extern
    charset_type            = utf-8     
}   

Am using MySQL and the database field type in utf8_unicode_ci.

Using the sphinx dotnet client downloaded from link.

Now the issue is,

when i try to retrive the content from command prompt using search command it is showing the rich text content.

when i try to do it from my application it pick rest to the attributes other than rich text column and it is not giving any error too. my code in .net client is

   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();
                        }                           
                    }

thanks in advance

regards

Suressh

Was it helpful?

Solution

Finally i found where the issue is.

I didn't to add the rtf column for indexing.

once i added the rtf content field in sql_field_string and re indexed, it started working.

Regards

Suressh

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top