• I’m a UX designer working on a big data science search portal built on a large database run by React with a Lucene search engine. This search engine is very fast and will run independently of the WordPress site. I want WP to power the informational content pages that surround the search, and let the search page work on it’s own.

    So it’s a mashup. I want to make the WP site blend with the React search engine so it appears as one site. I don’t think this needs a REST API, or what they call “headless” WordPress, because the two sites don’t need to interact–just appear like one site to the user.

    I can make the two UIs look like a single unified site, but how would one set up these two sites to work together on the back end?

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • 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?

    Moderator bcworkz

    (@bcworkz)

    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.

    Thread Starter paulmirocha

    (@paulmirocha)

    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.

    Moderator bcworkz

    (@bcworkz)

    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.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Combining WordPress with non-wordpress site’ is closed to new replies.