Joy
(@joyously)
Wherever you install WordPress, WP will not be invoked when the URL is for a file or folder that exists. So you can put a standalone page for the search, and WP is not involved at all. WP will still have a search page, however, so you could instead make a plugin to bypass the WP search and invoke the other search.
As for the back end working together, what is needed?
How is the search engine accessed by your site? I imagine it’s something like a REST API if not exactly that. What can make search requests? Can it be done from JavaScript? Or does it need to come from your server, as would be required if there is an IP whitelist or a secret API key in the process.
I’m assuming the search needs are more complex than the single field that the default site search feature would accommodate. You might still want a site search feature anyway. My inclination would be to build the search functionality into a custom page template. It’ll be better integrated into your site than if you built a standalone search page outside of WordPress.
Thanks for your notes. The search site is made entirely in React, very sophisticated with NLP and machine learning. There is no connection needed with the WP subsite Except design similarity. I don’t even need the WP search to function. WP is just like a blog wrapped around the React site. Would you need a REST API in this case? I am thinking that WP could be installed in a subdirectory of the React site, which is only a search page and a landing page.
Oh, I’ve imagined the wrong topology entirely. I thought the search engine runs on a remote server. To a degree, it doesn’t matter, it runs in a different space than WP either way. You can install it in its own subdirectory, parallel to WP. For all intents and purposes, it could be as though it was on a separate server. The one caveat is a request for search has to go to an actual server file. If it uses virtual URLs similar to WP permalinks, further measures will be required.
The search UI doesn’t have to be integrated with WP at all. As you say, you could mimic the appearance of a WP page so it appears better integrated. Or you could contain the search UI within an iframe placed on a WP page so you don’t have to duplicate efforts for header, footer, menu, etc. Of course, then the search UI should not have any such elements at all.