Custom Queries from wpsolr Pro

  • prakashreddy.imduri
    Participant
    # 1 month, 1 week ago

    We would like to know is there any way to build custom queries to get data from solr server using wpsolr pro plugin. Could you help us on that.

    Note: Requirement is like to show the related articles in every single page.

    wpsolr
    Keymaster
    # 1 month, 1 week ago

    WPSOLR cannot currently manage “More like this” queries, because it can only replace the main query from the archives.

    And WPSOLR has no public API neither (difficult to build a common API wrapping Elasticsearch, OpenSearch, Solr, Algolia, Weaviate): using the current WPSOLR internal code to build something custom would be risky to be broken in later releases.

    You can of course build something outside of WPSOLR, like calling the JSON Solr More like this API, and let WPSOLR manage the heavy stuff (indexing for instance). This looks the best way on the short term.

    prakashreddy.imduri
    Participant
    # 1 month, 1 week ago

    Thanks for the Response. Can we get a sample API to get data like sample request and response.

    wpsolr
    Keymaster
    # 1 month, 1 week ago

    I have no clue, as it is a completely new feature.

    prakashreddy.imduri
    Participant
    # 1 month, 1 week ago

    Is that Possible to include the wpsolr pro plugin files into the child theme template?

    wpsolr
    Keymaster
    # 1 month, 1 week ago

    It would be risky, as the plugin’s code is not a public API, and can therefore change in the next releases.

    The only code which can be used are the WPSOLR hooks. But they are not meant to manage “More like this features”, so not useful.

    wpsolr
    Keymaster
    # 1 month, 1 week ago
Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.