SphinxQL Datos demasiado largos para la columna

I'm inserting data into a Sphinx RT index using SphinxQL, which is working fine. Just occasionally I get really large values in my dataset and I get the following error:

com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'title' at row 1
 at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3564)

Is there a way to extend the length of the field? or another column type I could use? Failing that, what is the length of the field, so I can truncate my data?

this is what my index looks like:

index example
      type              = rt
      path              = /var/sphinxsearch/example
      rt_field          = title
      rt_attr_timestamp = timestamp

preguntado el 31 de julio de 12 a las 13:07

Sphinx is 2.0.5. I'm not using MySQL; SphinxQL is a a MySQL-binary-compatible server. The setting in sphinx.conf is "mysql41". It could be a Unicode thing - I still don't know how to determine the column size but I will attempt "INSERT IGNORE" (from the last answer to your linked question). You should put your comment as an answer. -

1 Respuestas

I put my above comment into an Answer:

What version of MySQL are you using? What version of Sphinx? Maybe you're facing a Unicode encoding issue similiar to esta?

Maybe you could catch the Exception, log the offending SQL query. Perhaps the problem becomes apparent once you see the query.

contestado el 23 de mayo de 17 a las 12:05

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.