What will happen if I connect a solar panel and batteries in parallel?
A PV (solar) panel acts as a good approximation to a constant current source when loaded to below its optimum voltage.

Updated:  With the added PV panel and battery specifications it can be seen that:

The panel will fully charge the battery in about mAh_battery / Imp
= 2300 mAh / 380 mA ~= 6 hours of full sun.
Sunshine hours (full sun at 1 kW/m^2) vary with location, season and weather conditions but typically varies from about 2 SSH in midwinter to 6 SSH in full summer. SSH for many locations worldwide can be found from The fabulous Gaisma site.
With 2 SSH/day it will take ~= 3 days to fully charge the battery, and with 6 SSH it will fully charge in 1 day.
As Voc is >> Vbattery and as the panel will deliver useful current above Vmp, then the panel will deliver ~= Imp into the fully charged cells and modern 2300 mAh cells with no readsorption of gas generated will rapidly be destroyed. A regulator is therefore needed.
As mentioned below, a clamp regulator set to about 8.7V will probably be acceptable. Current when fully charged should be checked and if necessary Vclamp may need to be adjusted. An alternative is to let Vbattery rise to somewhat above 8.7V indicating full charge and then cut off charging either until next day or until discharge is initiated. 

NimH are usually regulated by detecting negative delta V at full charge or delta battery temperature rate or absolute battery temperature but none of these are reliable in most solar applications due to variable charge rate with insolation and solar heating. Absolute temperature from charging and solar heating combined is a good indication that charging should be stopped but not that charging is complete if solar heating is significant. 



Older:

NimH cells need about 1.45V each for full charge at current well below C (eg well below 2A for 2000 mAh cells. This voltage varies somewhat by cell brand and model but 1.45V is a good starting point.
So 4 cells need 4 x 1.45 = 5.8V for full charge (before Schottky diodes is allowed for) and
6 cells need 6 x 1.45V = 8.7V.  

So - a panel rated at 9V Vmp (voltage at maximum power) may not treat 6 x NimH too badly but will continue to charge 4 x NimH cells at nearly full panel current even when the cells are fully charged. So whether you have 4 or 6 cells matters - and panel Imp mA and  battery mAh also matter.

Older NimH with say &lt;= about 1800 mAh for an AA cell could be trickle charged at &lt;= C/10 indefinitely. More modern cells of >=2000 mAh capacity for AA MUST NOT be trickle charged after full charge state is reached. While older cells had gas recombination systems to recombine Hydrogen and Oxygen generated by electrolysis, these systems are not included in higher capacity cells (as the room is used for additional active battery materials. Trickle charging higher capacity cells will dry them out rapidly and lead to early failure.

If a PV panel is liable to frequently fully charge NimH cells then overcharging can be prevented by adding a "clamp" or shunt regulator set to 1.45V/cell. For very low capacity panels a TL431 adjustable active zener( clamp regulator) can be used directly  for PV panels with more mA output than a TL431 can handle can use a shunt transistor driven by a TL431.  A conventional zener has far too soft a V-I "knee" to be used in this application. 

It is also possible to use a series regulator but this needs care due to battery voltage drop when charge is removed.