search for something in the first 1000 records in the table
You can't do something like a 'first 1000' without an order, since each query could give you a different order if you don't specify it.
So, let's try this way:

select * from (select * from table order by PUTYOURORDERFIELDHERE LIMIT 1000) where name    
like '%john%' limit 5;