The main reason people have for doubting the idea of a search alliance between Yahoo (NASDAQ: yhoo) and Facebook (NASDAQ: fb) is that Yahoo already has a long-term search deal with Microsoft . Kara Swisher of All Things D says that "it would be nearly impossible for Yahoo to extricate itself from the long-term contract easily - though there are certain, but very difficult, outs. But sources tell me Microsoft would fight any attempt to end it earlier."
Swisher's much better informed about Silicon Valley than I am, so there's good reason to listen to her. I have no doubt the Microsoft would try to prevent Yahoo from ending the contract early.
But I'm not so sure the underlying assumption here is correct.
Very few people discussing this matter appear to have read the terms of the deal between Yahoo and Microsoft (NASDAQ: msft), which is formally known as the "Search and Advertising Services and Sales Agreement." But, just between us, let's call it The SASSA.
Reporters and analysts have been paying attention to the circumstances under which the contract could be terminated. That's not a terrible place to start. But it's not at all where I'd start if I were a lawyer for Yahoo. Canceling a contract like this altogether is a very big deal with lots of possible undesirable consequences. A decent lawyer would start by asking whether the contract needed to be terminated at all.
(Read More: Why It's Terrible to Be Worth $1 Billion )
I spent more than five years as a corporate lawyer. A good amount of what I did for clients was help them better understand the agreements they had entered into before I became their lawyer. And the first step in this process was never attempting to answer the question: can we get out of this? Instead I began by asking a narrower, more focused question: what do we want to do and can we do it under the existing agreements?
Of course, I'm not a lawyer for Facebook or Yahoo so I haven't had this conversation. But we can make some educated guesses about what they may be hoping to accomplish.
According to a story published on Sept. 25 by Nicholas Carlson of Business Insider , Mayer plans to work very hard at getting better at "personalization and mobile." So let's say that any deal she's hoping to put together with Facebook will also be focused on those things.
CNet's Charles Cooper has reported on what Mark Zuckerberg is looking for in developing Facebook's search capacity:
"We do a billion queries a day and we aren't even trying. Mostly trying to find people or brand pages or apps. There is a big opportunity in search, evolving to giving a set of answers to a specific question and Facebook is uniquely positioned to do that. For example, 'Which of my friends or friends of friends work in a company I might like to work at?'"
"At some point we will do it," he said.
Putting these things together, we can surmise that a possible goal for Facebook and Yahoo would be a new kind of highly personalized search, perhaps built on information people have already shared through Facebook. It would be targeted at answering specific questions based on who you know and what's known about them.
Our inquiry then is: does the SASSA ban the development of this kind of new search engine? The first reason to suspect that it might not is that the contract was written in 2009, when the concepts of mobile, personalization and social were much less important than they are now. It may be that the lawyers who wrote up the contracts overlooked the idea of a narrower type of search that would cover just a small fraction of the internet. After all, the point of the deal was to compete with Google (NASDAQ: goog) - which searches everything - not to compete with Facebook.
The critical term in the SASSA is "Algorithmic Search Services." This is what Microsoft has agreed to provide to Yahoo and what Yahoo has agreed to exclusively accept from Microsoft. So what are Algorithmic Search Services?
To discover that you have to go to Appendix A, Section 16 of the SASSA.
"Algorithmic Search Services" means Internet Search services that (a) utilize general indices of a reasonably comprehensive portion of the World Wide Web for (i) Web pages; (ii) images, and (iii) video; and (b) are accessed by users via Queries. Algorithmic Search Services excludes, without limitation, Yahoo! Excluded Services, Microsoft Excluded Services and search services via a search engine that has indexed predominantly a specific topic, or that search closed databases or data feeds, or content located only within a domain or portion thereof."
Read that final bit again. The deal does not include "search services via a search engine that has indexed predominantly a specific topic, or that search closed databases or data feeds, or content located only within a domain or portion thereof."
In other words, if Yahoo and Facebook were working on a search engine that was confined to information on Facebook, it would fall outside of the SASSA. The kind of search Zuckerberg wants - "Which of my friends or friends of friends work in a company I might like to work at?" - is most likely not included in the SASSA because it would be a search of a closed database, the Facebook database.
I haven't read through all the amendments to the SASSA. There may be side letters or other agreements that preclude this kind of search. But it seems to me pretty clear that the SASSA itself does not preclude a focused search deal between Yahoo and Facebook.
In short, there's no need for Yahoo to break its deal with Microsoft in order to forge a new search deal with Facebook. Yahoo can probably have deals with both Microsoft and Facebook.
-By CNBC Senior Editor John Carney
Follow John on Twitter . (Market and financial news, adventures in New York City, plus whatever is on his mind.) You can email him at email@example.com.
Questions? Comments? Tips? Email us at NetNet@cnbc.com or send a text message to: 917-740-8477.
Call us at 201-735-4638.