Is WP a right choice for Marketplace websites?

Is WP a right choice for marketplace websites?

I have a marketplace website with classipress theme. It had 5lakh products and might be growing to 2 million very soon. The search seems too slow even when we use a high speed dedicated server. Major issue is because of the size of wp_posts table.

How could we sort out this issue?