It is possible, indeed:
How to consolidate the search from several domains ?
You will need one license for each site. And one Solr or Elasticsearch server, to create your index.