SphinxAutocompleteExample
SphinxAutocompleteExample copied to clipboard
Create suggest_no_double_entries
Fixed: $array_double = array(); while ( $line = fgets ( $in, 1024 ) ) { list ( $keyword, $freq ) = split ( " ", trim ( $line ) ); if (in_array($keyword,$array_double, true)){ break 1; } array_push($array_double,$keyword);
I have added code to ignore double entries while parsing dictionary.txt in suggest.php v1.1.
Can you change to use isset instead of in_array ( set the keyword as key and not value)? Isset is a lot faster than in_array on collections over 100k+ .
Also add it as patch to suggest.php or create a new suggest_no_doubles.php.