I have enabled Cross Site Publishing feature. In the first site collection, I have enabled pages library as Catalog. In the another site collection I am connecting to the first site collection. Pages and manage data term is created in another site collection.
Now the problem is that I have to create my own custom application page in the second site collection. The application page should work as the Content by Search Web Part. How can I do that programmatically? How to read data from search?