If you do a search for an integer value longer than 10 digits, it uses "2147483647" in the SQL statement in doSearch().

If you comment out line 848 of function _search_parse_query

$s = $num ? ((int)ltrim($s, '-0')) : $s;

the problem is cured. Presumably the textual search term overflows as is cast to integer.

Comments

damien tournoud’s picture

Status: Active » Closed (duplicate)

And this is a duplicate of your first report #385812: Integers over 10 digits incorrectly indexed for search.

mchaplin’s picture

Status: Active » Closed (duplicate)

Hi Damien

This is not a duplicate of my first report.

1st issue is to do with the incorrect storage of integer values in the search index.

2nd issue is to do with the formation of the correct SQL statement to search that index.

The problems arise from 2 different lines of code in search.module.

It would be possible that one problem would be fixed and not the other.

thanks

Mike

mchaplin’s picture

Status: Closed (duplicate) » Active
damien tournoud’s picture

Please don't open two issues for two very similar problems (using the exact same code: (int)ltrim($s, '-0')) occurring in the search module. And join the discussion in #323299: Integers above 10 digits length scrambled.