问题
I'm inserting the content of my documents in an rt_attr_string
field. I have declared the max_packet_size
as 128M
.
However, my input string of 5075850
characters is truncated to a string of 881546
characters. How is this possible and how can I overcome this unexpected behavior? I have already checked the inserted strings. They contain valid characters between a-Z, 0-9
and _ ;
or ?
Therefore, why is Sphinx behaving like this? The queried value is directly queried after the insert statement has executed. Therefore, it seems that Sphinx has some issues?
I have logged the query and the queried values, which can be seen in this file
Please note, I insert encrypted values since this is a requirement in my project. My software is perfectly capable of keeping all Sphinx functionalities, but this seems to be a Sphinx related issue since the inserted value differs from the returned value by Sphinx?
The configuration of my index is:
index Test
{
type = rt
path = /mnt/data001/Test
rt_field = Name
rt_field = Extension
rt_field = Content
rt_field = Tags
rt_attr_uint = Reference
rt_attr_uint = FileSize
rt_attr_uint = LastModified
rt_attr_uint = LastModifiedYear
rt_attr_uint = LastModifiedMonth
rt_attr_uint = LastModifiedDay
rt_attr_string = Content
rt_mem_limit = 1024M
charset_table = A..Z, a..z, 0..9, _, ;, %
ondisk_attrs = pool
}
searchd
{
listen = 9306:mysql41
log = /var/log/sphinxsearch/searchd.log
read_timeout = 5
max_children = 30
pid_file = /var/run/searchd.pid
max_packet_size = 128M
binlog_path = /mnt/data001
}
来源:https://stackoverflow.com/questions/53328679/c-sphinx-rt-attr-string-truncates-data