This is very very risky! Yes you will most likely have to claim your baggage & re-check it. We had to exit the airport & go through security again as well when we did this. This took a good 90 minutes - we barely made our connection. Like the OP stated, if they are code share airlines you may be able to get the baggage checked all the way through. Both times we did this, it didn't work that way. The next time we did this we really learned our lesson. We were flying international (Caribbean) and had a 1-hour connection. For whatever reason, baggage claim was really backed up & our luggage didn't appear (no one's did) for the 45 min. we stood there. We had no choice but to abandon our luggage & hop on our charter flight, since that charter flight only flew to this island once every 2 days. The charter air company assured us that they would claim it & get it to the island within 48 hours. Long story short, it never came. It was MIA. Airline A claimed no responsibility since they did deliver it to baggage claim, just an hour after the flight landed. Airline B claimed no responsibility since technically we checked no luggage with them when we boarded. We were on a very secluded British Virgin Island, no phone in the room, no cells, no nothing. For 4 days we paid a taxi $60 to drive us to the airport in hopes of sorting it out. On day 4 they found the bag at the previous airport - which we told them to hold there since we were leaving the next day. Thank goodness we had enough clothing & toiletries packed in our carry-ons to get us through the 5-day stay, but spending 2 hours a day at the airport (and paying for the taxis) really put a damper on the trip.
Please try not to use 2 different airlines!!!!