I agree with CranCrank inasmuch as suggesting to rent for 6 months before buying. I think most people could not find 6 months "spare" time for a recce visit. But, 5 weeks well used would not be a bad experience. Five weeks in the off season could prove more fruitful that say six months between April and September.
Buying a home or holiday home in Spain is probably the 2nd most expensive investment anybody can make. So tread carefully and best of luck.