Comments on: XJoin for Solr, part 1: filtering using price discount data http://www.flax.co.uk/blog/2016/01/25/xjoin-solr-part-1-filtering-using-price-discount-data/ The Open Source Search Specialists Tue, 12 Feb 2019 14:44:32 +0000 hourly 1 https://wordpress.org/?v=4.9.8 By: Charlie Hull http://www.flax.co.uk/blog/2016/01/25/xjoin-solr-part-1-filtering-using-price-discount-data/#comment-44029 Mon, 20 Feb 2017 16:12:09 +0000 http://www.flax.co.uk/?p=2928#comment-44029 Hi Shamik, as you can see from the JIRA the latest Solr version it was generated for is 5.3 – so you may have to do some minor work to update it. I’ll have a chat with the team here in case there’s something we can do to help.

]]>
By: Shamik http://www.flax.co.uk/blog/2016/01/25/xjoin-solr-part-1-filtering-using-price-discount-data/#comment-43908 Wed, 15 Feb 2017 00:08:55 +0000 http://www.flax.co.uk/?p=2928#comment-43908 Thanks for the pointer. I tried applying the patch (SOLR-7341.patch-master/SOLR-7341.patch-trunk) against Solr 5.5 source code, but it failed to generate the snapshot jar, though xjoin directory with necessary source code were generated under contrib. I even tried the patch against the current master code, but it didn’t work out either. Just wondering if I’m using the wrong patch or it’s not compatible with the versions I’m trying?

]]>
By: Charlie Hull http://www.flax.co.uk/blog/2016/01/25/xjoin-solr-part-1-filtering-using-price-discount-data/#comment-43689 Tue, 07 Feb 2017 16:30:31 +0000 http://www.flax.co.uk/?p=2928#comment-43689 Hi Shamik, glad you like it! This JIRA ticket contains the code that’s available.

]]>
By: Shamik http://www.flax.co.uk/blog/2016/01/25/xjoin-solr-part-1-filtering-using-price-discount-data/#comment-43675 Tue, 07 Feb 2017 05:39:33 +0000 http://www.flax.co.uk/?p=2928#comment-43675 This is a huge effort is terms of seamlessly integrating metasearch with Solr. For folks who are using standard Solr distribution and wants to use this library, do you’ve anything available in form of jars or open source code?

]]>
By: Tom Winch http://www.flax.co.uk/blog/2016/01/25/xjoin-solr-part-1-filtering-using-price-discount-data/#comment-35963 Thu, 25 Feb 2016 16:30:08 +0000 http://www.flax.co.uk/?p=2928#comment-35963 I have added an implementation of XJoinResultsFactory that can connect to a JSON or XML web service and extract results using JsonPath or XPath. Therefore, instead of using the custom glue code as above, you can just use the following solrconfig.xml snippets:

 <searchComponent name=”x_product_offers” class=”org.apache.solr.search.xjoin.XJoinSearchComponent”>
    <str name=”factoryClass”>org.apache.solr.search.xjoin.simple.SimpleXJoinResultsFactory</str>
    <str name=”joinField”>id</str>
    <lst name=”external”>
      <str name=”type”>JSON</str>
      <str name=”rootUrl”>http://localhost:8000/products</str&gt;
      <lst name=”globalFieldPaths”>
        <str name=”count”>$.length()</str>
      </lst>
      <str name=”joinIdPath”>$[*].id</str>
      <lst name=”resultFieldPaths”>
        <str name=”discount”>$[?(@.id == ‘JOINID’)].discountPct</str>
      </lst>
    </lst>
  </searchComponent>
  <searchComponent name=”x_manufacturer_offers” class=”org.apache.solr.search.xjoin.XJoinSearchComponent”>
    <str name=”factoryClass”>org.apache.solr.search.xjoin.simple.SimpleXJoinResultsFactory</str>
    <str name=”joinField”>manufacturer</str>
    <lst name=”external”>
      <str name=”type”>JSON</str>
      <str name=”rootUrl”>http://localhost:8000/manufacturers</str&gt;
      <lst name=”globalFieldPaths”>
        <str name=”count”>$.length()</str>
      </lst>
      <str name=”joinIdPath”>$[*].manufacturer</str>
      <lst name=”resultFieldPaths”>
        <str name=”discount”>$[?(@.manufacturer == ‘JOINID’)].discountPct</str>
      </lst>
    </lst>
  </searchComponent>
  <searchComponent name=”x_click” class=”org.apache.solr.search.xjoin.XJoinSearchComponent”>
    <str name=”factoryClass”>org.apache.solr.search.xjoin.simple.SimpleXJoinResultsFactory</str>
    <str name=”joinField”>id</str>
    <lst name=”external”>
      <str name=”type”>JSON</str>
      <str name=”rootUrl”>http://localhost:8001/ids</str&gt;
      <lst name=”globalFieldPaths”>
        <str name=”count”>$.length()</str>
      </lst>
      <str name=”joinIdPath”>$[*].id</str>
      <lst name=”resultFieldPaths”>
        <str name=”id”>$[?(@.id == ‘JOINID’)].id</str>
        <str name=”weight”>$[?(@.id == ‘JOINID’)].weight</str>
      </lst>
    </lst>
  </searchComponent>

]]>