It is, indeed, presumed to be the Holy Spirit. There is the idea that the Spirit did not indwell people in Old Testament times, but did "come upon" them. The indwelling did not take place until after redemption has been accomplished with the death, burial and resurrection of Jesus.
Or do you not know that your body is a temple of the Holy Spirit
within you, whom you have from God? You are not your own 1
Corinthians 6:19 ESV
A key question would be what Spirit could it be if it is not the Holy Spirit. There really are no other legitimate candidates for that. The word "spirit" is typically used of our own spirits and of the Holy Spirit. Since this particular use of "spirit" is distinguished as that of the Lord (and not ours), the best conclusion appears to be that it is, in fact, a reference to the Holy Spirit.
It is interesting to note that David specifically prayed that God would not take the "Holy Spirit" from him after his sin with Urriah and Bathsheeba:
Cast me not away from your presence, and take not your Holy Spirit
from me. Psalm 51:11 ESV