What kind of search are we talking about? A text search of titles and content? Or filtering by some custom field or other taxonomy?
And which archive exactly are we talking about?
You say to add search to the "product archive" but only within the "current product category".
The product archive simply displays the product posts (it is essentially the shop page), and so what would the "current" product category be in that case?
Or do you mean the product category archive? In which case products with the product category specified in the URL are shown.
In which case, the products shown are already limited to those with the specified product category.