An optical refractive index (RI) sensor is proposed based on a slotted photonic crystal nanobeam cavity. Three rows of parabolic-tapered air-holes are used to design the cavity and an embedded narrow slot is used to obtain a highly localized optical field in a low refractive index region in order to produce a strong light matter interaction. The number and the radii of the air holes, the width of the slot, and the number of rows are optimized to address the most challenging issue of RI sensor design, i.e. to obtain a high Q-factor and sensitivity, simultaneously. The plane wave expansion method has been used to facilitate the design procedure and a 3-D finite difference time domain method has been used to obtain the simulation outcome. The outcomes for the optimized cavity show an ultra-high Q-factor $\sim 4.3\times 10^{7}$ along with a sensitivity ~975 nm/RIU at a wavelength 1534 nm, for which the figure-of-merit is calculated as $2.73\times 10^{7}$ . However, the slot-width can be varied to obtain a Q-factor of $8\times 10^{7}$ and sensitivity of 1100 nm/RIU individually. The device also has an ultra-small mode volume of the order of 0.0253 $(\lambda /n)^{3}$ . Hence, all together, the sensor is expected to be a promising candidate for the lab-on-chip sensor application.