I'm storing 12 digit serial numbers in a textual CCK field. They are all indexed as "2147483647" in the search_index table.

This results in searches for a distinct serial number returning results for all content with serial numbers longer than 10 digits.

Commenting out line 534 in search.module cures the issue:

$word = (int)ltrim($word, '-0');

Presumably the serial numbers overflow as they are cast to integer.

Comments

damien tournoud’s picture

Status: Active » Closed (duplicate)

This is a duplicate of #323299: Integers above 10 digits length scrambled.

May I remind that one should always search before posting an issue?

mchaplin’s picture

Hi Damien

Yes this could be the same issue as

http://drupal.org/node/323299

but its to say for sure as its not clear whether that issue refers to the incorrect storage of integers in the search index, or the formation of a correct SQL statement to perform the search.

best regards

Mike