[jira] [Updated] (SOLR-7341) xjoin - join data from external sources
[ https://issues.apache.org/jira/browse/SOLR-7341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom Mortimer updated SOLR-7341: --- Attachment: SOLR-7341.patch-7.2.1 > xjoin - join data from external sources > --- > > Key: SOLR-7341 > URL: https://issues.apache.org/jira/browse/SOLR-7341 > Project: Solr > Issue Type: New Feature > Components: search >Reporter: Tom Winch >Priority: Minor > Fix For: 4.10.3, 5.3.2, 6.0 > > Attachments: SOLR-7341.patch-4.10.3, SOLR-7341.patch-4_10, > SOLR-7341.patch-5.3.2, SOLR-7341.patch-5_3, SOLR-7341.patch-7.2.1, > SOLR-7341.patch-master, SOLR-7341.patch-trunk, SOLR-7341.patch-trunk > > > h2. XJoin > The "xjoin" SOLR contrib allows external results to be joined with SOLR > results in a query and the SOLR result set to be filtered by the results of > an external query. Values from the external results are made available in the > SOLR results and may also be used to boost the scores of corresponding > documents during the search. The contrib consists of the Java classes > XJoinSearchComponent, XJoinValueSourceParser and XJoinQParserPlugin (and > associated classes), which must be configured in solrconfig.xml, and the > interfaces XJoinResultsFactory and XJoinResults, which are implemented by the > user to provide the link between SOLR and the external results source (but > see below for details of how to use the in-built SimpleXJoinResultsFactory > implementation). External results and SOLR documents are matched via a single > configurable attribute (the "join field"). > To include the XJoin contrib classes, add the following config to > solrconfig.xml: > {code:xml} > > .. > >regex=".*\.jar" /> >regex="solr-xjoin-\d.*\.jar" /> > .. > > {code} > Note that any JARs containing implementations of the XJoinResultsFactory must > also be included. > h2. Java classes and interfaces > h3. XJoinResultsFactory > The user implementation of this interface is responsible for connecting to an > external source to perform a query (or otherwise collect results). Parameters > with prefix ".external." are passed from the SOLR query URL > to pararameterise the search. The interface has the following methods: > * void init(NamedList args) - this is called during SOLR initialisation, and > passed parameters from the search component configuration (see below) > * XJoinResults getResults(SolrParams params) - this is called during a SOLR > search to generate external results, and is passed parameters from the SOLR > query URL (as above) > For example, the implementation might perform queries of an external source > based on the 'q' SOLR query URL parameter (in full, name>.external.q). > h3. XJoinResults > A user implementation of this interface is returned by the getResults() > method of the XJoinResultsFactory implementation. It has methods: > * Object getResult(String joinId) - this should return a particular result > given the value of the join attribute > * Iterable getJoinIds() - this should return an ordered (ascending) > list of the join attribute values for all results of the external search > h3. XJoinSearchComponent > This is the central Java class of the contrib. It is a SOLR search component, > configured in solrconfig.xml and included in one or more SOLR request > handlers. There is one XJoin search component per external source, and each > has two main responsibilities: > * Before the SOLR search, it connects to the external source and retrieves > results, storing them in the SOLR request context > * After the SOLR search, it matches SOLR document in the results set and > external results via the join field, adding attributes from the external > results to documents in the SOLR results set > It takes the following initialisation parameters: > * factoryClass - this specifies the user-supplied class implementing > XJoinResultsFactory, used to generate external results > * joinField - this specifies the attribute on which to join between SOLR > documents and external results > * external - this parameter set is passed to configure the > XJoinResultsFactory implementation > For example, in solrconfig.xml: > {code:xml} > class="org.apache.solr.search.xjoin.XJoinSearchComponent"> > test.TestXJoinResultsFactory > id > > 1,2,3 > > > {code} > Here, the search component instantiates a new TextXJoinResultsFactory during > initialisation, and passes it the "values" parameter (1, 2, 3) to configure > it. To properly use the XJoinSearchComponent in a request handler, it must be > included at the start and end of the component list, and may be configured > with the following query parameters: > * results - a comma-separated list of attributes from the XJoinResults > implementation (created by the factory at search time) to be i
[jira] [Updated] (SOLR-7341) xjoin - join data from external sources
[ https://issues.apache.org/jira/browse/SOLR-7341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom Winch updated SOLR-7341: Fix Version/s: (was: 5.3.1) 5.3.2 > xjoin - join data from external sources > --- > > Key: SOLR-7341 > URL: https://issues.apache.org/jira/browse/SOLR-7341 > Project: Solr > Issue Type: New Feature > Components: search >Reporter: Tom Winch >Priority: Minor > Fix For: 4.10.3, 5.3.2, master > > Attachments: SOLR-7341.patch-4.10.3, SOLR-7341.patch-4_10, > SOLR-7341.patch-5.3.2, SOLR-7341.patch-5_3, SOLR-7341.patch-master, > SOLR-7341.patch-trunk, SOLR-7341.patch-trunk > > > h2. XJoin > The "xjoin" SOLR contrib allows external results to be joined with SOLR > results in a query and the SOLR result set to be filtered by the results of > an external query. Values from the external results are made available in the > SOLR results and may also be used to boost the scores of corresponding > documents during the search. The contrib consists of the Java classes > XJoinSearchComponent, XJoinValueSourceParser and XJoinQParserPlugin (and > associated classes), which must be configured in solrconfig.xml, and the > interfaces XJoinResultsFactory and XJoinResults, which are implemented by the > user to provide the link between SOLR and the external results source (but > see below for details of how to use the in-built SimpleXJoinResultsFactory > implementation). External results and SOLR documents are matched via a single > configurable attribute (the "join field"). > To include the XJoin contrib classes, add the following config to > solrconfig.xml: > {code:xml} > > .. > >regex=".*\.jar" /> >regex="solr-xjoin-\d.*\.jar" /> > .. > > {code} > Note that any JARs containing implementations of the XJoinResultsFactory must > also be included. > h2. Java classes and interfaces > h3. XJoinResultsFactory > The user implementation of this interface is responsible for connecting to an > external source to perform a query (or otherwise collect results). Parameters > with prefix ".external." are passed from the SOLR query URL > to pararameterise the search. The interface has the following methods: > * void init(NamedList args) - this is called during SOLR initialisation, and > passed parameters from the search component configuration (see below) > * XJoinResults getResults(SolrParams params) - this is called during a SOLR > search to generate external results, and is passed parameters from the SOLR > query URL (as above) > For example, the implementation might perform queries of an external source > based on the 'q' SOLR query URL parameter (in full, name>.external.q). > h3. XJoinResults > A user implementation of this interface is returned by the getResults() > method of the XJoinResultsFactory implementation. It has methods: > * Object getResult(String joinId) - this should return a particular result > given the value of the join attribute > * Iterable getJoinIds() - this should return an ordered (ascending) > list of the join attribute values for all results of the external search > h3. XJoinSearchComponent > This is the central Java class of the contrib. It is a SOLR search component, > configured in solrconfig.xml and included in one or more SOLR request > handlers. There is one XJoin search component per external source, and each > has two main responsibilities: > * Before the SOLR search, it connects to the external source and retrieves > results, storing them in the SOLR request context > * After the SOLR search, it matches SOLR document in the results set and > external results via the join field, adding attributes from the external > results to documents in the SOLR results set > It takes the following initialisation parameters: > * factoryClass - this specifies the user-supplied class implementing > XJoinResultsFactory, used to generate external results > * joinField - this specifies the attribute on which to join between SOLR > documents and external results > * external - this parameter set is passed to configure the > XJoinResultsFactory implementation > For example, in solrconfig.xml: > {code:xml} > class="org.apache.solr.search.xjoin.XJoinSearchComponent"> > test.TestXJoinResultsFactory > id > > 1,2,3 > > > {code} > Here, the search component instantiates a new TextXJoinResultsFactory during > initialisation, and passes it the "values" parameter (1, 2, 3) to configure > it. To properly use the XJoinSearchComponent in a request handler, it must be > included at the start and end of the component list, and may be configured > with the following query parameters: > * results - a comma-separated list of attributes from the XJoinResults > implementation (created by the factory at search time) to be incl
[jira] [Updated] (SOLR-7341) xjoin - join data from external sources
[ https://issues.apache.org/jira/browse/SOLR-7341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom Winch updated SOLR-7341: Attachment: SOLR-7341.patch-master SOLR-7341.patch-5.3.2 SOLR-7341.patch-4.10.3 Git patches for 4.10.3, 5.3.2 and master that include the SimpleXJoinResultsFactory > xjoin - join data from external sources > --- > > Key: SOLR-7341 > URL: https://issues.apache.org/jira/browse/SOLR-7341 > Project: Solr > Issue Type: New Feature > Components: search >Reporter: Tom Winch >Priority: Minor > Fix For: 4.10.3, 5.3.1, master > > Attachments: SOLR-7341.patch-4.10.3, SOLR-7341.patch-4_10, > SOLR-7341.patch-5.3.2, SOLR-7341.patch-5_3, SOLR-7341.patch-master, > SOLR-7341.patch-trunk, SOLR-7341.patch-trunk > > > h2. XJoin > The "xjoin" SOLR contrib allows external results to be joined with SOLR > results in a query and the SOLR result set to be filtered by the results of > an external query. Values from the external results are made available in the > SOLR results and may also be used to boost the scores of corresponding > documents during the search. The contrib consists of the Java classes > XJoinSearchComponent, XJoinValueSourceParser and XJoinQParserPlugin (and > associated classes), which must be configured in solrconfig.xml, and the > interfaces XJoinResultsFactory and XJoinResults, which are implemented by the > user to provide the link between SOLR and the external results source (but > see below for details of how to use the in-built SimpleXJoinResultsFactory > implementation). External results and SOLR documents are matched via a single > configurable attribute (the "join field"). > To include the XJoin contrib classes, add the following config to > solrconfig.xml: > {code:xml} > > .. > >regex=".*\.jar" /> >regex="solr-xjoin-\d.*\.jar" /> > .. > > {code} > Note that any JARs containing implementations of the XJoinResultsFactory must > also be included. > h2. Java classes and interfaces > h3. XJoinResultsFactory > The user implementation of this interface is responsible for connecting to an > external source to perform a query (or otherwise collect results). Parameters > with prefix ".external." are passed from the SOLR query URL > to pararameterise the search. The interface has the following methods: > * void init(NamedList args) - this is called during SOLR initialisation, and > passed parameters from the search component configuration (see below) > * XJoinResults getResults(SolrParams params) - this is called during a SOLR > search to generate external results, and is passed parameters from the SOLR > query URL (as above) > For example, the implementation might perform queries of an external source > based on the 'q' SOLR query URL parameter (in full, name>.external.q). > h3. XJoinResults > A user implementation of this interface is returned by the getResults() > method of the XJoinResultsFactory implementation. It has methods: > * Object getResult(String joinId) - this should return a particular result > given the value of the join attribute > * Iterable getJoinIds() - this should return an ordered (ascending) > list of the join attribute values for all results of the external search > h3. XJoinSearchComponent > This is the central Java class of the contrib. It is a SOLR search component, > configured in solrconfig.xml and included in one or more SOLR request > handlers. There is one XJoin search component per external source, and each > has two main responsibilities: > * Before the SOLR search, it connects to the external source and retrieves > results, storing them in the SOLR request context > * After the SOLR search, it matches SOLR document in the results set and > external results via the join field, adding attributes from the external > results to documents in the SOLR results set > It takes the following initialisation parameters: > * factoryClass - this specifies the user-supplied class implementing > XJoinResultsFactory, used to generate external results > * joinField - this specifies the attribute on which to join between SOLR > documents and external results > * external - this parameter set is passed to configure the > XJoinResultsFactory implementation > For example, in solrconfig.xml: > {code:xml} > class="org.apache.solr.search.xjoin.XJoinSearchComponent"> > test.TestXJoinResultsFactory > id > > 1,2,3 > > > {code} > Here, the search component instantiates a new TextXJoinResultsFactory during > initialisation, and passes it the "values" parameter (1, 2, 3) to configure > it. To properly use the XJoinSearchComponent in a request handler, it must be > included at the start and end of the component list, and may be configured > with the following query parameters:
[jira] [Updated] (SOLR-7341) xjoin - join data from external sources
[ https://issues.apache.org/jira/browse/SOLR-7341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom Winch updated SOLR-7341: Description: h2. XJoin The "xjoin" SOLR contrib allows external results to be joined with SOLR results in a query and the SOLR result set to be filtered by the results of an external query. Values from the external results are made available in the SOLR results and may also be used to boost the scores of corresponding documents during the search. The contrib consists of the Java classes XJoinSearchComponent, XJoinValueSourceParser and XJoinQParserPlugin (and associated classes), which must be configured in solrconfig.xml, and the interfaces XJoinResultsFactory and XJoinResults, which are implemented by the user to provide the link between SOLR and the external results source (but see below for details of how to use the in-built SimpleXJoinResultsFactory implementation). External results and SOLR documents are matched via a single configurable attribute (the "join field"). To include the XJoin contrib classes, add the following config to solrconfig.xml: {code:xml} .. .. {code} Note that any JARs containing implementations of the XJoinResultsFactory must also be included. h2. Java classes and interfaces h3. XJoinResultsFactory The user implementation of this interface is responsible for connecting to an external source to perform a query (or otherwise collect results). Parameters with prefix ".external." are passed from the SOLR query URL to pararameterise the search. The interface has the following methods: * void init(NamedList args) - this is called during SOLR initialisation, and passed parameters from the search component configuration (see below) * XJoinResults getResults(SolrParams params) - this is called during a SOLR search to generate external results, and is passed parameters from the SOLR query URL (as above) For example, the implementation might perform queries of an external source based on the 'q' SOLR query URL parameter (in full, .external.q). h3. XJoinResults A user implementation of this interface is returned by the getResults() method of the XJoinResultsFactory implementation. It has methods: * Object getResult(String joinId) - this should return a particular result given the value of the join attribute * Iterable getJoinIds() - this should return an ordered (ascending) list of the join attribute values for all results of the external search h3. XJoinSearchComponent This is the central Java class of the contrib. It is a SOLR search component, configured in solrconfig.xml and included in one or more SOLR request handlers. There is one XJoin search component per external source, and each has two main responsibilities: * Before the SOLR search, it connects to the external source and retrieves results, storing them in the SOLR request context * After the SOLR search, it matches SOLR document in the results set and external results via the join field, adding attributes from the external results to documents in the SOLR results set It takes the following initialisation parameters: * factoryClass - this specifies the user-supplied class implementing XJoinResultsFactory, used to generate external results * joinField - this specifies the attribute on which to join between SOLR documents and external results * external - this parameter set is passed to configure the XJoinResultsFactory implementation For example, in solrconfig.xml: {code:xml} test.TestXJoinResultsFactory id 1,2,3 {code} Here, the search component instantiates a new TextXJoinResultsFactory during initialisation, and passes it the "values" parameter (1, 2, 3) to configure it. To properly use the XJoinSearchComponent in a request handler, it must be included at the start and end of the component list, and may be configured with the following query parameters: * results - a comma-separated list of attributes from the XJoinResults implementation (created by the factory at search time) to be included in the SOLR results * fl - a comma-separated list of attributes from results objects (contained in an XJoinResults implementation) to be included in the SOLR results For example: {code:xml} .. true xx test_count id,value xjoin_test xjoin_test {code} Note that, to include the list of join ids returned by the external source in the SOLR results (likely for debug purposes), the value 'join_ids' may be specified in the "results" parameter. h3. XJoinQParserPlugin This query parser plugin constructs a query from the results of the external searches, and is based on the TermsQParserPlugin. It takes the following local parameters: * method - as the TermsQParserPlugin, this specifies how to build the Lucene query based on the join ids contained in external results; one of termsFilter, booleanQuery, automaton, or
[jira] [Updated] (SOLR-7341) xjoin - join data from external sources
[ https://issues.apache.org/jira/browse/SOLR-7341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom Winch updated SOLR-7341: Attachment: SOLR-7341.patch-trunk git patch > xjoin - join data from external sources > --- > > Key: SOLR-7341 > URL: https://issues.apache.org/jira/browse/SOLR-7341 > Project: Solr > Issue Type: New Feature > Components: search >Reporter: Tom Winch >Priority: Minor > Fix For: 4.10.3, 5.3.1, Trunk > > Attachments: SOLR-7341.patch-4_10, SOLR-7341.patch-5_3, > SOLR-7341.patch-trunk, SOLR-7341.patch-trunk > > > h2. XJoin > The "xjoin" SOLR contrib allows external results to be joined with SOLR > results in a query and the SOLR result set to be filtered by the results of > an external query. Values from the external results are made available in the > SOLR results and may also be used to boost the scores of corresponding > documents during the search. The contrib consists of the Java classes > XJoinSearchComponent, XJoinValueSourceParser and XJoinQParserPlugin (and > associated classes), which must be configured in solrconfig.xml, and the > interfaces XJoinResultsFactory and XJoinResults, which are implemented by the > user to provide the link between SOLR and the external results source. > External results and SOLR documents are matched via a single configurable > attribute (the "join field"). The contrib JAR solr-xjoin-4.10.3.jar contains > these classes and interfaces and should be included in SOLR's class path from > solrconfig.xml, as should a JAR containing the user implementations of the > previously mentioned interfaces. For example: > {code:xml} > > .. > >/> > .. > > > .. > > {code} > h2. Java classes and interfaces > h3. XJoinResultsFactory > The user implementation of this interface is responsible for connecting to an > external source to perform a query (or otherwise collect results). Parameters > with prefix ".external." are passed from the SOLR query URL > to pararameterise the search. The interface has the following methods: > * void init(NamedList args) - this is called during SOLR initialisation, and > passed parameters from the search component configuration (see below) > * XJoinResults getResults(SolrParams params) - this is called during a SOLR > search to generate external results, and is passed parameters from the SOLR > query URL (as above) > For example, the implementation might perform queries of an external source > based on the 'q' SOLR query URL parameter (in full, name>.external.q). > h3. XJoinResults > A user implementation of this interface is returned by the getResults() > method of the XJoinResultsFactory implementation. It has methods: > * Object getResult(String joinId) - this should return a particular result > given the value of the join attribute > * Iterable getJoinIds() - this should return an ordered (ascending) > list of the join attribute values for all results of the external search > h3. XJoinSearchComponent > This is the central Java class of the contrib. It is a SOLR search component, > configured in solrconfig.xml and included in one or more SOLR request > handlers. There is one XJoin search component per external source, and each > has two main responsibilities: > * Before the SOLR search, it connects to the external source and retrieves > results, storing them in the SOLR request context > * After the SOLR search, it matches SOLR document in the results set and > external results via the join field, adding attributes from the external > results to documents in the SOLR results set > It takes the following initialisation parameters: > * factoryClass - this specifies the user-supplied class implementing > XJoinResultsFactory, used to generate external results > * joinField - this specifies the attribute on which to join between SOLR > documents and external results > * external - this parameter set is passed to configure the > XJoinResultsFactory implementation > For example, in solrconfig.xml: > {code:xml} > class="org.apache.solr.search.xjoin.XJoinSearchComponent"> > test.TestXJoinResultsFactory > id > > 1,2,3 > > > {code} > Here, the search component instantiates a new TextXJoinResultsFactory during > initialisation, and passes it the "values" parameter (1, 2, 3) to configure > it. To properly use the XJoinSearchComponent in a request handler, it must be > included at the start and end of the component list, and may be configured > with the following query parameters: > * results - a comma-separated list of attributes from the XJoinResults > implementation (created by the factory at search time) to be included in the > SOLR results > * fl - a comma-separated list of attributes from results objects (contained > in an XJoinResults implementation) to be includ
[jira] [Updated] (SOLR-7341) xjoin - join data from external sources
[ https://issues.apache.org/jira/browse/SOLR-7341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom Winch updated SOLR-7341: Affects Version/s: (was: 4.10.3) Fix Version/s: 4.10.3 5.3.1 > xjoin - join data from external sources > --- > > Key: SOLR-7341 > URL: https://issues.apache.org/jira/browse/SOLR-7341 > Project: Solr > Issue Type: New Feature > Components: search >Reporter: Tom Winch >Priority: Minor > Fix For: 4.10.3, 5.3.1, Trunk > > Attachments: SOLR-7341.patch-4_10, SOLR-7341.patch-5_3, > SOLR-7341.patch-trunk > > > h2. XJoin > The "xjoin" SOLR contrib allows external results to be joined with SOLR > results in a query and the SOLR result set to be filtered by the results of > an external query. Values from the external results are made available in the > SOLR results and may also be used to boost the scores of corresponding > documents during the search. The contrib consists of the Java classes > XJoinSearchComponent, XJoinValueSourceParser and XJoinQParserPlugin (and > associated classes), which must be configured in solrconfig.xml, and the > interfaces XJoinResultsFactory and XJoinResults, which are implemented by the > user to provide the link between SOLR and the external results source. > External results and SOLR documents are matched via a single configurable > attribute (the "join field"). The contrib JAR solr-xjoin-4.10.3.jar contains > these classes and interfaces and should be included in SOLR's class path from > solrconfig.xml, as should a JAR containing the user implementations of the > previously mentioned interfaces. For example: > {code:xml} > > .. > >/> > .. > > > .. > > {code} > h2. Java classes and interfaces > h3. XJoinResultsFactory > The user implementation of this interface is responsible for connecting to an > external source to perform a query (or otherwise collect results). Parameters > with prefix ".external." are passed from the SOLR query URL > to pararameterise the search. The interface has the following methods: > * void init(NamedList args) - this is called during SOLR initialisation, and > passed parameters from the search component configuration (see below) > * XJoinResults getResults(SolrParams params) - this is called during a SOLR > search to generate external results, and is passed parameters from the SOLR > query URL (as above) > For example, the implementation might perform queries of an external source > based on the 'q' SOLR query URL parameter (in full, name>.external.q). > h3. XJoinResults > A user implementation of this interface is returned by the getResults() > method of the XJoinResultsFactory implementation. It has methods: > * Object getResult(String joinId) - this should return a particular result > given the value of the join attribute > * Iterable getJoinIds() - this should return an ordered (ascending) > list of the join attribute values for all results of the external search > h3. XJoinSearchComponent > This is the central Java class of the contrib. It is a SOLR search component, > configured in solrconfig.xml and included in one or more SOLR request > handlers. There is one XJoin search component per external source, and each > has two main responsibilities: > * Before the SOLR search, it connects to the external source and retrieves > results, storing them in the SOLR request context > * After the SOLR search, it matches SOLR document in the results set and > external results via the join field, adding attributes from the external > results to documents in the SOLR results set > It takes the following initialisation parameters: > * factoryClass - this specifies the user-supplied class implementing > XJoinResultsFactory, used to generate external results > * joinField - this specifies the attribute on which to join between SOLR > documents and external results > * external - this parameter set is passed to configure the > XJoinResultsFactory implementation > For example, in solrconfig.xml: > {code:xml} > class="org.apache.solr.search.xjoin.XJoinSearchComponent"> > test.TestXJoinResultsFactory > id > > 1,2,3 > > > {code} > Here, the search component instantiates a new TextXJoinResultsFactory during > initialisation, and passes it the "values" parameter (1, 2, 3) to configure > it. To properly use the XJoinSearchComponent in a request handler, it must be > included at the start and end of the component list, and may be configured > with the following query parameters: > * results - a comma-separated list of attributes from the XJoinResults > implementation (created by the factory at search time) to be included in the > SOLR results > * fl - a comma-separated list of attributes from results objects (contained > in an XJoinResults
[jira] [Updated] (SOLR-7341) xjoin - join data from external sources
[ https://issues.apache.org/jira/browse/SOLR-7341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom Winch updated SOLR-7341: Attachment: SOLR-7341.patch-trunk SOLR-7341.patch-5_3 SOLR-7341.patch-4_10 New patches with slightly improved output format > xjoin - join data from external sources > --- > > Key: SOLR-7341 > URL: https://issues.apache.org/jira/browse/SOLR-7341 > Project: Solr > Issue Type: New Feature > Components: search >Affects Versions: 4.10.3 >Reporter: Tom Winch >Priority: Minor > Fix For: Trunk > > Attachments: SOLR-7341.patch-4_10, SOLR-7341.patch-5_3, > SOLR-7341.patch-trunk > > > h2. XJoin > The "xjoin" SOLR contrib allows external results to be joined with SOLR > results in a query and the SOLR result set to be filtered by the results of > an external query. Values from the external results are made available in the > SOLR results and may also be used to boost the scores of corresponding > documents during the search. The contrib consists of the Java classes > XJoinSearchComponent, XJoinValueSourceParser and XJoinQParserPlugin (and > associated classes), which must be configured in solrconfig.xml, and the > interfaces XJoinResultsFactory and XJoinResults, which are implemented by the > user to provide the link between SOLR and the external results source. > External results and SOLR documents are matched via a single configurable > attribute (the "join field"). The contrib JAR solr-xjoin-4.10.3.jar contains > these classes and interfaces and should be included in SOLR's class path from > solrconfig.xml, as should a JAR containing the user implementations of the > previously mentioned interfaces. For example: > {code:xml} > > .. > >/> > .. > > > .. > > {code} > h2. Java classes and interfaces > h3. XJoinResultsFactory > The user implementation of this interface is responsible for connecting to an > external source to perform a query (or otherwise collect results). Parameters > with prefix ".external." are passed from the SOLR query URL > to pararameterise the search. The interface has the following methods: > * void init(NamedList args) - this is called during SOLR initialisation, and > passed parameters from the search component configuration (see below) > * XJoinResults getResults(SolrParams params) - this is called during a SOLR > search to generate external results, and is passed parameters from the SOLR > query URL (as above) > For example, the implementation might perform queries of an external source > based on the 'q' SOLR query URL parameter (in full, name>.external.q). > h3. XJoinResults > A user implementation of this interface is returned by the getResults() > method of the XJoinResultsFactory implementation. It has methods: > * Object getResult(String joinId) - this should return a particular result > given the value of the join attribute > * Iterable getJoinIds() - this should return an ordered (ascending) > list of the join attribute values for all results of the external search > h3. XJoinSearchComponent > This is the central Java class of the contrib. It is a SOLR search component, > configured in solrconfig.xml and included in one or more SOLR request > handlers. There is one XJoin search component per external source, and each > has two main responsibilities: > * Before the SOLR search, it connects to the external source and retrieves > results, storing them in the SOLR request context > * After the SOLR search, it matches SOLR document in the results set and > external results via the join field, adding attributes from the external > results to documents in the SOLR results set > It takes the following initialisation parameters: > * factoryClass - this specifies the user-supplied class implementing > XJoinResultsFactory, used to generate external results > * joinField - this specifies the attribute on which to join between SOLR > documents and external results > * external - this parameter set is passed to configure the > XJoinResultsFactory implementation > For example, in solrconfig.xml: > {code:xml} > class="org.apache.solr.search.xjoin.XJoinSearchComponent"> > test.TestXJoinResultsFactory > id > > 1,2,3 > > > {code} > Here, the search component instantiates a new TextXJoinResultsFactory during > initialisation, and passes it the "values" parameter (1, 2, 3) to configure > it. To properly use the XJoinSearchComponent in a request handler, it must be > included at the start and end of the component list, and may be configured > with the following query parameters: > * results - a comma-separated list of attributes from the XJoinResults > implementation (created by the factory at search time) to be included in the > SOLR results > * fl - a comma-separat
[jira] [Updated] (SOLR-7341) xjoin - join data from external sources
[ https://issues.apache.org/jira/browse/SOLR-7341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom Winch updated SOLR-7341: Description: h2. XJoin The "xjoin" SOLR contrib allows external results to be joined with SOLR results in a query and the SOLR result set to be filtered by the results of an external query. Values from the external results are made available in the SOLR results and may also be used to boost the scores of corresponding documents during the search. The contrib consists of the Java classes XJoinSearchComponent, XJoinValueSourceParser and XJoinQParserPlugin (and associated classes), which must be configured in solrconfig.xml, and the interfaces XJoinResultsFactory and XJoinResults, which are implemented by the user to provide the link between SOLR and the external results source. External results and SOLR documents are matched via a single configurable attribute (the "join field"). The contrib JAR solr-xjoin-4.10.3.jar contains these classes and interfaces and should be included in SOLR's class path from solrconfig.xml, as should a JAR containing the user implementations of the previously mentioned interfaces. For example: {code:xml} .. .. .. {code} h2. Java classes and interfaces h3. XJoinResultsFactory The user implementation of this interface is responsible for connecting to an external source to perform a query (or otherwise collect results). Parameters with prefix ".external." are passed from the SOLR query URL to pararameterise the search. The interface has the following methods: * void init(NamedList args) - this is called during SOLR initialisation, and passed parameters from the search component configuration (see below) * XJoinResults getResults(SolrParams params) - this is called during a SOLR search to generate external results, and is passed parameters from the SOLR query URL (as above) For example, the implementation might perform queries of an external source based on the 'q' SOLR query URL parameter (in full, .external.q). h3. XJoinResults A user implementation of this interface is returned by the getResults() method of the XJoinResultsFactory implementation. It has methods: * Object getResult(String joinId) - this should return a particular result given the value of the join attribute * Iterable getJoinIds() - this should return an ordered (ascending) list of the join attribute values for all results of the external search h3. XJoinSearchComponent This is the central Java class of the contrib. It is a SOLR search component, configured in solrconfig.xml and included in one or more SOLR request handlers. There is one XJoin search component per external source, and each has two main responsibilities: * Before the SOLR search, it connects to the external source and retrieves results, storing them in the SOLR request context * After the SOLR search, it matches SOLR document in the results set and external results via the join field, adding attributes from the external results to documents in the SOLR results set It takes the following initialisation parameters: * factoryClass - this specifies the user-supplied class implementing XJoinResultsFactory, used to generate external results * joinField - this specifies the attribute on which to join between SOLR documents and external results * external - this parameter set is passed to configure the XJoinResultsFactory implementation For example, in solrconfig.xml: {code:xml} test.TestXJoinResultsFactory id 1,2,3 {code} Here, the search component instantiates a new TextXJoinResultsFactory during initialisation, and passes it the "values" parameter (1, 2, 3) to configure it. To properly use the XJoinSearchComponent in a request handler, it must be included at the start and end of the component list, and may be configured with the following query parameters: * results - a comma-separated list of attributes from the XJoinResults implementation (created by the factory at search time) to be included in the SOLR results * fl - a comma-separated list of attributes from results objects (contained in an XJoinResults implementation) to be included in the SOLR results For example: {code:xml} .. true xx test_count id,value xjoin_test xjoin_test {code} Note that, to include the list of join ids returned by the external source in the SOLR results (likely for debug purposes), the value 'join_ids' may be specified in the "results" parameter. h3. XJoinQParserPlugin This query parser plugin constructs a query from the results of the external searches, and is based on the TermsQParserPlugin. It takes the following local parameters: * method - as the TermsQParserPlugin, this specifies how to build the Lucene query based on the join ids contained in external results; one of termsFilter, booleanQuery, automaton, or docValuesTermsFilter
[jira] [Updated] (SOLR-7341) xjoin - join data from external sources
[ https://issues.apache.org/jira/browse/SOLR-7341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom Winch updated SOLR-7341: Attachment: (was: SOLR-7341.patch-5_3) > xjoin - join data from external sources > --- > > Key: SOLR-7341 > URL: https://issues.apache.org/jira/browse/SOLR-7341 > Project: Solr > Issue Type: New Feature > Components: search >Affects Versions: 4.10.3 >Reporter: Tom Winch >Priority: Minor > Fix For: Trunk > > > h2. XJoin > The "xjoin" SOLR contrib allows external results to be joined with SOLR > results in a query and the SOLR result set to be filtered by the results of > an external query. Values from the external results are made available in the > SOLR results and may also be used to boost the scores of corresponding > documents during the search. The contrib consists of the Java classes > XJoinSearchComponent, XJoinValueSourceParser and XJoinQParserPlugin (and > associated classes), which must be configured in solrconfig.xml, and the > interfaces XJoinResultsFactory and XJoinResults, which are implemented by the > user to provide the link between SOLR and the external results source. > External results and SOLR documents are matched via a single configurable > attribute (the "join field"). The contrib JAR solr-xjoin-4.10.3.jar contains > these classes and interfaces and should be included in SOLR's class path from > solrconfig.xml, as should a JAR containing the user implementations of the > previously mentioned interfaces. For example: > {code:xml} > > .. > >/> > .. > > > .. > > {code} > h2. Java classes and interfaces > h3. XJoinResultsFactory > The user implementation of this interface is responsible for connecting to an > external source to perform a query (or otherwise collect results). Parameters > with prefix ".external." are passed from the SOLR query URL > to pararameterise the search. The interface has the following methods: > * void init(NamedList args) - this is called during SOLR initialisation, and > passed parameters from the search component configuration (see below) > * XJoinResults getResults(SolrParams params) - this is called during a SOLR > search to generate external results, and is passed parameters from the SOLR > query URL (as above) > For example, the implementation might perform queries of an external source > based on the 'q' SOLR query URL parameter (in full, name>.external.q). > h3. XJoinResults > A user implementation of this interface is returned by the getResults() > method of the XJoinResultsFactory implementation. It has methods: > * Object getResult(String joinId) - this should return a particular result > given the value of the join attribute > * Iterable getJoinIds() - this should return an ordered (ascending) > list of the join attribute values for all results of the external search > h3. XJoinSearchComponent > This is the central Java class of the contrib. It is a SOLR search component, > configured in solrconfig.xml and included in one or more SOLR request > handlers. There is one XJoin search component per external source, and each > has two main responsibilities: > * Before the SOLR search, it connects to the external source and retrieves > results, storing them in the SOLR request context > * After the SOLR search, it matches SOLR document in the results set and > external results via the join field, adding attributes from the external > results to documents in the SOLR results set > It takes the following initialisation parameters: > * factoryClass - this specifies the user-supplied class implementing > XJoinResultsFactory, used to generate external results > * joinField - this specifies the attribute on which to join between SOLR > documents and external results > * external - this parameter set is passed to configure the > XJoinResultsFactory implementation > For example, in solrconfig.xml: > {code:xml} > class="org.apache.solr.search.xjoin.XJoinSearchComponent"> > test.TestXJoinResultsFactory > id > > 1,2,3 > > > {code} > Here, the search component instantiates a new TextXJoinResultsFactory during > initialisation, and passes it the "values" parameter (1, 2, 3) to configure > it. To properly use the XJoinSearchComponent in a request handler, it must be > included at the start and end of the component list, and may be configured > with the following query parameters: > * results - a comma-separated list of attributes from the XJoinResults > implementation (created by the factory at search time) to be included in the > SOLR results > * fl - a comma-separated list of attributes from results objects (contained > in an XJoinResults implementation) to be included in the SOLR results > For example: > {code:xml} > > > .. > true > xx > test_coun
[jira] [Updated] (SOLR-7341) xjoin - join data from external sources
[ https://issues.apache.org/jira/browse/SOLR-7341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom Winch updated SOLR-7341: Attachment: (was: SOLR-7341.patch-trunk) > xjoin - join data from external sources > --- > > Key: SOLR-7341 > URL: https://issues.apache.org/jira/browse/SOLR-7341 > Project: Solr > Issue Type: New Feature > Components: search >Affects Versions: 4.10.3 >Reporter: Tom Winch >Priority: Minor > Fix For: Trunk > > > h2. XJoin > The "xjoin" SOLR contrib allows external results to be joined with SOLR > results in a query and the SOLR result set to be filtered by the results of > an external query. Values from the external results are made available in the > SOLR results and may also be used to boost the scores of corresponding > documents during the search. The contrib consists of the Java classes > XJoinSearchComponent, XJoinValueSourceParser and XJoinQParserPlugin (and > associated classes), which must be configured in solrconfig.xml, and the > interfaces XJoinResultsFactory and XJoinResults, which are implemented by the > user to provide the link between SOLR and the external results source. > External results and SOLR documents are matched via a single configurable > attribute (the "join field"). The contrib JAR solr-xjoin-4.10.3.jar contains > these classes and interfaces and should be included in SOLR's class path from > solrconfig.xml, as should a JAR containing the user implementations of the > previously mentioned interfaces. For example: > {code:xml} > > .. > >/> > .. > > > .. > > {code} > h2. Java classes and interfaces > h3. XJoinResultsFactory > The user implementation of this interface is responsible for connecting to an > external source to perform a query (or otherwise collect results). Parameters > with prefix ".external." are passed from the SOLR query URL > to pararameterise the search. The interface has the following methods: > * void init(NamedList args) - this is called during SOLR initialisation, and > passed parameters from the search component configuration (see below) > * XJoinResults getResults(SolrParams params) - this is called during a SOLR > search to generate external results, and is passed parameters from the SOLR > query URL (as above) > For example, the implementation might perform queries of an external source > based on the 'q' SOLR query URL parameter (in full, name>.external.q). > h3. XJoinResults > A user implementation of this interface is returned by the getResults() > method of the XJoinResultsFactory implementation. It has methods: > * Object getResult(String joinId) - this should return a particular result > given the value of the join attribute > * Iterable getJoinIds() - this should return an ordered (ascending) > list of the join attribute values for all results of the external search > h3. XJoinSearchComponent > This is the central Java class of the contrib. It is a SOLR search component, > configured in solrconfig.xml and included in one or more SOLR request > handlers. There is one XJoin search component per external source, and each > has two main responsibilities: > * Before the SOLR search, it connects to the external source and retrieves > results, storing them in the SOLR request context > * After the SOLR search, it matches SOLR document in the results set and > external results via the join field, adding attributes from the external > results to documents in the SOLR results set > It takes the following initialisation parameters: > * factoryClass - this specifies the user-supplied class implementing > XJoinResultsFactory, used to generate external results > * joinField - this specifies the attribute on which to join between SOLR > documents and external results > * external - this parameter set is passed to configure the > XJoinResultsFactory implementation > For example, in solrconfig.xml: > {code:xml} > class="org.apache.solr.search.xjoin.XJoinSearchComponent"> > test.TestXJoinResultsFactory > id > > 1,2,3 > > > {code} > Here, the search component instantiates a new TextXJoinResultsFactory during > initialisation, and passes it the "values" parameter (1, 2, 3) to configure > it. To properly use the XJoinSearchComponent in a request handler, it must be > included at the start and end of the component list, and may be configured > with the following query parameters: > * results - a comma-separated list of attributes from the XJoinResults > implementation (created by the factory at search time) to be included in the > SOLR results > * fl - a comma-separated list of attributes from results objects (contained > in an XJoinResults implementation) to be included in the SOLR results > For example: > {code:xml} > > > .. > true > xx > test_co
[jira] [Updated] (SOLR-7341) xjoin - join data from external sources
[ https://issues.apache.org/jira/browse/SOLR-7341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom Winch updated SOLR-7341: Attachment: SOLR-7341.patch-5_3 > xjoin - join data from external sources > --- > > Key: SOLR-7341 > URL: https://issues.apache.org/jira/browse/SOLR-7341 > Project: Solr > Issue Type: New Feature > Components: search >Affects Versions: 4.10.3 >Reporter: Tom Winch >Priority: Minor > Fix For: Trunk > > Attachments: SOLR-7341.patch-5_3, SOLR-7341.patch-trunk > > > h2. XJoin > The "xjoin" SOLR contrib allows external results to be joined with SOLR > results in a query and the SOLR result set to be filtered by the results of > an external query. Values from the external results are made available in the > SOLR results and may also be used to boost the scores of corresponding > documents during the search. The contrib consists of the Java classes > XJoinSearchComponent, XJoinValueSourceParser and XJoinQParserPlugin (and > associated classes), which must be configured in solrconfig.xml, and the > interfaces XJoinResultsFactory and XJoinResults, which are implemented by the > user to provide the link between SOLR and the external results source. > External results and SOLR documents are matched via a single configurable > attribute (the "join field"). The contrib JAR solr-xjoin-4.10.3.jar contains > these classes and interfaces and should be included in SOLR's class path from > solrconfig.xml, as should a JAR containing the user implementations of the > previously mentioned interfaces. For example: > {code:xml} > > .. > >/> > .. > > > .. > > {code} > h2. Java classes and interfaces > h3. XJoinResultsFactory > The user implementation of this interface is responsible for connecting to an > external source to perform a query (or otherwise collect results). Parameters > with prefix ".external." are passed from the SOLR query URL > to pararameterise the search. The interface has the following methods: > * void init(NamedList args) - this is called during SOLR initialisation, and > passed parameters from the search component configuration (see below) > * XJoinResults getResults(SolrParams params) - this is called during a SOLR > search to generate external results, and is passed parameters from the SOLR > query URL (as above) > For example, the implementation might perform queries of an external source > based on the 'q' SOLR query URL parameter (in full, name>.external.q). > h3. XJoinResults > A user implementation of this interface is returned by the getResults() > method of the XJoinResultsFactory implementation. It has methods: > * Object getResult(String joinId) - this should return a particular result > given the value of the join attribute > * Iterable getJoinIds() - this should return an ordered (ascending) > list of the join attribute values for all results of the external search > h3. XJoinSearchComponent > This is the central Java class of the contrib. It is a SOLR search component, > configured in solrconfig.xml and included in one or more SOLR request > handlers. There is one XJoin search component per external source, and each > has two main responsibilities: > * Before the SOLR search, it connects to the external source and retrieves > results, storing them in the SOLR request context > * After the SOLR search, it matches SOLR document in the results set and > external results via the join field, adding attributes from the external > results to documents in the SOLR results set > It takes the following initialisation parameters: > * factoryClass - this specifies the user-supplied class implementing > XJoinResultsFactory, used to generate external results > * joinField - this specifies the attribute on which to join between SOLR > documents and external results > * external - this parameter set is passed to configure the > XJoinResultsFactory implementation > For example, in solrconfig.xml: > {code:xml} > class="org.apache.solr.search.xjoin.XJoinSearchComponent"> > test.TestXJoinResultsFactory > id > > 1,2,3 > > > {code} > Here, the search component instantiates a new TextXJoinResultsFactory during > initialisation, and passes it the "values" parameter (1, 2, 3) to configure > it. To properly use the XJoinSearchComponent in a request handler, it must be > included at the start and end of the component list, and may be configured > with the following query parameters: > * results - a comma-separated list of attributes from the XJoinResults > implementation (created by the factory at search time) to be included in the > SOLR results > * fl - a comma-separated list of attributes from results objects (contained > in an XJoinResults implementation) to be included in the SOLR results > For example: > {code:
[jira] [Updated] (SOLR-7341) xjoin - join data from external sources
[ https://issues.apache.org/jira/browse/SOLR-7341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom Winch updated SOLR-7341: Attachment: (was: SOLR-7341.patch-trunk) > xjoin - join data from external sources > --- > > Key: SOLR-7341 > URL: https://issues.apache.org/jira/browse/SOLR-7341 > Project: Solr > Issue Type: New Feature > Components: search >Affects Versions: 4.10.3 >Reporter: Tom Winch >Priority: Minor > Fix For: Trunk > > Attachments: SOLR-7341.patch-trunk > > > h2. XJoin > The "xjoin" SOLR contrib allows external results to be joined with SOLR > results in a query and the SOLR result set to be filtered by the results of > an external query. Values from the external results are made available in the > SOLR results and may also be used to boost the scores of corresponding > documents during the search. The contrib consists of the Java classes > XJoinSearchComponent, XJoinValueSourceParser and XJoinQParserPlugin (and > associated classes), which must be configured in solrconfig.xml, and the > interfaces XJoinResultsFactory and XJoinResults, which are implemented by the > user to provide the link between SOLR and the external results source. > External results and SOLR documents are matched via a single configurable > attribute (the "join field"). The contrib JAR solr-xjoin-4.10.3.jar contains > these classes and interfaces and should be included in SOLR's class path from > solrconfig.xml, as should a JAR containing the user implementations of the > previously mentioned interfaces. For example: > {code:xml} > > .. > >/> > .. > > > .. > > {code} > h2. Java classes and interfaces > h3. XJoinResultsFactory > The user implementation of this interface is responsible for connecting to an > external source to perform a query (or otherwise collect results). Parameters > with prefix ".external." are passed from the SOLR query URL > to pararameterise the search. The interface has the following methods: > * void init(NamedList args) - this is called during SOLR initialisation, and > passed parameters from the search component configuration (see below) > * XJoinResults getResults(SolrParams params) - this is called during a SOLR > search to generate external results, and is passed parameters from the SOLR > query URL (as above) > For example, the implementation might perform queries of an external source > based on the 'q' SOLR query URL parameter (in full, name>.external.q). > h3. XJoinResults > A user implementation of this interface is returned by the getResults() > method of the XJoinResultsFactory implementation. It has methods: > * Object getResult(String joinId) - this should return a particular result > given the value of the join attribute > * Iterable getJoinIds() - this should return an ordered (ascending) > list of the join attribute values for all results of the external search > h3. XJoinSearchComponent > This is the central Java class of the contrib. It is a SOLR search component, > configured in solrconfig.xml and included in one or more SOLR request > handlers. There is one XJoin search component per external source, and each > has two main responsibilities: > * Before the SOLR search, it connects to the external source and retrieves > results, storing them in the SOLR request context > * After the SOLR search, it matches SOLR document in the results set and > external results via the join field, adding attributes from the external > results to documents in the SOLR results set > It takes the following initialisation parameters: > * factoryClass - this specifies the user-supplied class implementing > XJoinResultsFactory, used to generate external results > * joinField - this specifies the attribute on which to join between SOLR > documents and external results > * external - this parameter set is passed to configure the > XJoinResultsFactory implementation > For example, in solrconfig.xml: > {code:xml} > class="org.apache.solr.search.xjoin.XJoinSearchComponent"> > test.TestXJoinResultsFactory > id > > 1,2,3 > > > {code} > Here, the search component instantiates a new TextXJoinResultsFactory during > initialisation, and passes it the "values" parameter (1, 2, 3) to configure > it. To properly use the XJoinSearchComponent in a request handler, it must be > included at the start and end of the component list, and may be configured > with the following query parameters: > * results - a comma-separated list of attributes from the XJoinResults > implementation (created by the factory at search time) to be included in the > SOLR results > * fl - a comma-separated list of attributes from results objects (contained > in an XJoinResults implementation) to be included in the SOLR results > For example: > {code:xml} >
[jira] [Updated] (SOLR-7341) xjoin - join data from external sources
[ https://issues.apache.org/jira/browse/SOLR-7341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom Winch updated SOLR-7341: Attachment: (was: SOLR-7341.patch) > xjoin - join data from external sources > --- > > Key: SOLR-7341 > URL: https://issues.apache.org/jira/browse/SOLR-7341 > Project: Solr > Issue Type: New Feature > Components: search >Affects Versions: 4.10.3 >Reporter: Tom Winch >Priority: Minor > Fix For: Trunk > > Attachments: SOLR-7341.patch-trunk > > > h2. XJoin > The "xjoin" SOLR contrib allows external results to be joined with SOLR > results in a query and the SOLR result set to be filtered by the results of > an external query. Values from the external results are made available in the > SOLR results and may also be used to boost the scores of corresponding > documents during the search. The contrib consists of the Java classes > XJoinSearchComponent, XJoinValueSourceParser and XJoinQParserPlugin (and > associated classes), which must be configured in solrconfig.xml, and the > interfaces XJoinResultsFactory and XJoinResults, which are implemented by the > user to provide the link between SOLR and the external results source. > External results and SOLR documents are matched via a single configurable > attribute (the "join field"). The contrib JAR solr-xjoin-4.10.3.jar contains > these classes and interfaces and should be included in SOLR's class path from > solrconfig.xml, as should a JAR containing the user implementations of the > previously mentioned interfaces. For example: > {code:xml} > > .. > >/> > .. > > > .. > > {code} > h2. Java classes and interfaces > h3. XJoinResultsFactory > The user implementation of this interface is responsible for connecting to an > external source to perform a query (or otherwise collect results). Parameters > with prefix ".external." are passed from the SOLR query URL > to pararameterise the search. The interface has the following methods: > * void init(NamedList args) - this is called during SOLR initialisation, and > passed parameters from the search component configuration (see below) > * XJoinResults getResults(SolrParams params) - this is called during a SOLR > search to generate external results, and is passed parameters from the SOLR > query URL (as above) > For example, the implementation might perform queries of an external source > based on the 'q' SOLR query URL parameter (in full, name>.external.q). > h3. XJoinResults > A user implementation of this interface is returned by the getResults() > method of the XJoinResultsFactory implementation. It has methods: > * Object getResult(String joinId) - this should return a particular result > given the value of the join attribute > * Iterable getJoinIds() - this should return an ordered (ascending) > list of the join attribute values for all results of the external search > h3. XJoinSearchComponent > This is the central Java class of the contrib. It is a SOLR search component, > configured in solrconfig.xml and included in one or more SOLR request > handlers. There is one XJoin search component per external source, and each > has two main responsibilities: > * Before the SOLR search, it connects to the external source and retrieves > results, storing them in the SOLR request context > * After the SOLR search, it matches SOLR document in the results set and > external results via the join field, adding attributes from the external > results to documents in the SOLR results set > It takes the following initialisation parameters: > * factoryClass - this specifies the user-supplied class implementing > XJoinResultsFactory, used to generate external results > * joinField - this specifies the attribute on which to join between SOLR > documents and external results > * external - this parameter set is passed to configure the > XJoinResultsFactory implementation > For example, in solrconfig.xml: > {code:xml} > class="org.apache.solr.search.xjoin.XJoinSearchComponent"> > test.TestXJoinResultsFactory > id > > 1,2,3 > > > {code} > Here, the search component instantiates a new TextXJoinResultsFactory during > initialisation, and passes it the "values" parameter (1, 2, 3) to configure > it. To properly use the XJoinSearchComponent in a request handler, it must be > included at the start and end of the component list, and may be configured > with the following query parameters: > * results - a comma-separated list of attributes from the XJoinResults > implementation (created by the factory at search time) to be included in the > SOLR results > * fl - a comma-separated list of attributes from results objects (contained > in an XJoinResults implementation) to be included in the SOLR results > For example: > {code:xml} > > >
[jira] [Updated] (SOLR-7341) xjoin - join data from external sources
[ https://issues.apache.org/jira/browse/SOLR-7341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom Winch updated SOLR-7341: Attachment: (was: SOLR-7341.patch-trunk) > xjoin - join data from external sources > --- > > Key: SOLR-7341 > URL: https://issues.apache.org/jira/browse/SOLR-7341 > Project: Solr > Issue Type: New Feature > Components: search >Affects Versions: 4.10.3 >Reporter: Tom Winch >Priority: Minor > Fix For: Trunk > > Attachments: SOLR-7341.patch-trunk > > > h2. XJoin > The "xjoin" SOLR contrib allows external results to be joined with SOLR > results in a query and the SOLR result set to be filtered by the results of > an external query. Values from the external results are made available in the > SOLR results and may also be used to boost the scores of corresponding > documents during the search. The contrib consists of the Java classes > XJoinSearchComponent, XJoinValueSourceParser and XJoinQParserPlugin (and > associated classes), which must be configured in solrconfig.xml, and the > interfaces XJoinResultsFactory and XJoinResults, which are implemented by the > user to provide the link between SOLR and the external results source. > External results and SOLR documents are matched via a single configurable > attribute (the "join field"). The contrib JAR solr-xjoin-4.10.3.jar contains > these classes and interfaces and should be included in SOLR's class path from > solrconfig.xml, as should a JAR containing the user implementations of the > previously mentioned interfaces. For example: > {code:xml} > > .. > >/> > .. > > > .. > > {code} > h2. Java classes and interfaces > h3. XJoinResultsFactory > The user implementation of this interface is responsible for connecting to an > external source to perform a query (or otherwise collect results). Parameters > with prefix ".external." are passed from the SOLR query URL > to pararameterise the search. The interface has the following methods: > * void init(NamedList args) - this is called during SOLR initialisation, and > passed parameters from the search component configuration (see below) > * XJoinResults getResults(SolrParams params) - this is called during a SOLR > search to generate external results, and is passed parameters from the SOLR > query URL (as above) > For example, the implementation might perform queries of an external source > based on the 'q' SOLR query URL parameter (in full, name>.external.q). > h3. XJoinResults > A user implementation of this interface is returned by the getResults() > method of the XJoinResultsFactory implementation. It has methods: > * Object getResult(String joinId) - this should return a particular result > given the value of the join attribute > * Iterable getJoinIds() - this should return an ordered (ascending) > list of the join attribute values for all results of the external search > h3. XJoinSearchComponent > This is the central Java class of the contrib. It is a SOLR search component, > configured in solrconfig.xml and included in one or more SOLR request > handlers. There is one XJoin search component per external source, and each > has two main responsibilities: > * Before the SOLR search, it connects to the external source and retrieves > results, storing them in the SOLR request context > * After the SOLR search, it matches SOLR document in the results set and > external results via the join field, adding attributes from the external > results to documents in the SOLR results set > It takes the following initialisation parameters: > * factoryClass - this specifies the user-supplied class implementing > XJoinResultsFactory, used to generate external results > * joinField - this specifies the attribute on which to join between SOLR > documents and external results > * external - this parameter set is passed to configure the > XJoinResultsFactory implementation > For example, in solrconfig.xml: > {code:xml} > class="org.apache.solr.search.xjoin.XJoinSearchComponent"> > test.TestXJoinResultsFactory > id > > 1,2,3 > > > {code} > Here, the search component instantiates a new TextXJoinResultsFactory during > initialisation, and passes it the "values" parameter (1, 2, 3) to configure > it. To properly use the XJoinSearchComponent in a request handler, it must be > included at the start and end of the component list, and may be configured > with the following query parameters: > * results - a comma-separated list of attributes from the XJoinResults > implementation (created by the factory at search time) to be included in the > SOLR results > * fl - a comma-separated list of attributes from results objects (contained > in an XJoinResults implementation) to be included in the SOLR results > For example: > {code:xml} >
[jira] [Updated] (SOLR-7341) xjoin - join data from external sources
[ https://issues.apache.org/jira/browse/SOLR-7341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom Winch updated SOLR-7341: Attachment: (was: SOLR-7341.patch-5_3) > xjoin - join data from external sources > --- > > Key: SOLR-7341 > URL: https://issues.apache.org/jira/browse/SOLR-7341 > Project: Solr > Issue Type: New Feature > Components: search >Affects Versions: 4.10.3 >Reporter: Tom Winch >Priority: Minor > Fix For: Trunk > > Attachments: SOLR-7341.patch-trunk > > > h2. XJoin > The "xjoin" SOLR contrib allows external results to be joined with SOLR > results in a query and the SOLR result set to be filtered by the results of > an external query. Values from the external results are made available in the > SOLR results and may also be used to boost the scores of corresponding > documents during the search. The contrib consists of the Java classes > XJoinSearchComponent, XJoinValueSourceParser and XJoinQParserPlugin (and > associated classes), which must be configured in solrconfig.xml, and the > interfaces XJoinResultsFactory and XJoinResults, which are implemented by the > user to provide the link between SOLR and the external results source. > External results and SOLR documents are matched via a single configurable > attribute (the "join field"). The contrib JAR solr-xjoin-4.10.3.jar contains > these classes and interfaces and should be included in SOLR's class path from > solrconfig.xml, as should a JAR containing the user implementations of the > previously mentioned interfaces. For example: > {code:xml} > > .. > >/> > .. > > > .. > > {code} > h2. Java classes and interfaces > h3. XJoinResultsFactory > The user implementation of this interface is responsible for connecting to an > external source to perform a query (or otherwise collect results). Parameters > with prefix ".external." are passed from the SOLR query URL > to pararameterise the search. The interface has the following methods: > * void init(NamedList args) - this is called during SOLR initialisation, and > passed parameters from the search component configuration (see below) > * XJoinResults getResults(SolrParams params) - this is called during a SOLR > search to generate external results, and is passed parameters from the SOLR > query URL (as above) > For example, the implementation might perform queries of an external source > based on the 'q' SOLR query URL parameter (in full, name>.external.q). > h3. XJoinResults > A user implementation of this interface is returned by the getResults() > method of the XJoinResultsFactory implementation. It has methods: > * Object getResult(String joinId) - this should return a particular result > given the value of the join attribute > * Iterable getJoinIds() - this should return an ordered (ascending) > list of the join attribute values for all results of the external search > h3. XJoinSearchComponent > This is the central Java class of the contrib. It is a SOLR search component, > configured in solrconfig.xml and included in one or more SOLR request > handlers. There is one XJoin search component per external source, and each > has two main responsibilities: > * Before the SOLR search, it connects to the external source and retrieves > results, storing them in the SOLR request context > * After the SOLR search, it matches SOLR document in the results set and > external results via the join field, adding attributes from the external > results to documents in the SOLR results set > It takes the following initialisation parameters: > * factoryClass - this specifies the user-supplied class implementing > XJoinResultsFactory, used to generate external results > * joinField - this specifies the attribute on which to join between SOLR > documents and external results > * external - this parameter set is passed to configure the > XJoinResultsFactory implementation > For example, in solrconfig.xml: > {code:xml} > class="org.apache.solr.search.xjoin.XJoinSearchComponent"> > test.TestXJoinResultsFactory > id > > 1,2,3 > > > {code} > Here, the search component instantiates a new TextXJoinResultsFactory during > initialisation, and passes it the "values" parameter (1, 2, 3) to configure > it. To properly use the XJoinSearchComponent in a request handler, it must be > included at the start and end of the component list, and may be configured > with the following query parameters: > * results - a comma-separated list of attributes from the XJoinResults > implementation (created by the factory at search time) to be included in the > SOLR results > * fl - a comma-separated list of attributes from results objects (contained > in an XJoinResults implementation) to be included in the SOLR results > For example: > {code:xml} > >
[jira] [Updated] (SOLR-7341) xjoin - join data from external sources
[ https://issues.apache.org/jira/browse/SOLR-7341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom Winch updated SOLR-7341: Attachment: (was: SOLR-7341.patch) > xjoin - join data from external sources > --- > > Key: SOLR-7341 > URL: https://issues.apache.org/jira/browse/SOLR-7341 > Project: Solr > Issue Type: New Feature > Components: search >Affects Versions: 4.10.3 >Reporter: Tom Winch >Priority: Minor > Fix For: Trunk > > Attachments: SOLR-7341.patch-trunk > > > h2. XJoin > The "xjoin" SOLR contrib allows external results to be joined with SOLR > results in a query and the SOLR result set to be filtered by the results of > an external query. Values from the external results are made available in the > SOLR results and may also be used to boost the scores of corresponding > documents during the search. The contrib consists of the Java classes > XJoinSearchComponent, XJoinValueSourceParser and XJoinQParserPlugin (and > associated classes), which must be configured in solrconfig.xml, and the > interfaces XJoinResultsFactory and XJoinResults, which are implemented by the > user to provide the link between SOLR and the external results source. > External results and SOLR documents are matched via a single configurable > attribute (the "join field"). The contrib JAR solr-xjoin-4.10.3.jar contains > these classes and interfaces and should be included in SOLR's class path from > solrconfig.xml, as should a JAR containing the user implementations of the > previously mentioned interfaces. For example: > {code:xml} > > .. > >/> > .. > > > .. > > {code} > h2. Java classes and interfaces > h3. XJoinResultsFactory > The user implementation of this interface is responsible for connecting to an > external source to perform a query (or otherwise collect results). Parameters > with prefix ".external." are passed from the SOLR query URL > to pararameterise the search. The interface has the following methods: > * void init(NamedList args) - this is called during SOLR initialisation, and > passed parameters from the search component configuration (see below) > * XJoinResults getResults(SolrParams params) - this is called during a SOLR > search to generate external results, and is passed parameters from the SOLR > query URL (as above) > For example, the implementation might perform queries of an external source > based on the 'q' SOLR query URL parameter (in full, name>.external.q). > h3. XJoinResults > A user implementation of this interface is returned by the getResults() > method of the XJoinResultsFactory implementation. It has methods: > * Object getResult(String joinId) - this should return a particular result > given the value of the join attribute > * Iterable getJoinIds() - this should return an ordered (ascending) > list of the join attribute values for all results of the external search > h3. XJoinSearchComponent > This is the central Java class of the contrib. It is a SOLR search component, > configured in solrconfig.xml and included in one or more SOLR request > handlers. There is one XJoin search component per external source, and each > has two main responsibilities: > * Before the SOLR search, it connects to the external source and retrieves > results, storing them in the SOLR request context > * After the SOLR search, it matches SOLR document in the results set and > external results via the join field, adding attributes from the external > results to documents in the SOLR results set > It takes the following initialisation parameters: > * factoryClass - this specifies the user-supplied class implementing > XJoinResultsFactory, used to generate external results > * joinField - this specifies the attribute on which to join between SOLR > documents and external results > * external - this parameter set is passed to configure the > XJoinResultsFactory implementation > For example, in solrconfig.xml: > {code:xml} > class="org.apache.solr.search.xjoin.XJoinSearchComponent"> > test.TestXJoinResultsFactory > id > > 1,2,3 > > > {code} > Here, the search component instantiates a new TextXJoinResultsFactory during > initialisation, and passes it the "values" parameter (1, 2, 3) to configure > it. To properly use the XJoinSearchComponent in a request handler, it must be > included at the start and end of the component list, and may be configured > with the following query parameters: > * results - a comma-separated list of attributes from the XJoinResults > implementation (created by the factory at search time) to be included in the > SOLR results > * fl - a comma-separated list of attributes from results objects (contained > in an XJoinResults implementation) to be included in the SOLR results > For example: > {code:xml} > > >
[jira] [Updated] (SOLR-7341) xjoin - join data from external sources
[ https://issues.apache.org/jira/browse/SOLR-7341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom Winch updated SOLR-7341: Attachment: (was: SOLR-7341.patch) > xjoin - join data from external sources > --- > > Key: SOLR-7341 > URL: https://issues.apache.org/jira/browse/SOLR-7341 > Project: Solr > Issue Type: New Feature > Components: search >Affects Versions: 4.10.3 >Reporter: Tom Winch >Priority: Minor > Fix For: Trunk > > Attachments: SOLR-7341.patch-trunk > > > h2. XJoin > The "xjoin" SOLR contrib allows external results to be joined with SOLR > results in a query and the SOLR result set to be filtered by the results of > an external query. Values from the external results are made available in the > SOLR results and may also be used to boost the scores of corresponding > documents during the search. The contrib consists of the Java classes > XJoinSearchComponent, XJoinValueSourceParser and XJoinQParserPlugin (and > associated classes), which must be configured in solrconfig.xml, and the > interfaces XJoinResultsFactory and XJoinResults, which are implemented by the > user to provide the link between SOLR and the external results source. > External results and SOLR documents are matched via a single configurable > attribute (the "join field"). The contrib JAR solr-xjoin-4.10.3.jar contains > these classes and interfaces and should be included in SOLR's class path from > solrconfig.xml, as should a JAR containing the user implementations of the > previously mentioned interfaces. For example: > {code:xml} > > .. > >/> > .. > > > .. > > {code} > h2. Java classes and interfaces > h3. XJoinResultsFactory > The user implementation of this interface is responsible for connecting to an > external source to perform a query (or otherwise collect results). Parameters > with prefix ".external." are passed from the SOLR query URL > to pararameterise the search. The interface has the following methods: > * void init(NamedList args) - this is called during SOLR initialisation, and > passed parameters from the search component configuration (see below) > * XJoinResults getResults(SolrParams params) - this is called during a SOLR > search to generate external results, and is passed parameters from the SOLR > query URL (as above) > For example, the implementation might perform queries of an external source > based on the 'q' SOLR query URL parameter (in full, name>.external.q). > h3. XJoinResults > A user implementation of this interface is returned by the getResults() > method of the XJoinResultsFactory implementation. It has methods: > * Object getResult(String joinId) - this should return a particular result > given the value of the join attribute > * Iterable getJoinIds() - this should return an ordered (ascending) > list of the join attribute values for all results of the external search > h3. XJoinSearchComponent > This is the central Java class of the contrib. It is a SOLR search component, > configured in solrconfig.xml and included in one or more SOLR request > handlers. There is one XJoin search component per external source, and each > has two main responsibilities: > * Before the SOLR search, it connects to the external source and retrieves > results, storing them in the SOLR request context > * After the SOLR search, it matches SOLR document in the results set and > external results via the join field, adding attributes from the external > results to documents in the SOLR results set > It takes the following initialisation parameters: > * factoryClass - this specifies the user-supplied class implementing > XJoinResultsFactory, used to generate external results > * joinField - this specifies the attribute on which to join between SOLR > documents and external results > * external - this parameter set is passed to configure the > XJoinResultsFactory implementation > For example, in solrconfig.xml: > {code:xml} > class="org.apache.solr.search.xjoin.XJoinSearchComponent"> > test.TestXJoinResultsFactory > id > > 1,2,3 > > > {code} > Here, the search component instantiates a new TextXJoinResultsFactory during > initialisation, and passes it the "values" parameter (1, 2, 3) to configure > it. To properly use the XJoinSearchComponent in a request handler, it must be > included at the start and end of the component list, and may be configured > with the following query parameters: > * results - a comma-separated list of attributes from the XJoinResults > implementation (created by the factory at search time) to be included in the > SOLR results > * fl - a comma-separated list of attributes from results objects (contained > in an XJoinResults implementation) to be included in the SOLR results > For example: > {code:xml} > > >
[jira] [Updated] (SOLR-7341) xjoin - join data from external sources
[ https://issues.apache.org/jira/browse/SOLR-7341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom Winch updated SOLR-7341: Attachment: (was: SOLR-7341.patch) > xjoin - join data from external sources > --- > > Key: SOLR-7341 > URL: https://issues.apache.org/jira/browse/SOLR-7341 > Project: Solr > Issue Type: New Feature > Components: search >Affects Versions: 4.10.3 >Reporter: Tom Winch >Priority: Minor > Fix For: Trunk > > Attachments: SOLR-7341.patch-trunk > > > h2. XJoin > The "xjoin" SOLR contrib allows external results to be joined with SOLR > results in a query and the SOLR result set to be filtered by the results of > an external query. Values from the external results are made available in the > SOLR results and may also be used to boost the scores of corresponding > documents during the search. The contrib consists of the Java classes > XJoinSearchComponent, XJoinValueSourceParser and XJoinQParserPlugin (and > associated classes), which must be configured in solrconfig.xml, and the > interfaces XJoinResultsFactory and XJoinResults, which are implemented by the > user to provide the link between SOLR and the external results source. > External results and SOLR documents are matched via a single configurable > attribute (the "join field"). The contrib JAR solr-xjoin-4.10.3.jar contains > these classes and interfaces and should be included in SOLR's class path from > solrconfig.xml, as should a JAR containing the user implementations of the > previously mentioned interfaces. For example: > {code:xml} > > .. > >/> > .. > > > .. > > {code} > h2. Java classes and interfaces > h3. XJoinResultsFactory > The user implementation of this interface is responsible for connecting to an > external source to perform a query (or otherwise collect results). Parameters > with prefix ".external." are passed from the SOLR query URL > to pararameterise the search. The interface has the following methods: > * void init(NamedList args) - this is called during SOLR initialisation, and > passed parameters from the search component configuration (see below) > * XJoinResults getResults(SolrParams params) - this is called during a SOLR > search to generate external results, and is passed parameters from the SOLR > query URL (as above) > For example, the implementation might perform queries of an external source > based on the 'q' SOLR query URL parameter (in full, name>.external.q). > h3. XJoinResults > A user implementation of this interface is returned by the getResults() > method of the XJoinResultsFactory implementation. It has methods: > * Object getResult(String joinId) - this should return a particular result > given the value of the join attribute > * Iterable getJoinIds() - this should return an ordered (ascending) > list of the join attribute values for all results of the external search > h3. XJoinSearchComponent > This is the central Java class of the contrib. It is a SOLR search component, > configured in solrconfig.xml and included in one or more SOLR request > handlers. There is one XJoin search component per external source, and each > has two main responsibilities: > * Before the SOLR search, it connects to the external source and retrieves > results, storing them in the SOLR request context > * After the SOLR search, it matches SOLR document in the results set and > external results via the join field, adding attributes from the external > results to documents in the SOLR results set > It takes the following initialisation parameters: > * factoryClass - this specifies the user-supplied class implementing > XJoinResultsFactory, used to generate external results > * joinField - this specifies the attribute on which to join between SOLR > documents and external results > * external - this parameter set is passed to configure the > XJoinResultsFactory implementation > For example, in solrconfig.xml: > {code:xml} > class="org.apache.solr.search.xjoin.XJoinSearchComponent"> > test.TestXJoinResultsFactory > id > > 1,2,3 > > > {code} > Here, the search component instantiates a new TextXJoinResultsFactory during > initialisation, and passes it the "values" parameter (1, 2, 3) to configure > it. To properly use the XJoinSearchComponent in a request handler, it must be > included at the start and end of the component list, and may be configured > with the following query parameters: > * results - a comma-separated list of attributes from the XJoinResults > implementation (created by the factory at search time) to be included in the > SOLR results > * fl - a comma-separated list of attributes from results objects (contained > in an XJoinResults implementation) to be included in the SOLR results > For example: > {code:xml} > > >
[jira] [Updated] (SOLR-7341) xjoin - join data from external sources
[ https://issues.apache.org/jira/browse/SOLR-7341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom Winch updated SOLR-7341: Attachment: (was: SOLR-7341.patch) > xjoin - join data from external sources > --- > > Key: SOLR-7341 > URL: https://issues.apache.org/jira/browse/SOLR-7341 > Project: Solr > Issue Type: New Feature > Components: search >Affects Versions: 4.10.3 >Reporter: Tom Winch >Priority: Minor > Fix For: Trunk > > Attachments: SOLR-7341.patch, SOLR-7341.patch, SOLR-7341.patch, > SOLR-7341.patch, SOLR-7341.patch-5_3, SOLR-7341.patch-trunk, > SOLR-7341.patch-trunk, SOLR-7341.patch-trunk > > > h2. XJoin > The "xjoin" SOLR contrib allows external results to be joined with SOLR > results in a query and the SOLR result set to be filtered by the results of > an external query. Values from the external results are made available in the > SOLR results and may also be used to boost the scores of corresponding > documents during the search. The contrib consists of the Java classes > XJoinSearchComponent, XJoinValueSourceParser and XJoinQParserPlugin (and > associated classes), which must be configured in solrconfig.xml, and the > interfaces XJoinResultsFactory and XJoinResults, which are implemented by the > user to provide the link between SOLR and the external results source. > External results and SOLR documents are matched via a single configurable > attribute (the "join field"). The contrib JAR solr-xjoin-4.10.3.jar contains > these classes and interfaces and should be included in SOLR's class path from > solrconfig.xml, as should a JAR containing the user implementations of the > previously mentioned interfaces. For example: > {code:xml} > > .. > >/> > .. > > > .. > > {code} > h2. Java classes and interfaces > h3. XJoinResultsFactory > The user implementation of this interface is responsible for connecting to an > external source to perform a query (or otherwise collect results). Parameters > with prefix ".external." are passed from the SOLR query URL > to pararameterise the search. The interface has the following methods: > * void init(NamedList args) - this is called during SOLR initialisation, and > passed parameters from the search component configuration (see below) > * XJoinResults getResults(SolrParams params) - this is called during a SOLR > search to generate external results, and is passed parameters from the SOLR > query URL (as above) > For example, the implementation might perform queries of an external source > based on the 'q' SOLR query URL parameter (in full, name>.external.q). > h3. XJoinResults > A user implementation of this interface is returned by the getResults() > method of the XJoinResultsFactory implementation. It has methods: > * Object getResult(String joinId) - this should return a particular result > given the value of the join attribute > * Iterable getJoinIds() - this should return an ordered (ascending) > list of the join attribute values for all results of the external search > h3. XJoinSearchComponent > This is the central Java class of the contrib. It is a SOLR search component, > configured in solrconfig.xml and included in one or more SOLR request > handlers. There is one XJoin search component per external source, and each > has two main responsibilities: > * Before the SOLR search, it connects to the external source and retrieves > results, storing them in the SOLR request context > * After the SOLR search, it matches SOLR document in the results set and > external results via the join field, adding attributes from the external > results to documents in the SOLR results set > It takes the following initialisation parameters: > * factoryClass - this specifies the user-supplied class implementing > XJoinResultsFactory, used to generate external results > * joinField - this specifies the attribute on which to join between SOLR > documents and external results > * external - this parameter set is passed to configure the > XJoinResultsFactory implementation > For example, in solrconfig.xml: > {code:xml} > class="org.apache.solr.search.xjoin.XJoinSearchComponent"> > test.TestXJoinResultsFactory > id > > 1,2,3 > > > {code} > Here, the search component instantiates a new TextXJoinResultsFactory during > initialisation, and passes it the "values" parameter (1, 2, 3) to configure > it. To properly use the XJoinSearchComponent in a request handler, it must be > included at the start and end of the component list, and may be configured > with the following query parameters: > * results - a comma-separated list of attributes from the XJoinResults > implementation (created by the factory at search time) to be included in the > SOLR results > * fl - a comma-separated list of attributes f
[jira] [Updated] (SOLR-7341) xjoin - join data from external sources
[ https://issues.apache.org/jira/browse/SOLR-7341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom Winch updated SOLR-7341: Attachment: (was: SOLR-7341.patch) > xjoin - join data from external sources > --- > > Key: SOLR-7341 > URL: https://issues.apache.org/jira/browse/SOLR-7341 > Project: Solr > Issue Type: New Feature > Components: search >Affects Versions: 4.10.3 >Reporter: Tom Winch >Priority: Minor > Fix For: Trunk > > Attachments: SOLR-7341.patch, SOLR-7341.patch, SOLR-7341.patch, > SOLR-7341.patch, SOLR-7341.patch-5_3, SOLR-7341.patch-trunk, > SOLR-7341.patch-trunk, SOLR-7341.patch-trunk > > > h2. XJoin > The "xjoin" SOLR contrib allows external results to be joined with SOLR > results in a query and the SOLR result set to be filtered by the results of > an external query. Values from the external results are made available in the > SOLR results and may also be used to boost the scores of corresponding > documents during the search. The contrib consists of the Java classes > XJoinSearchComponent, XJoinValueSourceParser and XJoinQParserPlugin (and > associated classes), which must be configured in solrconfig.xml, and the > interfaces XJoinResultsFactory and XJoinResults, which are implemented by the > user to provide the link between SOLR and the external results source. > External results and SOLR documents are matched via a single configurable > attribute (the "join field"). The contrib JAR solr-xjoin-4.10.3.jar contains > these classes and interfaces and should be included in SOLR's class path from > solrconfig.xml, as should a JAR containing the user implementations of the > previously mentioned interfaces. For example: > {code:xml} > > .. > >/> > .. > > > .. > > {code} > h2. Java classes and interfaces > h3. XJoinResultsFactory > The user implementation of this interface is responsible for connecting to an > external source to perform a query (or otherwise collect results). Parameters > with prefix ".external." are passed from the SOLR query URL > to pararameterise the search. The interface has the following methods: > * void init(NamedList args) - this is called during SOLR initialisation, and > passed parameters from the search component configuration (see below) > * XJoinResults getResults(SolrParams params) - this is called during a SOLR > search to generate external results, and is passed parameters from the SOLR > query URL (as above) > For example, the implementation might perform queries of an external source > based on the 'q' SOLR query URL parameter (in full, name>.external.q). > h3. XJoinResults > A user implementation of this interface is returned by the getResults() > method of the XJoinResultsFactory implementation. It has methods: > * Object getResult(String joinId) - this should return a particular result > given the value of the join attribute > * Iterable getJoinIds() - this should return an ordered (ascending) > list of the join attribute values for all results of the external search > h3. XJoinSearchComponent > This is the central Java class of the contrib. It is a SOLR search component, > configured in solrconfig.xml and included in one or more SOLR request > handlers. There is one XJoin search component per external source, and each > has two main responsibilities: > * Before the SOLR search, it connects to the external source and retrieves > results, storing them in the SOLR request context > * After the SOLR search, it matches SOLR document in the results set and > external results via the join field, adding attributes from the external > results to documents in the SOLR results set > It takes the following initialisation parameters: > * factoryClass - this specifies the user-supplied class implementing > XJoinResultsFactory, used to generate external results > * joinField - this specifies the attribute on which to join between SOLR > documents and external results > * external - this parameter set is passed to configure the > XJoinResultsFactory implementation > For example, in solrconfig.xml: > {code:xml} > class="org.apache.solr.search.xjoin.XJoinSearchComponent"> > test.TestXJoinResultsFactory > id > > 1,2,3 > > > {code} > Here, the search component instantiates a new TextXJoinResultsFactory during > initialisation, and passes it the "values" parameter (1, 2, 3) to configure > it. To properly use the XJoinSearchComponent in a request handler, it must be > included at the start and end of the component list, and may be configured > with the following query parameters: > * results - a comma-separated list of attributes from the XJoinResults > implementation (created by the factory at search time) to be included in the > SOLR results > * fl - a comma-separated list of attributes f
[jira] [Updated] (SOLR-7341) xjoin - join data from external sources
[ https://issues.apache.org/jira/browse/SOLR-7341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom Winch updated SOLR-7341: Attachment: SOLR-7341.patch-5_3 Working version! > xjoin - join data from external sources > --- > > Key: SOLR-7341 > URL: https://issues.apache.org/jira/browse/SOLR-7341 > Project: Solr > Issue Type: New Feature > Components: search >Affects Versions: 4.10.3 >Reporter: Tom Winch >Priority: Minor > Fix For: Trunk > > Attachments: SOLR-7341.patch, SOLR-7341.patch, SOLR-7341.patch, > SOLR-7341.patch, SOLR-7341.patch, SOLR-7341.patch, SOLR-7341.patch-5_3, > SOLR-7341.patch-trunk, SOLR-7341.patch-trunk, SOLR-7341.patch-trunk > > > h2. XJoin > The "xjoin" SOLR contrib allows external results to be joined with SOLR > results in a query and the SOLR result set to be filtered by the results of > an external query. Values from the external results are made available in the > SOLR results and may also be used to boost the scores of corresponding > documents during the search. The contrib consists of the Java classes > XJoinSearchComponent, XJoinValueSourceParser and XJoinQParserPlugin (and > associated classes), which must be configured in solrconfig.xml, and the > interfaces XJoinResultsFactory and XJoinResults, which are implemented by the > user to provide the link between SOLR and the external results source. > External results and SOLR documents are matched via a single configurable > attribute (the "join field"). The contrib JAR solr-xjoin-4.10.3.jar contains > these classes and interfaces and should be included in SOLR's class path from > solrconfig.xml, as should a JAR containing the user implementations of the > previously mentioned interfaces. For example: > {code:xml} > > .. > >/> > .. > > > .. > > {code} > h2. Java classes and interfaces > h3. XJoinResultsFactory > The user implementation of this interface is responsible for connecting to an > external source to perform a query (or otherwise collect results). Parameters > with prefix ".external." are passed from the SOLR query URL > to pararameterise the search. The interface has the following methods: > * void init(NamedList args) - this is called during SOLR initialisation, and > passed parameters from the search component configuration (see below) > * XJoinResults getResults(SolrParams params) - this is called during a SOLR > search to generate external results, and is passed parameters from the SOLR > query URL (as above) > For example, the implementation might perform queries of an external source > based on the 'q' SOLR query URL parameter (in full, name>.external.q). > h3. XJoinResults > A user implementation of this interface is returned by the getResults() > method of the XJoinResultsFactory implementation. It has methods: > * Object getResult(String joinId) - this should return a particular result > given the value of the join attribute > * Iterable getJoinIds() - this should return an ordered (ascending) > list of the join attribute values for all results of the external search > h3. XJoinSearchComponent > This is the central Java class of the contrib. It is a SOLR search component, > configured in solrconfig.xml and included in one or more SOLR request > handlers. There is one XJoin search component per external source, and each > has two main responsibilities: > * Before the SOLR search, it connects to the external source and retrieves > results, storing them in the SOLR request context > * After the SOLR search, it matches SOLR document in the results set and > external results via the join field, adding attributes from the external > results to documents in the SOLR results set > It takes the following initialisation parameters: > * factoryClass - this specifies the user-supplied class implementing > XJoinResultsFactory, used to generate external results > * joinField - this specifies the attribute on which to join between SOLR > documents and external results > * external - this parameter set is passed to configure the > XJoinResultsFactory implementation > For example, in solrconfig.xml: > {code:xml} > class="org.apache.solr.search.xjoin.XJoinSearchComponent"> > test.TestXJoinResultsFactory > id > > 1,2,3 > > > {code} > Here, the search component instantiates a new TextXJoinResultsFactory during > initialisation, and passes it the "values" parameter (1, 2, 3) to configure > it. To properly use the XJoinSearchComponent in a request handler, it must be > included at the start and end of the component list, and may be configured > with the following query parameters: > * results - a comma-separated list of attributes from the XJoinResults > implementation (created by the factory at search time) to be included in the > SOLR results >
[jira] [Updated] (SOLR-7341) xjoin - join data from external sources
[ https://issues.apache.org/jira/browse/SOLR-7341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom Winch updated SOLR-7341: Attachment: (was: SOLR-7341.patch-5_3) > xjoin - join data from external sources > --- > > Key: SOLR-7341 > URL: https://issues.apache.org/jira/browse/SOLR-7341 > Project: Solr > Issue Type: New Feature > Components: search >Affects Versions: 4.10.3 >Reporter: Tom Winch >Priority: Minor > Fix For: Trunk > > Attachments: SOLR-7341.patch, SOLR-7341.patch, SOLR-7341.patch, > SOLR-7341.patch, SOLR-7341.patch, SOLR-7341.patch, SOLR-7341.patch-trunk, > SOLR-7341.patch-trunk, SOLR-7341.patch-trunk > > > h2. XJoin > The "xjoin" SOLR contrib allows external results to be joined with SOLR > results in a query and the SOLR result set to be filtered by the results of > an external query. Values from the external results are made available in the > SOLR results and may also be used to boost the scores of corresponding > documents during the search. The contrib consists of the Java classes > XJoinSearchComponent, XJoinValueSourceParser and XJoinQParserPlugin (and > associated classes), which must be configured in solrconfig.xml, and the > interfaces XJoinResultsFactory and XJoinResults, which are implemented by the > user to provide the link between SOLR and the external results source. > External results and SOLR documents are matched via a single configurable > attribute (the "join field"). The contrib JAR solr-xjoin-4.10.3.jar contains > these classes and interfaces and should be included in SOLR's class path from > solrconfig.xml, as should a JAR containing the user implementations of the > previously mentioned interfaces. For example: > {code:xml} > > .. > >/> > .. > > > .. > > {code} > h2. Java classes and interfaces > h3. XJoinResultsFactory > The user implementation of this interface is responsible for connecting to an > external source to perform a query (or otherwise collect results). Parameters > with prefix ".external." are passed from the SOLR query URL > to pararameterise the search. The interface has the following methods: > * void init(NamedList args) - this is called during SOLR initialisation, and > passed parameters from the search component configuration (see below) > * XJoinResults getResults(SolrParams params) - this is called during a SOLR > search to generate external results, and is passed parameters from the SOLR > query URL (as above) > For example, the implementation might perform queries of an external source > based on the 'q' SOLR query URL parameter (in full, name>.external.q). > h3. XJoinResults > A user implementation of this interface is returned by the getResults() > method of the XJoinResultsFactory implementation. It has methods: > * Object getResult(String joinId) - this should return a particular result > given the value of the join attribute > * Iterable getJoinIds() - this should return an ordered (ascending) > list of the join attribute values for all results of the external search > h3. XJoinSearchComponent > This is the central Java class of the contrib. It is a SOLR search component, > configured in solrconfig.xml and included in one or more SOLR request > handlers. There is one XJoin search component per external source, and each > has two main responsibilities: > * Before the SOLR search, it connects to the external source and retrieves > results, storing them in the SOLR request context > * After the SOLR search, it matches SOLR document in the results set and > external results via the join field, adding attributes from the external > results to documents in the SOLR results set > It takes the following initialisation parameters: > * factoryClass - this specifies the user-supplied class implementing > XJoinResultsFactory, used to generate external results > * joinField - this specifies the attribute on which to join between SOLR > documents and external results > * external - this parameter set is passed to configure the > XJoinResultsFactory implementation > For example, in solrconfig.xml: > {code:xml} > class="org.apache.solr.search.xjoin.XJoinSearchComponent"> > test.TestXJoinResultsFactory > id > > 1,2,3 > > > {code} > Here, the search component instantiates a new TextXJoinResultsFactory during > initialisation, and passes it the "values" parameter (1, 2, 3) to configure > it. To properly use the XJoinSearchComponent in a request handler, it must be > included at the start and end of the component list, and may be configured > with the following query parameters: > * results - a comma-separated list of attributes from the XJoinResults > implementation (created by the factory at search time) to be included in the > SOLR results > * fl - a comma-separated lis
[jira] [Updated] (SOLR-7341) xjoin - join data from external sources
[ https://issues.apache.org/jira/browse/SOLR-7341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom Winch updated SOLR-7341: Attachment: SOLR-7341.patch-5_3 Patch for SOLR 5.3 > xjoin - join data from external sources > --- > > Key: SOLR-7341 > URL: https://issues.apache.org/jira/browse/SOLR-7341 > Project: Solr > Issue Type: New Feature > Components: search >Affects Versions: 4.10.3 >Reporter: Tom Winch >Priority: Minor > Fix For: Trunk > > Attachments: SOLR-7341.patch, SOLR-7341.patch, SOLR-7341.patch, > SOLR-7341.patch, SOLR-7341.patch, SOLR-7341.patch, SOLR-7341.patch-5_3, > SOLR-7341.patch-trunk, SOLR-7341.patch-trunk, SOLR-7341.patch-trunk > > > h2. XJoin > The "xjoin" SOLR contrib allows external results to be joined with SOLR > results in a query and the SOLR result set to be filtered by the results of > an external query. Values from the external results are made available in the > SOLR results and may also be used to boost the scores of corresponding > documents during the search. The contrib consists of the Java classes > XJoinSearchComponent, XJoinValueSourceParser and XJoinQParserPlugin (and > associated classes), which must be configured in solrconfig.xml, and the > interfaces XJoinResultsFactory and XJoinResults, which are implemented by the > user to provide the link between SOLR and the external results source. > External results and SOLR documents are matched via a single configurable > attribute (the "join field"). The contrib JAR solr-xjoin-4.10.3.jar contains > these classes and interfaces and should be included in SOLR's class path from > solrconfig.xml, as should a JAR containing the user implementations of the > previously mentioned interfaces. For example: > {code:xml} > > .. > >/> > .. > > > .. > > {code} > h2. Java classes and interfaces > h3. XJoinResultsFactory > The user implementation of this interface is responsible for connecting to an > external source to perform a query (or otherwise collect results). Parameters > with prefix ".external." are passed from the SOLR query URL > to pararameterise the search. The interface has the following methods: > * void init(NamedList args) - this is called during SOLR initialisation, and > passed parameters from the search component configuration (see below) > * XJoinResults getResults(SolrParams params) - this is called during a SOLR > search to generate external results, and is passed parameters from the SOLR > query URL (as above) > For example, the implementation might perform queries of an external source > based on the 'q' SOLR query URL parameter (in full, name>.external.q). > h3. XJoinResults > A user implementation of this interface is returned by the getResults() > method of the XJoinResultsFactory implementation. It has methods: > * Object getResult(String joinId) - this should return a particular result > given the value of the join attribute > * Iterable getJoinIds() - this should return an ordered (ascending) > list of the join attribute values for all results of the external search > h3. XJoinSearchComponent > This is the central Java class of the contrib. It is a SOLR search component, > configured in solrconfig.xml and included in one or more SOLR request > handlers. There is one XJoin search component per external source, and each > has two main responsibilities: > * Before the SOLR search, it connects to the external source and retrieves > results, storing them in the SOLR request context > * After the SOLR search, it matches SOLR document in the results set and > external results via the join field, adding attributes from the external > results to documents in the SOLR results set > It takes the following initialisation parameters: > * factoryClass - this specifies the user-supplied class implementing > XJoinResultsFactory, used to generate external results > * joinField - this specifies the attribute on which to join between SOLR > documents and external results > * external - this parameter set is passed to configure the > XJoinResultsFactory implementation > For example, in solrconfig.xml: > {code:xml} > class="org.apache.solr.search.xjoin.XJoinSearchComponent"> > test.TestXJoinResultsFactory > id > > 1,2,3 > > > {code} > Here, the search component instantiates a new TextXJoinResultsFactory during > initialisation, and passes it the "values" parameter (1, 2, 3) to configure > it. To properly use the XJoinSearchComponent in a request handler, it must be > included at the start and end of the component list, and may be configured > with the following query parameters: > * results - a comma-separated list of attributes from the XJoinResults > implementation (created by the factory at search time) to be included in the > SOLR results
[jira] [Updated] (SOLR-7341) xjoin - join data from external sources
[ https://issues.apache.org/jira/browse/SOLR-7341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom Winch updated SOLR-7341: Description: h2. XJoin The "xjoin" SOLR contrib allows external results to be joined with SOLR results in a query and the SOLR result set to be filtered by the results of an external query. Values from the external results are made available in the SOLR results and may also be used to boost the scores of corresponding documents during the search. The contrib consists of the Java classes XJoinSearchComponent, XJoinValueSourceParser and XJoinQParserPlugin (and associated classes), which must be configured in solrconfig.xml, and the interfaces XJoinResultsFactory and XJoinResults, which are implemented by the user to provide the link between SOLR and the external results source. External results and SOLR documents are matched via a single configurable attribute (the "join field"). The contrib JAR solr-xjoin-4.10.3.jar contains these classes and interfaces and should be included in SOLR's class path from solrconfig.xml, as should a JAR containing the user implementations of the previously mentioned interfaces. For example: {code:xml} .. .. .. {code} h2. Java classes and interfaces h3. XJoinResultsFactory The user implementation of this interface is responsible for connecting to an external source to perform a query (or otherwise collect results). Parameters with prefix ".external." are passed from the SOLR query URL to pararameterise the search. The interface has the following methods: * void init(NamedList args) - this is called during SOLR initialisation, and passed parameters from the search component configuration (see below) * XJoinResults getResults(SolrParams params) - this is called during a SOLR search to generate external results, and is passed parameters from the SOLR query URL (as above) For example, the implementation might perform queries of an external source based on the 'q' SOLR query URL parameter (in full, .external.q). h3. XJoinResults A user implementation of this interface is returned by the getResults() method of the XJoinResultsFactory implementation. It has methods: * Object getResult(String joinId) - this should return a particular result given the value of the join attribute * Iterable getJoinIds() - this should return an ordered (ascending) list of the join attribute values for all results of the external search h3. XJoinSearchComponent This is the central Java class of the contrib. It is a SOLR search component, configured in solrconfig.xml and included in one or more SOLR request handlers. There is one XJoin search component per external source, and each has two main responsibilities: * Before the SOLR search, it connects to the external source and retrieves results, storing them in the SOLR request context * After the SOLR search, it matches SOLR document in the results set and external results via the join field, adding attributes from the external results to documents in the SOLR results set It takes the following initialisation parameters: * factoryClass - this specifies the user-supplied class implementing XJoinResultsFactory, used to generate external results * joinField - this specifies the attribute on which to join between SOLR documents and external results * external - this parameter set is passed to configure the XJoinResultsFactory implementation For example, in solrconfig.xml: {code:xml} test.TestXJoinResultsFactory id 1,2,3 {code} Here, the search component instantiates a new TextXJoinResultsFactory during initialisation, and passes it the "values" parameter (1, 2, 3) to configure it. To properly use the XJoinSearchComponent in a request handler, it must be included at the start and end of the component list, and may be configured with the following query parameters: * results - a comma-separated list of attributes from the XJoinResults implementation (created by the factory at search time) to be included in the SOLR results * fl - a comma-separated list of attributes from results objects (contained in an XJoinResults implementation) to be included in the SOLR results For example: {code:xml} .. true xx test_count id,value xjoin_test xjoin_test {code} Note that, to include the list of join ids returned by the external source in the SOLR results (likely for debug purposes), the value 'join_ids' may be specified in the "results" parameter. h3. XJoinQParserPlugin This query parser plugin constructs a query from the results of the external searches, and is based on the TermsQParserPlugin. It takes the following local parameters: * method - as the TermsQParserPlugin, this specifies how to build the Lucene query based on the join ids contained in external results; one of termsFilter, booleanQuery, automaton, or docValuesTermsFilter
[jira] [Updated] (SOLR-7341) xjoin - join data from external sources
[ https://issues.apache.org/jira/browse/SOLR-7341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom Winch updated SOLR-7341: Description: h2. XJoin The "xjoin" SOLR contrib allows external results to be joined with SOLR results in a query and the SOLR result set to be filtered by the results of an external query. Values from the external results are made available in the SOLR results and may also be used to boost the scores of corresponding documents during the search. The contrib consists of the Java classes XJoinSearchComponent, XJoinValueSourceParser and XJoinQParserPlugin (and associated classes), which must be configured in solrconfig.xml, and the interfaces XJoinResultsFactory and XJoinResults, which are implemented by the user to provide the link between SOLR and the external results source. External results and SOLR documents are matched via a single configurable attribute (the "join field"). The contrib JAR solr-xjoin-4.10.3.jar contains these classes and interfaces and should be included in SOLR's class path from solrconfig.xml, as should a JAR containing the user implementations of the previously mentioned interfaces. For example: {code:xml} .. .. .. {code} h2. Java classes and interfaces h3. XJoinResultsFactory The user implementation of this interface is responsible for connecting to an external source to perform a query (or otherwise collect results). Parameters with prefix ".external." are passed from the SOLR query URL to pararameterise the search. The interface has the following methods: * void init(NamedList args) - this is called during SOLR initialisation, and passed parameters from the search component configuration (see below) * XJoinResults getResults(SolrParams params) - this is called during a SOLR search to generate external results, and is passed parameters from the SOLR query URL (as above) For example, the implementation might perform queries of an external source based on the 'q' SOLR query URL parameter (in full, .external.q). h3. XJoinResults A user implementation of this interface is returned by the getResults() method of the XJoinResultsFactory implementation. It has methods: * Object getResult(String joinId) - this should return a particular result given the value of the join attribute * Iterable getJoinIds() - this should return an ordered (ascending) list of the join attribute values for all results of the external search h3. XJoinSearchComponent This is the central Java class of the contrib. It is a SOLR search component, configured in solrconfig.xml and included in one or more SOLR request handlers. There is one XJoin search component per external source, and each has two main responsibilities: * Before the SOLR search, it connects to the external source and retrieves results, storing them in the SOLR request context * After the SOLR search, it matches SOLR document in the results set and external results via the join field, adding attributes from the external results to documents in the SOLR results set It takes the following initialisation parameters: * factoryClass - this specifies the user-supplied class implementing XJoinResultsFactory, used to generate external results * joinField - this specifies the attribute on which to join between SOLR documents and external results * external - this parameter set is passed to configure the XJoinResultsFactory implementation For example, in solrconfig.xml: {code:xml} test.TestXJoinResultsFactory id 1,2,3 {code} Here, the search component instantiates a new TextXJoinResultsFactory during initialisation, and passes it the "values" parameter (1, 2, 3) to configure it. To properly use the XJoinSearchComponent in a request handler, it must be included at the start and end of the component list, and may be configured with the following query parameters: * results - a comma-separated list of attributes from the XJoinResults implementation (created by the factory at search time) to be included in the SOLR results * fl - a comma-separated list of attributes from results objects (contained in an XJoinResults implementation) to be included in the SOLR results For example: {code:xml} .. true xx test_count id,value xjoin_test xjoin_test {code} Note that, to include the list of join ids returned by the external source in the SOLR results (likely for debug purposes), the value 'join_ids' may be specified in the "results" parameter. h3. XJoinQParserPlugin This query parser plugin constructs a query from the results of the external searches, and is based on the TermsQParserPlugin. It takes the following local parameters: * method - as the TermsQParserPlugin, this specifies how to build the Lucene query based on the join ids contained in external results; one of termsFilter, booleanQuery, automaton, or docValuesTermsFilter
[jira] [Updated] (SOLR-7341) xjoin - join data from external sources
[ https://issues.apache.org/jira/browse/SOLR-7341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom Winch updated SOLR-7341: Flags: Patch > xjoin - join data from external sources > --- > > Key: SOLR-7341 > URL: https://issues.apache.org/jira/browse/SOLR-7341 > Project: Solr > Issue Type: New Feature > Components: search >Affects Versions: 4.10.3 >Reporter: Tom Winch >Priority: Minor > Fix For: Trunk > > Attachments: SOLR-7341.patch, SOLR-7341.patch, SOLR-7341.patch, > SOLR-7341.patch, SOLR-7341.patch, SOLR-7341.patch, SOLR-7341.patch-trunk, > SOLR-7341.patch-trunk, SOLR-7341.patch-trunk > > > h2. XJoin > The "xjoin" SOLR contrib allows external results to be joined with SOLR > results in a query and the SOLR result set to be filtered by the results of > an external query. Values from the external results are made available in the > SOLR results and may also be used to boost the scores of corresponding > documents during the search. The contrib consists of the Java classes > XJoinSearchComponent, XJoinValueSourceParser and XJoinQParserPlugin (and > associated classes), which must be configured in solrconfig.xml, and the > interfaces XJoinResultsFactory and XJoinResults, which are implemented by the > user to provide the link between SOLR and the external results source. > External results and SOLR documents are matched via a single configurable > attribute (the "join field"). The contrib JAR solr-xjoin-4.10.3.jar contains > these classes and interfaces and should be included in SOLR's class path from > solrconfig.xml, as should a JAR containing the user implementations of the > previously mentioned interfaces. For example: > {code:xml} > > .. > >/> > .. > > > .. > > {code} > h2. Java classes and interfaces > h3. XJoinResultsFactory > The user implementation of this interface is responsible for connecting to an > external source to perform a query (or otherwise collect results). Parameters > with prefix ".external." are passed from the SOLR query URL > to pararameterise the search. The interface has the following methods: > * void init(NamedList args) - this is called during SOLR initialisation, and > passed parameters from the search component configuration (see below) > * XJoinResults getResults(SolrParams params) - this is called during a SOLR > search to generate external results, and is passed parameters from the SOLR > query URL (as above) > For example, the implementation might perform queries of an external source > based on the 'q' SOLR query URL parameter (in full, name>.external.q). > h3. XJoinResults > A user implementation of this interface is returned by the getResults() > method of the XJoinResultsFactory implementation. It has methods: > * Object getResult(String joinId) - this should return a particular result > given the value of the join attribute > * Iterable getJoinIds() - this should return an ordered (ascending) > list of the join attribute values for all results of the external search > h3. XJoinSearchComponent > This is the central Java class of the contrib. It is a SOLR search component, > configured in solrconfig.xml and included in one or more SOLR request > handlers. There is one XJoin search component per external source, and each > has two main responsibilities: > * Before the SOLR search, it connects to the external source and retrieves > results, storing them in the SOLR request context > * After the SOLR search, it matches SOLR document in the results set and > external results via the join field, adding attributes from the external > results to documents in the SOLR results set > It takes the following initialisation parameters: > * factoryClass - this specifies the user-supplied class implementing > XJoinResultsFactory, used to generate external results > * joinField - this specifies the attribute on which to join between SOLR > documents and external results > * external - this parameter set is passed to configure the > XJoinResultsFactory implementation > For example, in solrconfig.xml: > {code:xml} > class="org.apache.solr.search.xjoin.XJoinSearchComponent"> > test.TestXJoinResultsFactory > id > > 1,2,3 > > > {code} > Here, the search component instantiates a new TextXJoinResultsFactory during > initialisation, and passes it the "values" parameter (1, 2, 3) to configure > it. To properly use the XJoinSearchComponent in a request handler, it must be > included at the start and end of the component list, and may be configured > with the following query parameters: > * results - a comma-separated list of attributes from the XJoinResults > implementation (created by the factory at search time) to be included in the > SOLR results > * fl - a comma-separated list of attributes from results o
[jira] [Updated] (SOLR-7341) xjoin - join data from external sources
[ https://issues.apache.org/jira/browse/SOLR-7341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom Winch updated SOLR-7341: Attachment: SOLR-7341.patch-trunk Many-many support. > xjoin - join data from external sources > --- > > Key: SOLR-7341 > URL: https://issues.apache.org/jira/browse/SOLR-7341 > Project: Solr > Issue Type: New Feature > Components: search >Affects Versions: 4.10.3 >Reporter: Tom Winch >Priority: Minor > Fix For: Trunk > > Attachments: SOLR-7341.patch, SOLR-7341.patch, SOLR-7341.patch, > SOLR-7341.patch, SOLR-7341.patch, SOLR-7341.patch, SOLR-7341.patch-trunk, > SOLR-7341.patch-trunk, SOLR-7341.patch-trunk > > > h2. XJoin > The "xjoin" SOLR contrib allows external results to be joined with SOLR > results in a query and the SOLR result set to be filtered by the results of > an external query. Values from the external results are made available in the > SOLR results and may also be used to boost the scores of corresponding > documents during the search. The contrib consists of the Java classes > XJoinSearchComponent, XJoinValueSourceParser and XJoinQParserPlugin (and > associated classes), which must be configured in solrconfig.xml, and the > interfaces XJoinResultsFactory and XJoinResults, which are implemented by the > user to provide the link between SOLR and the external results source. > External results and SOLR documents are matched via a single configurable > attribute (the "join field"). The contrib JAR solr-xjoin-4.10.3.jar contains > these classes and interfaces and should be included in SOLR's class path from > solrconfig.xml, as should a JAR containing the user implementations of the > previously mentioned interfaces. For example: > {code:xml} > > .. > >/> > .. > > > .. > > {code} > h2. Java classes and interfaces > h3. XJoinResultsFactory > The user implementation of this interface is responsible for connecting to an > external source to perform a query (or otherwise collect results). Parameters > with prefix ".external." are passed from the SOLR query URL > to pararameterise the search. The interface has the following methods: > * void init(NamedList args) - this is called during SOLR initialisation, and > passed parameters from the search component configuration (see below) > * XJoinResults getResults(SolrParams params) - this is called during a SOLR > search to generate external results, and is passed parameters from the SOLR > query URL (as above) > For example, the implementation might perform queries of an external source > based on the 'q' SOLR query URL parameter (in full, name>.external.q). > h3. XJoinResults > A user implementation of this interface is returned by the getResults() > method of the XJoinResultsFactory implementation. It has methods: > * Object getResult(String joinId) - this should return a particular result > given the value of the join attribute > * Iterable getJoinIds() - this should return an ordered (ascending) > list of the join attribute values for all results of the external search > h3. XJoinSearchComponent > This is the central Java class of the contrib. It is a SOLR search component, > configured in solrconfig.xml and included in one or more SOLR request > handlers. There is one XJoin search component per external source, and each > has two main responsibilities: > * Before the SOLR search, it connects to the external source and retrieves > results, storing them in the SOLR request context > * After the SOLR search, it matches SOLR document in the results set and > external results via the join field, adding attributes from the external > results to documents in the SOLR results set > It takes the following initialisation parameters: > * factoryClass - this specifies the user-supplied class implementing > XJoinResultsFactory, used to generate external results > * joinField - this specifies the attribute on which to join between SOLR > documents and external results > * external - this parameter set is passed to configure the > XJoinResultsFactory implementation > For example, in solrconfig.xml: > {code:xml} > class="org.apache.solr.search.xjoin.XJoinSearchComponent"> > test.TestXJoinResultsFactory > id > > 1,2,3 > > > {code} > Here, the search component instantiates a new TextXJoinResultsFactory during > initialisation, and passes it the "values" parameter (1, 2, 3) to configure > it. To properly use the XJoinSearchComponent in a request handler, it must be > included at the start and end of the component list, and may be configured > with the following query parameters: > * results - a comma-separated list of attributes from the XJoinResults > implementation (created by the factory at search time) to be included in the > SOLR results > * fl - a comma-se
[jira] [Updated] (SOLR-7341) xjoin - join data from external sources
[ https://issues.apache.org/jira/browse/SOLR-7341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom Winch updated SOLR-7341: Attachment: SOLR-7341.patch Many-to-many support > xjoin - join data from external sources > --- > > Key: SOLR-7341 > URL: https://issues.apache.org/jira/browse/SOLR-7341 > Project: Solr > Issue Type: New Feature > Components: search >Affects Versions: 4.10.3 >Reporter: Tom Winch >Priority: Minor > Fix For: Trunk > > Attachments: SOLR-7341.patch, SOLR-7341.patch, SOLR-7341.patch, > SOLR-7341.patch, SOLR-7341.patch, SOLR-7341.patch, SOLR-7341.patch-trunk, > SOLR-7341.patch-trunk, SOLR-7341.patch-trunk > > > h2. XJoin > The "xjoin" SOLR contrib allows external results to be joined with SOLR > results in a query and the SOLR result set to be filtered by the results of > an external query. Values from the external results are made available in the > SOLR results and may also be used to boost the scores of corresponding > documents during the search. The contrib consists of the Java classes > XJoinSearchComponent, XJoinValueSourceParser and XJoinQParserPlugin (and > associated classes), which must be configured in solrconfig.xml, and the > interfaces XJoinResultsFactory and XJoinResults, which are implemented by the > user to provide the link between SOLR and the external results source. > External results and SOLR documents are matched via a single configurable > attribute (the "join field"). The contrib JAR solr-xjoin-4.10.3.jar contains > these classes and interfaces and should be included in SOLR's class path from > solrconfig.xml, as should a JAR containing the user implementations of the > previously mentioned interfaces. For example: > {code:xml} > > .. > >/> > .. > > > .. > > {code} > h2. Java classes and interfaces > h3. XJoinResultsFactory > The user implementation of this interface is responsible for connecting to an > external source to perform a query (or otherwise collect results). Parameters > with prefix ".external." are passed from the SOLR query URL > to pararameterise the search. The interface has the following methods: > * void init(NamedList args) - this is called during SOLR initialisation, and > passed parameters from the search component configuration (see below) > * XJoinResults getResults(SolrParams params) - this is called during a SOLR > search to generate external results, and is passed parameters from the SOLR > query URL (as above) > For example, the implementation might perform queries of an external source > based on the 'q' SOLR query URL parameter (in full, name>.external.q). > h3. XJoinResults > A user implementation of this interface is returned by the getResults() > method of the XJoinResultsFactory implementation. It has methods: > * Object getResult(String joinId) - this should return a particular result > given the value of the join attribute > * Iterable getJoinIds() - this should return an ordered (ascending) > list of the join attribute values for all results of the external search > h3. XJoinSearchComponent > This is the central Java class of the contrib. It is a SOLR search component, > configured in solrconfig.xml and included in one or more SOLR request > handlers. There is one XJoin search component per external source, and each > has two main responsibilities: > * Before the SOLR search, it connects to the external source and retrieves > results, storing them in the SOLR request context > * After the SOLR search, it matches SOLR document in the results set and > external results via the join field, adding attributes from the external > results to documents in the SOLR results set > It takes the following initialisation parameters: > * factoryClass - this specifies the user-supplied class implementing > XJoinResultsFactory, used to generate external results > * joinField - this specifies the attribute on which to join between SOLR > documents and external results > * external - this parameter set is passed to configure the > XJoinResultsFactory implementation > For example, in solrconfig.xml: > {code:xml} > class="org.apache.solr.search.xjoin.XJoinSearchComponent"> > test.TestXJoinResultsFactory > id > > 1,2,3 > > > {code} > Here, the search component instantiates a new TextXJoinResultsFactory during > initialisation, and passes it the "values" parameter (1, 2, 3) to configure > it. To properly use the XJoinSearchComponent in a request handler, it must be > included at the start and end of the component list, and may be configured > with the following query parameters: > * results - a comma-separated list of attributes from the XJoinResults > implementation (created by the factory at search time) to be included in the > SOLR results > * fl - a comma-separa
[jira] [Updated] (SOLR-7341) xjoin - join data from external sources
[ https://issues.apache.org/jira/browse/SOLR-7341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom Winch updated SOLR-7341: Description: h2. XJoin The "xjoin" SOLR contrib allows external results to be joined with SOLR results in a query and the SOLR result set to be filtered by the results of an external query. Values from the external results are made available in the SOLR results and may also be used to boost the scores of corresponding documents during the search. The contrib consists of the Java classes XJoinSearchComponent, XJoinValueSourceParser and XJoinQParserPlugin (and associated classes), which must be configured in solrconfig.xml, and the interfaces XJoinResultsFactory and XJoinResults, which are implemented by the user to provide the link between SOLR and the external results source. External results and SOLR documents are matched via a single configurable attribute (the "join field"). The contrib JAR solr-xjoin-4.10.3.jar contains these classes and interfaces and should be included in SOLR's class path from solrconfig.xml, as should a JAR containing the user implementations of the previously mentioned interfaces. For example: {code:xml} .. .. .. {code} h2. Java classes and interfaces h3. XJoinResultsFactory The user implementation of this interface is responsible for connecting to an external source to perform a query (or otherwise collect results). Parameters with prefix ".external." are passed from the SOLR query URL to pararameterise the search. The interface has the following methods: * void init(NamedList args) - this is called during SOLR initialisation, and passed parameters from the search component configuration (see below) * XJoinResults getResults(SolrParams params) - this is called during a SOLR search to generate external results, and is passed parameters from the SOLR query URL (as above) For example, the implementation might perform queries of an external source based on the 'q' SOLR query URL parameter (in full, .external.q). h3. XJoinResults A user implementation of this interface is returned by the getResults() method of the XJoinResultsFactory implementation. It has methods: * Object getResult(String joinId) - this should return a particular result given the value of the join attribute * Iterable getJoinIds() - this should return an ordered (ascending) list of the join attribute values for all results of the external search h3. XJoinSearchComponent This is the central Java class of the contrib. It is a SOLR search component, configured in solrconfig.xml and included in one or more SOLR request handlers. There is one XJoin search component per external source, and each has two main responsibilities: * Before the SOLR search, it connects to the external source and retrieves results, storing them in the SOLR request context * After the SOLR search, it matches SOLR document in the results set and external results via the join field, adding attributes from the external results to documents in the SOLR results set It takes the following initialisation parameters: * factoryClass - this specifies the user-supplied class implementing XJoinResultsFactory, used to generate external results * joinField - this specifies the attribute on which to join between SOLR documents and external results * external - this parameter set is passed to configure the XJoinResultsFactory implementation For example, in solrconfig.xml: {code:xml} test.TestXJoinResultsFactory id 1,2,3 {code} Here, the search component instantiates a new TextXJoinResultsFactory during initialisation, and passes it the "values" parameter (1, 2, 3) to configure it. To properly use the XJoinSearchComponent in a request handler, it must be included at the start and end of the component list, and may be configured with the following query parameters: * results - a comma-separated list of attributes from the XJoinResults implementation (created by the factory at search time) to be included in the SOLR results * fl - a comma-separated list of attributes from results objects (contained in an XJoinResults implementation) to be included in the SOLR results For example: {code:xml} .. true xx test_count id,value xjoin_test xjoin_test {code} Note that, to include the list of join ids returned by the external source in the SOLR results (likely for debug purposes), the value 'join_ids' may be specified in the "results" parameter. h3. XJoinQParserPlugin This query parser plugin constructs a query from the results of the external searches, and is based on the TermsQParserPlugin. It takes the following local parameters: * method - as the TermsQParserPlugin, this specifies how to build the Lucene query based on the join ids contained in external results; one of termsFilter, booleanQuery, automaton, or docValuesTermsFilter
[jira] [Updated] (SOLR-7341) xjoin - join data from external sources
[ https://issues.apache.org/jira/browse/SOLR-7341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom Winch updated SOLR-7341: Attachment: SOLR-7341.patch-trunk Very minor update to exclude 'class' from automatic method detection > xjoin - join data from external sources > --- > > Key: SOLR-7341 > URL: https://issues.apache.org/jira/browse/SOLR-7341 > Project: Solr > Issue Type: New Feature > Components: search >Affects Versions: 4.10.3 >Reporter: Tom Winch >Priority: Minor > Fix For: Trunk > > Attachments: SOLR-7341.patch, SOLR-7341.patch, SOLR-7341.patch, > SOLR-7341.patch, SOLR-7341.patch, SOLR-7341.patch-trunk, SOLR-7341.patch-trunk > > > h2. XJoin > The "xjoin" SOLR contrib allows external results to be joined with SOLR > results in a query and the SOLR result set to be filtered by the results of > an external query. Values from the external results are made available in the > SOLR results and may also be used to boost the scores of corresponding > documents during the search. The contrib consists of the Java classes > XJoinSearchComponent, XJoinValueSourceParser and XJoinQParserPlugin (and > associated classes), which must be configured in solrconfig.xml, and the > interfaces XJoinResultsFactory and XJoinResults, which are implemented by the > user to provide the link between SOLR and the external results source. > External results and SOLR documents are matched via a single configurable > attribute (the "join field"). The contrib JAR solr-xjoin-4.10.3.jar contains > these classes and interfaces and should be included in SOLR's class path from > solrconfig.xml, as should a JAR containing the user implementations of the > previously mentioned interfaces. For example: > {code:xml} > > .. > >/> > .. > > > .. > > {code} > h2. Java classes and interfaces > h3. XJoinResultsFactory > The user implementation of this interface is responsible for connecting to an > external source to perform a query (or otherwise collect results). Parameters > with prefix ".external." are passed from the SOLR query URL > to pararameterise the search. The interface has the following methods: > * void init(NamedList args) - this is called during SOLR initialisation, and > passed parameters from the search component configuration (see below) > * XJoinResults getResults(SolrParams params) - this is called during a SOLR > search to generate external results, and is passed parameters from the SOLR > query URL (as above) > For example, the implementation might perform queries of an external source > based on the 'q' SOLR query URL parameter (in full, name>.external.q). > h3. XJoinResults > A user implementation of this interface is returned by the getResults() > method of the XJoinResultsFactory implementation. It has methods: > * Object getResult(String joinId) - this should return a particular result > given the value of the join attribute > * Iterable getJoinIds() - this should return the join attribute > values for all results of the external search > h3. XJoinSearchComponent > This is the central Java class of the contrib. It is a SOLR search component, > configured in solrconfig.xml and included in one or more SOLR request > handlers. There is one XJoin search component per external source, and each > has two main responsibilities: > * Before the SOLR search, it connects to the external source and retrieves > results, storing them in the SOLR request context > * After the SOLR search, it matches SOLR document in the results set and > external results via the join field, adding attributes from the external > results to documents in the SOLR results set > It takes the following initialisation parameters: > * factoryClass - this specifies the user-supplied class implementing > XJoinResultsFactory, used to generate external results > * joinField - this specifies the attribute on which to join between SOLR > documents and external results > * external - this parameter set is passed to configure the > XJoinResultsFactory implementation > For example, in solrconfig.xml: > {code:xml} > class="org.apache.solr.search.xjoin.XJoinSearchComponent"> > test.TestXJoinResultsFactory > id > > 1,2,3 > > > {code} > Here, the search component instantiates a new TextXJoinResultsFactory during > initialisation, and passes it the "values" parameter (1, 2, 3) to configure > it. To properly use the XJoinSearchComponent in a request handler, it must be > included at the start and end of the component list, and may be configured > with the following query parameters: > * results - a comma-separated list of attributes from the XJoinResults > implementation (created by the factory at search time) to be included in the > SOLR results > * fl - a comma-separated list of attribut
[jira] [Updated] (SOLR-7341) xjoin - join data from external sources
[ https://issues.apache.org/jira/browse/SOLR-7341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom Winch updated SOLR-7341: Attachment: SOLR-7341.patch Very minor update to exclude 'class' from automatic method choice > xjoin - join data from external sources > --- > > Key: SOLR-7341 > URL: https://issues.apache.org/jira/browse/SOLR-7341 > Project: Solr > Issue Type: New Feature > Components: search >Affects Versions: 4.10.3 >Reporter: Tom Winch >Priority: Minor > Fix For: Trunk > > Attachments: SOLR-7341.patch, SOLR-7341.patch, SOLR-7341.patch, > SOLR-7341.patch, SOLR-7341.patch, SOLR-7341.patch-trunk > > > h2. XJoin > The "xjoin" SOLR contrib allows external results to be joined with SOLR > results in a query and the SOLR result set to be filtered by the results of > an external query. Values from the external results are made available in the > SOLR results and may also be used to boost the scores of corresponding > documents during the search. The contrib consists of the Java classes > XJoinSearchComponent, XJoinValueSourceParser and XJoinQParserPlugin (and > associated classes), which must be configured in solrconfig.xml, and the > interfaces XJoinResultsFactory and XJoinResults, which are implemented by the > user to provide the link between SOLR and the external results source. > External results and SOLR documents are matched via a single configurable > attribute (the "join field"). The contrib JAR solr-xjoin-4.10.3.jar contains > these classes and interfaces and should be included in SOLR's class path from > solrconfig.xml, as should a JAR containing the user implementations of the > previously mentioned interfaces. For example: > {code:xml} > > .. > >/> > .. > > > .. > > {code} > h2. Java classes and interfaces > h3. XJoinResultsFactory > The user implementation of this interface is responsible for connecting to an > external source to perform a query (or otherwise collect results). Parameters > with prefix ".external." are passed from the SOLR query URL > to pararameterise the search. The interface has the following methods: > * void init(NamedList args) - this is called during SOLR initialisation, and > passed parameters from the search component configuration (see below) > * XJoinResults getResults(SolrParams params) - this is called during a SOLR > search to generate external results, and is passed parameters from the SOLR > query URL (as above) > For example, the implementation might perform queries of an external source > based on the 'q' SOLR query URL parameter (in full, name>.external.q). > h3. XJoinResults > A user implementation of this interface is returned by the getResults() > method of the XJoinResultsFactory implementation. It has methods: > * Object getResult(String joinId) - this should return a particular result > given the value of the join attribute > * Iterable getJoinIds() - this should return the join attribute > values for all results of the external search > h3. XJoinSearchComponent > This is the central Java class of the contrib. It is a SOLR search component, > configured in solrconfig.xml and included in one or more SOLR request > handlers. There is one XJoin search component per external source, and each > has two main responsibilities: > * Before the SOLR search, it connects to the external source and retrieves > results, storing them in the SOLR request context > * After the SOLR search, it matches SOLR document in the results set and > external results via the join field, adding attributes from the external > results to documents in the SOLR results set > It takes the following initialisation parameters: > * factoryClass - this specifies the user-supplied class implementing > XJoinResultsFactory, used to generate external results > * joinField - this specifies the attribute on which to join between SOLR > documents and external results > * external - this parameter set is passed to configure the > XJoinResultsFactory implementation > For example, in solrconfig.xml: > {code:xml} > class="org.apache.solr.search.xjoin.XJoinSearchComponent"> > test.TestXJoinResultsFactory > id > > 1,2,3 > > > {code} > Here, the search component instantiates a new TextXJoinResultsFactory during > initialisation, and passes it the "values" parameter (1, 2, 3) to configure > it. To properly use the XJoinSearchComponent in a request handler, it must be > included at the start and end of the component list, and may be configured > with the following query parameters: > * results - a comma-separated list of attributes from the XJoinResults > implementation (created by the factory at search time) to be included in the > SOLR results > * fl - a comma-separated list of attributes from results objects (contain
[jira] [Updated] (SOLR-7341) xjoin - join data from external sources
[ https://issues.apache.org/jira/browse/SOLR-7341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom Winch updated SOLR-7341: Attachment: SOLR-7341.patch-trunk Patch against trunk (svn rev 1689652) > xjoin - join data from external sources > --- > > Key: SOLR-7341 > URL: https://issues.apache.org/jira/browse/SOLR-7341 > Project: Solr > Issue Type: New Feature > Components: search >Affects Versions: 4.10.3 >Reporter: Tom Winch >Priority: Minor > Fix For: Trunk > > Attachments: SOLR-7341.patch, SOLR-7341.patch, SOLR-7341.patch, > SOLR-7341.patch, SOLR-7341.patch-trunk > > > h2. XJoin > The "xjoin" SOLR contrib allows external results to be joined with SOLR > results in a query and the SOLR result set to be filtered by the results of > an external query. Values from the external results are made available in the > SOLR results and may also be used to boost the scores of corresponding > documents during the search. The contrib consists of the Java classes > XJoinSearchComponent, XJoinValueSourceParser and XJoinQParserPlugin (and > associated classes), which must be configured in solrconfig.xml, and the > interfaces XJoinResultsFactory and XJoinResults, which are implemented by the > user to provide the link between SOLR and the external results source. > External results and SOLR documents are matched via a single configurable > attribute (the "join field"). The contrib JAR solr-xjoin-4.10.3.jar contains > these classes and interfaces and should be included in SOLR's class path from > solrconfig.xml, as should a JAR containing the user implementations of the > previously mentioned interfaces. For example: > {code:xml} > > .. > >/> > .. > > > .. > > {code} > h2. Java classes and interfaces > h3. XJoinResultsFactory > The user implementation of this interface is responsible for connecting to an > external source to perform a query (or otherwise collect results). Parameters > with prefix ".external." are passed from the SOLR query URL > to pararameterise the search. The interface has the following methods: > * void init(NamedList args) - this is called during SOLR initialisation, and > passed parameters from the search component configuration (see below) > * XJoinResults getResults(SolrParams params) - this is called during a SOLR > search to generate external results, and is passed parameters from the SOLR > query URL (as above) > For example, the implementation might perform queries of an external source > based on the 'q' SOLR query URL parameter (in full, name>.external.q). > h3. XJoinResults > A user implementation of this interface is returned by the getResults() > method of the XJoinResultsFactory implementation. It has methods: > * Object getResult(String joinId) - this should return a particular result > given the value of the join attribute > * Iterable getJoinIds() - this should return the join attribute > values for all results of the external search > h3. XJoinSearchComponent > This is the central Java class of the contrib. It is a SOLR search component, > configured in solrconfig.xml and included in one or more SOLR request > handlers. There is one XJoin search component per external source, and each > has two main responsibilities: > * Before the SOLR search, it connects to the external source and retrieves > results, storing them in the SOLR request context > * After the SOLR search, it matches SOLR document in the results set and > external results via the join field, adding attributes from the external > results to documents in the SOLR results set > It takes the following initialisation parameters: > * factoryClass - this specifies the user-supplied class implementing > XJoinResultsFactory, used to generate external results > * joinField - this specifies the attribute on which to join between SOLR > documents and external results > * external - this parameter set is passed to configure the > XJoinResultsFactory implementation > For example, in solrconfig.xml: > {code:xml} > class="org.apache.solr.search.xjoin.XJoinSearchComponent"> > test.TestXJoinResultsFactory > id > > 1,2,3 > > > {code} > Here, the search component instantiates a new TextXJoinResultsFactory during > initialisation, and passes it the "values" parameter (1, 2, 3) to configure > it. To properly use the XJoinSearchComponent in a request handler, it must be > included at the start and end of the component list, and may be configured > with the following query parameters: > * results - a comma-separated list of attributes from the XJoinResults > implementation (created by the factory at search time) to be included in the > SOLR results > * fl - a comma-separated list of attributes from results objects (contained > in an XJoinResults implementation
[jira] [Updated] (SOLR-7341) xjoin - join data from external sources
[ https://issues.apache.org/jira/browse/SOLR-7341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom Winch updated SOLR-7341: Attachment: SOLR-7341.patch Minor bug fixes > xjoin - join data from external sources > --- > > Key: SOLR-7341 > URL: https://issues.apache.org/jira/browse/SOLR-7341 > Project: Solr > Issue Type: New Feature > Components: search >Affects Versions: 4.10.3 >Reporter: Tom Winch >Priority: Minor > Fix For: Trunk > > Attachments: SOLR-7341.patch, SOLR-7341.patch, SOLR-7341.patch, > SOLR-7341.patch > > > h2. XJoin > The "xjoin" SOLR contrib allows external results to be joined with SOLR > results in a query and the SOLR result set to be filtered by the results of > an external query. Values from the external results are made available in the > SOLR results and may also be used to boost the scores of corresponding > documents during the search. The contrib consists of the Java classes > XJoinSearchComponent, XJoinValueSourceParser and XJoinQParserPlugin (and > associated classes), which must be configured in solrconfig.xml, and the > interfaces XJoinResultsFactory and XJoinResults, which are implemented by the > user to provide the link between SOLR and the external results source. > External results and SOLR documents are matched via a single configurable > attribute (the "join field"). The contrib JAR solr-xjoin-4.10.3.jar contains > these classes and interfaces and should be included in SOLR's class path from > solrconfig.xml, as should a JAR containing the user implementations of the > previously mentioned interfaces. For example: > {code:xml} > > .. > >/> > .. > > > .. > > {code} > h2. Java classes and interfaces > h3. XJoinResultsFactory > The user implementation of this interface is responsible for connecting to an > external source to perform a query (or otherwise collect results). Parameters > with prefix ".external." are passed from the SOLR query URL > to pararameterise the search. The interface has the following methods: > * void init(NamedList args) - this is called during SOLR initialisation, and > passed parameters from the search component configuration (see below) > * XJoinResults getResults(SolrParams params) - this is called during a SOLR > search to generate external results, and is passed parameters from the SOLR > query URL (as above) > For example, the implementation might perform queries of an external source > based on the 'q' SOLR query URL parameter (in full, name>.external.q). > h3. XJoinResults > A user implementation of this interface is returned by the getResults() > method of the XJoinResultsFactory implementation. It has methods: > * Object getResult(String joinId) - this should return a particular result > given the value of the join attribute > * Iterable getJoinIds() - this should return the join attribute > values for all results of the external search > h3. XJoinSearchComponent > This is the central Java class of the contrib. It is a SOLR search component, > configured in solrconfig.xml and included in one or more SOLR request > handlers. There is one XJoin search component per external source, and each > has two main responsibilities: > * Before the SOLR search, it connects to the external source and retrieves > results, storing them in the SOLR request context > * After the SOLR search, it matches SOLR document in the results set and > external results via the join field, adding attributes from the external > results to documents in the SOLR results set > It takes the following initialisation parameters: > * factoryClass - this specifies the user-supplied class implementing > XJoinResultsFactory, used to generate external results > * joinField - this specifies the attribute on which to join between SOLR > documents and external results > * external - this parameter set is passed to configure the > XJoinResultsFactory implementation > For example, in solrconfig.xml: > {code:xml} > class="org.apache.solr.search.xjoin.XJoinSearchComponent"> > test.TestXJoinResultsFactory > id > > 1,2,3 > > > {code} > Here, the search component instantiates a new TextXJoinResultsFactory during > initialisation, and passes it the "values" parameter (1, 2, 3) to configure > it. To properly use the XJoinSearchComponent in a request handler, it must be > included at the start and end of the component list, and may be configured > with the following query parameters: > * results - a comma-separated list of attributes from the XJoinResults > implementation (created by the factory at search time) to be included in the > SOLR results > * fl - a comma-separated list of attributes from results objects (contained > in an XJoinResults implementation) to be included in the SOLR results > For example:
[jira] [Updated] (SOLR-7341) xjoin - join data from external sources
[ https://issues.apache.org/jira/browse/SOLR-7341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom Winch updated SOLR-7341: Attachment: SOLR-7341.patch Latest patch (against 4.10.3) with support for grouping > xjoin - join data from external sources > --- > > Key: SOLR-7341 > URL: https://issues.apache.org/jira/browse/SOLR-7341 > Project: Solr > Issue Type: New Feature > Components: search >Affects Versions: 4.10.3 >Reporter: Tom Winch >Priority: Minor > Fix For: Trunk > > Attachments: SOLR-7341.patch, SOLR-7341.patch, SOLR-7341.patch > > > h2. XJoin > The "xjoin" SOLR contrib allows external results to be joined with SOLR > results in a query and the SOLR result set to be filtered by the results of > an external query. Values from the external results are made available in the > SOLR results and may also be used to boost the scores of corresponding > documents during the search. The contrib consists of the Java classes > XJoinSearchComponent, XJoinValueSourceParser and XJoinQParserPlugin (and > associated classes), which must be configured in solrconfig.xml, and the > interfaces XJoinResultsFactory and XJoinResults, which are implemented by the > user to provide the link between SOLR and the external results source. > External results and SOLR documents are matched via a single configurable > attribute (the "join field"). The contrib JAR solr-xjoin-4.10.3.jar contains > these classes and interfaces and should be included in SOLR's class path from > solrconfig.xml, as should a JAR containing the user implementations of the > previously mentioned interfaces. For example: > {code:xml} > > .. > >/> > .. > > > .. > > {code} > h2. Java classes and interfaces > h3. XJoinResultsFactory > The user implementation of this interface is responsible for connecting to an > external source to perform a query (or otherwise collect results). Parameters > with prefix ".external." are passed from the SOLR query URL > to pararameterise the search. The interface has the following methods: > * void init(NamedList args) - this is called during SOLR initialisation, and > passed parameters from the search component configuration (see below) > * XJoinResults getResults(SolrParams params) - this is called during a SOLR > search to generate external results, and is passed parameters from the SOLR > query URL (as above) > For example, the implementation might perform queries of an external source > based on the 'q' SOLR query URL parameter (in full, name>.external.q). > h3. XJoinResults > A user implementation of this interface is returned by the getResults() > method of the XJoinResultsFactory implementation. It has methods: > * Object getResult(String joinId) - this should return a particular result > given the value of the join attribute > * Iterable getJoinIds() - this should return the join attribute > values for all results of the external search > h3. XJoinSearchComponent > This is the central Java class of the contrib. It is a SOLR search component, > configured in solrconfig.xml and included in one or more SOLR request > handlers. There is one XJoin search component per external source, and each > has two main responsibilities: > * Before the SOLR search, it connects to the external source and retrieves > results, storing them in the SOLR request context > * After the SOLR search, it matches SOLR document in the results set and > external results via the join field, adding attributes from the external > results to documents in the SOLR results set > It takes the following initialisation parameters: > * factoryClass - this specifies the user-supplied class implementing > XJoinResultsFactory, used to generate external results > * joinField - this specifies the attribute on which to join between SOLR > documents and external results > * external - this parameter set is passed to configure the > XJoinResultsFactory implementation > For example, in solrconfig.xml: > {code:xml} > class="org.apache.solr.search.xjoin.XJoinSearchComponent"> > test.TestXJoinResultsFactory > id > > 1,2,3 > > > {code} > Here, the search component instantiates a new TextXJoinResultsFactory during > initialisation, and passes it the "values" parameter (1, 2, 3) to configure > it. To properly use the XJoinSearchComponent in a request handler, it must be > included at the start and end of the component list, and may be configured > with the following query parameters: > * results - a comma-separated list of attributes from the XJoinResults > implementation (created by the factory at search time) to be included in the > SOLR results > * fl - a comma-separated list of attributes from results objects (contained > in an XJoinResults implementation) to be included in the SOLR re
[jira] [Updated] (SOLR-7341) xjoin - join data from external sources
[ https://issues.apache.org/jira/browse/SOLR-7341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom Winch updated SOLR-7341: Attachment: (was: SOLR-7341.patch) > xjoin - join data from external sources > --- > > Key: SOLR-7341 > URL: https://issues.apache.org/jira/browse/SOLR-7341 > Project: Solr > Issue Type: New Feature > Components: search >Affects Versions: 4.10.3 >Reporter: Tom Winch >Priority: Minor > Fix For: Trunk > > Attachments: SOLR-7341.patch, SOLR-7341.patch > > > h2. XJoin > The "xjoin" SOLR contrib allows external results to be joined with SOLR > results in a query and the SOLR result set to be filtered by the results of > an external query. Values from the external results are made available in the > SOLR results and may also be used to boost the scores of corresponding > documents during the search. The contrib consists of the Java classes > XJoinSearchComponent, XJoinValueSourceParser and XJoinQParserPlugin (and > associated classes), which must be configured in solrconfig.xml, and the > interfaces XJoinResultsFactory and XJoinResults, which are implemented by the > user to provide the link between SOLR and the external results source. > External results and SOLR documents are matched via a single configurable > attribute (the "join field"). The contrib JAR solr-xjoin-4.10.3.jar contains > these classes and interfaces and should be included in SOLR's class path from > solrconfig.xml, as should a JAR containing the user implementations of the > previously mentioned interfaces. For example: > {code:xml} > > .. > >/> > .. > > > .. > > {code} > h2. Java classes and interfaces > h3. XJoinResultsFactory > The user implementation of this interface is responsible for connecting to an > external source to perform a query (or otherwise collect results). Parameters > with prefix ".external." are passed from the SOLR query URL > to pararameterise the search. The interface has the following methods: > * void init(NamedList args) - this is called during SOLR initialisation, and > passed parameters from the search component configuration (see below) > * XJoinResults getResults(SolrParams params) - this is called during a SOLR > search to generate external results, and is passed parameters from the SOLR > query URL (as above) > For example, the implementation might perform queries of an external source > based on the 'q' SOLR query URL parameter (in full, name>.external.q). > h3. XJoinResults > A user implementation of this interface is returned by the getResults() > method of the XJoinResultsFactory implementation. It has methods: > * Object getResult(String joinId) - this should return a particular result > given the value of the join attribute > * Iterable getJoinIds() - this should return the join attribute > values for all results of the external search > h3. XJoinSearchComponent > This is the central Java class of the contrib. It is a SOLR search component, > configured in solrconfig.xml and included in one or more SOLR request > handlers. There is one XJoin search component per external source, and each > has two main responsibilities: > * Before the SOLR search, it connects to the external source and retrieves > results, storing them in the SOLR request context > * After the SOLR search, it matches SOLR document in the results set and > external results via the join field, adding attributes from the external > results to documents in the SOLR results set > It takes the following initialisation parameters: > * factoryClass - this specifies the user-supplied class implementing > XJoinResultsFactory, used to generate external results > * joinField - this specifies the attribute on which to join between SOLR > documents and external results > * external - this parameter set is passed to configure the > XJoinResultsFactory implementation > For example, in solrconfig.xml: > {code:xml} > class="org.apache.solr.search.xjoin.XJoinSearchComponent"> > test.TestXJoinResultsFactory > id > > 1,2,3 > > > {code} > Here, the search component instantiates a new TextXJoinResultsFactory during > initialisation, and passes it the "values" parameter (1, 2, 3) to configure > it. To properly use the XJoinSearchComponent in a request handler, it must be > included at the start and end of the component list, and may be configured > with the following query parameters: > * results - a comma-separated list of attributes from the XJoinResults > implementation (created by the factory at search time) to be included in the > SOLR results > * fl - a comma-separated list of attributes from results objects (contained > in an XJoinResults implementation) to be included in the SOLR results > For example: > {code:xml} > > > .. > true >
[jira] [Updated] (SOLR-7341) xjoin - join data from external sources
[ https://issues.apache.org/jira/browse/SOLR-7341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom Winch updated SOLR-7341: Attachment: SOLR-7341.patch Support for grouping > xjoin - join data from external sources > --- > > Key: SOLR-7341 > URL: https://issues.apache.org/jira/browse/SOLR-7341 > Project: Solr > Issue Type: New Feature > Components: search >Affects Versions: 4.10.3 >Reporter: Tom Winch >Priority: Minor > Fix For: Trunk > > Attachments: SOLR-7341.patch, SOLR-7341.patch, SOLR-7341.patch > > > h2. XJoin > The "xjoin" SOLR contrib allows external results to be joined with SOLR > results in a query and the SOLR result set to be filtered by the results of > an external query. Values from the external results are made available in the > SOLR results and may also be used to boost the scores of corresponding > documents during the search. The contrib consists of the Java classes > XJoinSearchComponent, XJoinValueSourceParser and XJoinQParserPlugin (and > associated classes), which must be configured in solrconfig.xml, and the > interfaces XJoinResultsFactory and XJoinResults, which are implemented by the > user to provide the link between SOLR and the external results source. > External results and SOLR documents are matched via a single configurable > attribute (the "join field"). The contrib JAR solr-xjoin-4.10.3.jar contains > these classes and interfaces and should be included in SOLR's class path from > solrconfig.xml, as should a JAR containing the user implementations of the > previously mentioned interfaces. For example: > {code:xml} > > .. > >/> > .. > > > .. > > {code} > h2. Java classes and interfaces > h3. XJoinResultsFactory > The user implementation of this interface is responsible for connecting to an > external source to perform a query (or otherwise collect results). Parameters > with prefix ".external." are passed from the SOLR query URL > to pararameterise the search. The interface has the following methods: > * void init(NamedList args) - this is called during SOLR initialisation, and > passed parameters from the search component configuration (see below) > * XJoinResults getResults(SolrParams params) - this is called during a SOLR > search to generate external results, and is passed parameters from the SOLR > query URL (as above) > For example, the implementation might perform queries of an external source > based on the 'q' SOLR query URL parameter (in full, name>.external.q). > h3. XJoinResults > A user implementation of this interface is returned by the getResults() > method of the XJoinResultsFactory implementation. It has methods: > * Object getResult(String joinId) - this should return a particular result > given the value of the join attribute > * Iterable getJoinIds() - this should return the join attribute > values for all results of the external search > h3. XJoinSearchComponent > This is the central Java class of the contrib. It is a SOLR search component, > configured in solrconfig.xml and included in one or more SOLR request > handlers. There is one XJoin search component per external source, and each > has two main responsibilities: > * Before the SOLR search, it connects to the external source and retrieves > results, storing them in the SOLR request context > * After the SOLR search, it matches SOLR document in the results set and > external results via the join field, adding attributes from the external > results to documents in the SOLR results set > It takes the following initialisation parameters: > * factoryClass - this specifies the user-supplied class implementing > XJoinResultsFactory, used to generate external results > * joinField - this specifies the attribute on which to join between SOLR > documents and external results > * external - this parameter set is passed to configure the > XJoinResultsFactory implementation > For example, in solrconfig.xml: > {code:xml} > class="org.apache.solr.search.xjoin.XJoinSearchComponent"> > test.TestXJoinResultsFactory > id > > 1,2,3 > > > {code} > Here, the search component instantiates a new TextXJoinResultsFactory during > initialisation, and passes it the "values" parameter (1, 2, 3) to configure > it. To properly use the XJoinSearchComponent in a request handler, it must be > included at the start and end of the component list, and may be configured > with the following query parameters: > * results - a comma-separated list of attributes from the XJoinResults > implementation (created by the factory at search time) to be included in the > SOLR results > * fl - a comma-separated list of attributes from results objects (contained > in an XJoinResults implementation) to be included in the SOLR results > For example: > {code:xml} >
[jira] [Updated] (SOLR-7341) xjoin - join data from external sources
[ https://issues.apache.org/jira/browse/SOLR-7341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom Winch updated SOLR-7341: Attachment: SOLR-7341.patch > xjoin - join data from external sources > --- > > Key: SOLR-7341 > URL: https://issues.apache.org/jira/browse/SOLR-7341 > Project: Solr > Issue Type: New Feature > Components: search >Affects Versions: 4.10.3 >Reporter: Tom Winch >Priority: Minor > Fix For: Trunk > > Attachments: SOLR-7341.patch, SOLR-7341.patch > > > h2. XJoin > The "xjoin" SOLR contrib allows external results to be joined with SOLR > results in a query and the SOLR result set to be filtered by the results of > an external query. Values from the external results are made available in the > SOLR results and may also be used to boost the scores of corresponding > documents during the search. The contrib consists of the Java classes > XJoinSearchComponent, XJoinValueSourceParser and XJoinQParserPlugin (and > associated classes), which must be configured in solrconfig.xml, and the > interfaces XJoinResultsFactory and XJoinResults, which are implemented by the > user to provide the link between SOLR and the external results source. > External results and SOLR documents are matched via a single configurable > attribute (the "join field"). The contrib JAR solr-xjoin-4.10.3.jar contains > these classes and interfaces and should be included in SOLR's class path from > solrconfig.xml, as should a JAR containing the user implementations of the > previously mentioned interfaces. For example: > {code:xml} > > .. > >/> > .. > > > .. > > {code} > h2. Java classes and interfaces > h3. XJoinResultsFactory > The user implementation of this interface is responsible for connecting to an > external source to perform a query (or otherwise collect results). Parameters > with prefix ".external." are passed from the SOLR query URL > to pararameterise the search. The interface has the following methods: > * void init(NamedList args) - this is called during SOLR initialisation, and > passed parameters from the search component configuration (see below) > * XJoinResults getResults(SolrParams params) - this is called during a SOLR > search to generate external results, and is passed parameters from the SOLR > query URL (as above) > For example, the implementation might perform queries of an external source > based on the 'q' SOLR query URL parameter (in full, name>.external.q). > h3. XJoinResults > A user implementation of this interface is returned by the getResults() > method of the XJoinResultsFactory implementation. It has methods: > * Object getResult(String joinId) - this should return a particular result > given the value of the join attribute > * Iterable getJoinIds() - this should return the join attribute > values for all results of the external search > h3. XJoinSearchComponent > This is the central Java class of the contrib. It is a SOLR search component, > configured in solrconfig.xml and included in one or more SOLR request > handlers. There is one XJoin search component per external source, and each > has two main responsibilities: > * Before the SOLR search, it connects to the external source and retrieves > results, storing them in the SOLR request context > * After the SOLR search, it matches SOLR document in the results set and > external results via the join field, adding attributes from the external > results to documents in the SOLR results set > It takes the following initialisation parameters: > * factoryClass - this specifies the user-supplied class implementing > XJoinResultsFactory, used to generate external results > * joinField - this specifies the attribute on which to join between SOLR > documents and external results > * external - this parameter set is passed to configure the > XJoinResultsFactory implementation > For example, in solrconfig.xml: > {code:xml} > class="org.apache.solr.search.xjoin.XJoinSearchComponent"> > test.TestXJoinResultsFactory > id > > 1,2,3 > > > {code} > Here, the search component instantiates a new TextXJoinResultsFactory during > initialisation, and passes it the "values" parameter (1, 2, 3) to configure > it. To properly use the XJoinSearchComponent in a request handler, it must be > included at the start and end of the component list, and may be configured > with the following query parameters: > * results - a comma-separated list of attributes from the XJoinResults > implementation (created by the factory at search time) to be included in the > SOLR results > * fl - a comma-separated list of attributes from results objects (contained > in an XJoinResults implementation) to be included in the SOLR results > For example: > {code:xml} > > > .. > true > xx >
[jira] [Updated] (SOLR-7341) xjoin - join data from external sources
[ https://issues.apache.org/jira/browse/SOLR-7341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom Winch updated SOLR-7341: Description: h2. XJoin The "xjoin" SOLR contrib allows external results to be joined with SOLR results in a query and the SOLR result set to be filtered by the results of an external query. Values from the external results are made available in the SOLR results and may also be used to boost the scores of corresponding documents during the search. The contrib consists of the Java classes XJoinSearchComponent, XJoinValueSourceParser and XJoinQParserPlugin (and associated classes), which must be configured in solrconfig.xml, and the interfaces XJoinResultsFactory and XJoinResults, which are implemented by the user to provide the link between SOLR and the external results source. External results and SOLR documents are matched via a single configurable attribute (the "join field"). The contrib JAR solr-xjoin-4.10.3.jar contains these classes and interfaces and should be included in SOLR's class path from solrconfig.xml, as should a JAR containing the user implementations of the previously mentioned interfaces. For example: {code:xml} .. .. .. {code} h2. Java classes and interfaces h3. XJoinResultsFactory The user implementation of this interface is responsible for connecting to an external source to perform a query (or otherwise collect results). Parameters with prefix ".external." are passed from the SOLR query URL to pararameterise the search. The interface has the following methods: * void init(NamedList args) - this is called during SOLR initialisation, and passed parameters from the search component configuration (see below) * XJoinResults getResults(SolrParams params) - this is called during a SOLR search to generate external results, and is passed parameters from the SOLR query URL (as above) For example, the implementation might perform queries of an external source based on the 'q' SOLR query URL parameter (in full, .external.q). h3. XJoinResults A user implementation of this interface is returned by the getResults() method of the XJoinResultsFactory implementation. It has methods: * Object getResult(String joinId) - this should return a particular result given the value of the join attribute * Iterable getJoinIds() - this should return the join attribute values for all results of the external search h3. XJoinSearchComponent This is the central Java class of the contrib. It is a SOLR search component, configured in solrconfig.xml and included in one or more SOLR request handlers. There is one XJoin search component per external source, and each has two main responsibilities: * Before the SOLR search, it connects to the external source and retrieves results, storing them in the SOLR request context * After the SOLR search, it matches SOLR document in the results set and external results via the join field, adding attributes from the external results to documents in the SOLR results set It takes the following initialisation parameters: * factoryClass - this specifies the user-supplied class implementing XJoinResultsFactory, used to generate external results * joinField - this specifies the attribute on which to join between SOLR documents and external results * external - this parameter set is passed to configure the XJoinResultsFactory implementation For example, in solrconfig.xml: {code:xml} test.TestXJoinResultsFactory id 1,2,3 {code} Here, the search component instantiates a new TextXJoinResultsFactory during initialisation, and passes it the "values" parameter (1, 2, 3) to configure it. To properly use the XJoinSearchComponent in a request handler, it must be included at the start and end of the component list, and may be configured with the following query parameters: * results - a comma-separated list of attributes from the XJoinResults implementation (created by the factory at search time) to be included in the SOLR results * fl - a comma-separated list of attributes from results objects (contained in an XJoinResults implementation) to be included in the SOLR results For example: {code:xml} .. true xx test_count id,value xjoin_test xjoin_test {code} h3. XJoinQParserPlugin This query parser plugin constructs a query from the results of the external searches, and is based on the TermsQParserPlugin. It takes the following local parameters: * method - as the TermsQParserPlugin, this specifies how to build the Lucene query based on the join ids contained in external results; one of termsFilter, booleanQuery, automaton, or docValuesTermsFilter (defaults to termsFilter) * v (or as usual with query parsers, specified via the query) - a Boolean combination of XJoin search component names. Supported operators are OR, AND, XOR, and AND NOT The query is a Boolea
[jira] [Updated] (SOLR-7341) xjoin - join data from external sources
[ https://issues.apache.org/jira/browse/SOLR-7341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom Winch updated SOLR-7341: Description: h2. XJoin The "xjoin" SOLR contrib allows external results to be joined with SOLR results in a query and the SOLR result set to be filtered by the results of an external query. Values from the external results are made available in the SOLR results and may also be used to boost the scores of corresponding documents during the search. The contrib consists of the Java classes XJoinSearchComponent, XJoinValueSourceParser and XJoinQParserPlugin (and associated classes), which must be configured in solrconfig.xml, and the interfaces XJoinResultsFactory and XJoinResults, which are implemented by the user to provide the link between SOLR and the external results source. External results and SOLR documents are matched via a single configurable attribute (the "join field"). The contrib JAR solr-xjoin-4.10.3.jar contains these classes and interfaces and should be included in SOLR's class path from solrconfig.xml, as should a JAR containing the user implementations of the previously mentioned interfaces. For example: {code:xml} .. .. .. {code} h2. Java classes and interfaces h3. XJoinResultsFactory The user implementation of this interface is responsible for connecting to an external source to perform a query (or otherwise collect results). Parameters with prefix ".external." are passed from the SOLR query URL to pararameterise the search. The interface has the following methods: * void init(NamedList args) - this is called during SOLR initialisation, and passed parameters from the search component configuration (see below) * XJoinResults getResults(SolrParams params) - this is called during a SOLR search to generate external results, and is passed parameters from the SOLR query URL (as above) For example, the implementation might perform queries of an external source based on the 'q' SOLR query URL parameter (in full, .external.q). h3. XJoinResults A user implementation of this interface is returned by the getResults() method of the XJoinResultsFactory implementation. It has methods: * Object getResult(String joinId) - this should return a particular result given the value of the join attribute * Iterable getJoinIds() - this should return the join attribute values for all results of the external search h3. XJoinSearchComponent This is the central Java class of the contrib. It is a SOLR search component, configured in solrconfig.xml and included in one or more SOLR request handlers. There is one XJoin search component per external source, and each has two main responsibilities: * Before the SOLR search, it connects to the external source and retrieves results, storing them in the SOLR request context * After the SOLR search, it matches SOLR document in the results set and external results via the join field, adding attributes from the external results to documents in the SOLR results set It takes the following initialisation parameters: * factoryClass - this specifies the user-supplied class implementing XJoinResultsFactory, used to generate external results * joinField - this specifies the attribute on which to join between SOLR documents and external results * external - this parameter set is passed to configure the XJoinResultsFactory implementation For example, in solrconfig.xml: {code:xml} test.TestXJoinResultsFactory id 1,2,3 {code} Here, the search component instantiates a new TextXJoinResultsFactory during initialisation, and passes it the "values" parameter (1, 2, 3) to configure it. To properly use the XJoinSearchComponent in a request handler, it must be included at the start and end of the component list, and may be configured with the following query parameters: * results - a comma-separated list of attributes from the XJoinResults implementation (created by the factory at search time) to be included in the SOLR results * fl - a comma-separated list of attributes from results objects (contained in an XJoinResults implementation) to be included in the SOLR results For example: {code:xml} .. true xx test_count id,value xjoin_test xjoin_test {code} h3. XJoinQParserPlugin This query parser plugin constructs a query from the results of the external searches, and is based on the TermsQParserPlugin. It takes the following local parameters: * method - as the TermsQParserPlugin, this specifies how to build the Lucene query based on the join ids contained in external results; one of termsFilter, booleanQuery, automaton, or docValuesTermsFilter (defaults to termsFilter) * v (or as usual with query parsers, specified via the query) - a Boolean combination of XJoin search component names. Supported operators are OR, AND, XOR, and AND NOT The query is a Boolea
[jira] [Updated] (SOLR-7341) xjoin - join data from external sources
[ https://issues.apache.org/jira/browse/SOLR-7341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom Winch updated SOLR-7341: Description: h2. XJoin The "xjoin" SOLR contrib allows external results to be joined with SOLR results in a query and the SOLR result set to be filtered by the results of an external query. Values from the external results are made available in the SOLR results and may also be used to boost the scores of corresponding documents during the search. The contrib consists of the Java classes XJoinSearchComponent, XJoinValueSourceParser and XJoinQParserPlugin (and associated classes), which must be configured in solrconfig.xml, and the interfaces XJoinResultsFactory and XJoinResults, which are implemented by the user to provide the link between SOLR and the external results source. External results and SOLR documents are matched via a single configurable attribute (the "join field"). The contrib JAR solr-xjoin-4.10.3.jar contains these classes and interfaces and should be included in SOLR's class path from solrconfig.xml, as should a JAR containing the user implementations of the previously mentioned interfaces. For example: {code:xml} .. .. .. {code} h2. Java classes and interfaces h3. XJoinResultsFactory The user implementation of this interface is responsible for connecting to an external source to perform a query (or otherwise collect results). Parameters with prefix ".external." are passed from the SOLR query URL to pararameterise the search. The interface has the following methods: * void init(NamedList args) - this is called during SOLR initialisation, and passed parameters from the search component configuration (see below) * XJoinResults getResults(SolrParams params) - this is called during a SOLR search to generate external results, and is passed parameters from the SOLR query URL (as above) For example, the implementation might perform queries of an external source based on the 'q' SOLR query URL parameter (in full, .external.q). h3. XJoinResults A user implementation of this interface is returned by the getResults() method of the XJoinResultsFactory implementation. It has methods: * Object getResult(String joinId) - this should return a particular result given the value of the join attribute * Iterable getJoinIds() - this should return the join attribute values for all results of the external search h3. XJoinSearchComponent This is the central Java class of the contrib. It is a SOLR search component, configured in solrconfig.xml and included in one or more SOLR request handlers. There is one XJoin search component per external source, and each has two main responsibilities: * Before the SOLR search, it connects to the external source and retrieves results, storing them in the SOLR request context * After the SOLR search, it matches SOLR document in the results set and external results via the join field, adding attributes from the external results to documents in the SOLR results set It takes the following initialisation parameters: * factoryClass - this specifies the user-supplied class implementing XJoinResultsFactory, used to generate external results * joinField - this specifies the attribute on which to join between SOLR documents and external results * external - this parameter set is passed to configure the XJoinResultsFactory implementation For example, in solrconfig.xml: {code:xml} test.TestXJoinResultsFactory id 1,2,3 {code} Here, the search component instantiates a new TextXJoinResultsFactory during initialisation, and passes it the "values" parameter (1, 2, 3) to configure it. To properly use the XJoinSearchComponent in a request handler, it must be included at the start and end of the component list, and may be configured with the following query parameters: * results - a comma-separated list of attributes from the XJoinResults implementation (created by the factory at search time) to be included in the SOLR results * fl - a comma-separated list of attributes from results objects (contained in an XJoinResults implementation) to be included in the SOLR results For example: {code:xml} .. true xx test_count id,value xjoin_test xjoin_test {code} h3. XJoinQParserPlugin This query parser plugin constructs a query from the results of the external searches, and is based on the TermsQParserPlugin. It takes the following local parameters: * method - as the TermsQParserPlugin, this specifies how to build the Lucene query based on the join ids contained in external results; one of termsFilter, booleanQuery, automaton, or docValuesTermsFilter (defaults to termsFilter) * v (or as usual with query parsers, specified via the query) - a Boolean combination of XJoin search component names. Supported operators are OR, AND, XOR, and AND NOT The query is a Boolea
[jira] [Updated] (SOLR-7341) xjoin - join data from external sources
[ https://issues.apache.org/jira/browse/SOLR-7341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom Winch updated SOLR-7341: Attachment: SOLR-7341.patch > xjoin - join data from external sources > --- > > Key: SOLR-7341 > URL: https://issues.apache.org/jira/browse/SOLR-7341 > Project: Solr > Issue Type: New Feature > Components: search >Affects Versions: 4.10.3 >Reporter: Tom Winch >Priority: Minor > Fix For: Trunk > > Attachments: SOLR-7341.patch > > > h2. XJoin > The "xjoin" SOLR contrib allows external results to be joined with SOLR > results in a query and the SOLR result set to be filtered by the results of > an external query. Values from the external results are made available in the > SOLR results and may also be used to boost the scores of corresponding > documents during the search. The contrib consists of the Java classes > XJoinSearchComponent and XJoinValueSourceParser, which must be configured in > solrconfig.xml, and the interfaces XJoinResultsFactory and XJoinResults, > which are implemented by the user to provide the link between SOLR and the > external results source. External results and SOLR documents are matched via > a single configurable attribute (the "join field"). The contrib JAR > solr-xjoin-4.10.3.jar contains these classes and interfaces and should be > included in SOLR's class path from solrconfig.xml, as should a JAR containing > the user implementations of the previously mentioned interfaces. For example: > {code:xml} > > .. > >/> > .. > > > .. > > {code} > h2. Java classes and interfaces > h3. XJoinResultsFactory > The user implementation of this interface is responsible for connecting to > the external source to perform a query (or otherwise collect results). > Parameters with prefix ".external." are passed from the SOLR > query URL to pararameterise the search. The interface has the following > methods: > * void init(NamedList args) - this is called during SOLR initialisation, and > passed parameters from the search component configuration (see below) > * XJoinResults getResults(SolrParams params) - this is called during a SOLR > search to generate external results, and is passed parameters from the SOLR > query URL (as above) > For example, the implementation might perform queries of an external source > based on the 'q' SOLR query URL parameter (in full, name>.external.q). > h3. XJoinResults > A user implementation of this interface is returned by the getResults() > method of the XJoinResultsFactory implementation. It has methods: > * Object getResult(String joinId) - this should return a particular result > given the value of the join attribute > * Iterable getJoinIds() - this should return the join attribute > values for all results of the external search > h3. XJoinSearchComponent > This is the central Java class of the contrib. It is a SOLR search component, > configured in solrconfig.xml and included in one or more SOLR request > handlers. It has two main responsibilities: > * Before the SOLR search, it connects to the external source and retrieves > results, storing them in the SOLR request context > * After the SOLR search, it matches SOLR document in the results set and > external results via the join field, adding attributes from the external > results to documents in the SOLR results set > It takes the following initialisation parameters: > * factoryClass - this specifies the user-supplied class implementing > XJoinResultsFactory, used to generate external results > * joinField - this specifies the attribute on which to join between SOLR > documents and external results > * external - this parameter set is passed to configure the > XJoinResultsFactory implementation > For example, in solrconfig.xml: > {code:xml} > class="org.apache.solr.search.xjoin.XJoinSearchComponent"> > test.TestXJoinResultsFactory > id > > 1,2,3 > > > {code} > Here, the search component instantiates a new TextXJoinResultsFactory during > initialisation, and passes it the "values" parameter (1, 2, 3) to configure > it. To properly use the XJoinSearchComponent in a request handler, it must be > included at the start and end of the component list, and may be configured > with the following query parameters: > * results - a comma-separated list of attributes from the XJoinResults > implementation (created by the factory at search time) to be included in the > SOLR results > * fl - a comma-separated list of attributes from results objects (contained > in an XJoinResults implementation) to be included in the SOLR results > For example: > {code:xml} > > > .. > true > xx > test_count > id,value > > > xjoin_test > > > xjoin_test > > > {code} > h3. XJoinQParserPlugin >
[jira] [Updated] (SOLR-7341) xjoin - join data from external sources
[ https://issues.apache.org/jira/browse/SOLR-7341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom Winch updated SOLR-7341: Description: h2. XJoin The "xjoin" SOLR contrib allows external results to be joined with SOLR results in a query and the SOLR result set to be filtered by the results of an external query. Values from the external results are made available in the SOLR results and may also be used to boost the scores of corresponding documents during the search. The contrib consists of the Java classes XJoinSearchComponent and XJoinValueSourceParser, which must be configured in solrconfig.xml, and the interfaces XJoinResultsFactory and XJoinResults, which are implemented by the user to provide the link between SOLR and the external results source. External results and SOLR documents are matched via a single configurable attribute (the "join field"). The contrib JAR solr-xjoin-4.10.3.jar contains these classes and interfaces and should be included in SOLR's class path from solrconfig.xml, as should a JAR containing the user implementations of the previously mentioned interfaces. For example: {code:xml} .. .. .. {code} h2. Java classes and interfaces h3. XJoinResultsFactory The user implementation of this interface is responsible for connecting to the external source to perform a query (or otherwise collect results). Parameters with prefix ".external." are passed from the SOLR query URL to pararameterise the search. The interface has the following methods: * void init(NamedList args) - this is called during SOLR initialisation, and passed parameters from the search component configuration (see below) * XJoinResults getResults(SolrParams params) - this is called during a SOLR search to generate external results, and is passed parameters from the SOLR query URL (as above) For example, the implementation might perform queries of an external source based on the 'q' SOLR query URL parameter (in full, .external.q). h3. XJoinResults A user implementation of this interface is returned by the getResults() method of the XJoinResultsFactory implementation. It has methods: * Object getResult(String joinId) - this should return a particular result given the value of the join attribute * Iterable getJoinIds() - this should return the join attribute values for all results of the external search h3. XJoinSearchComponent This is the central Java class of the contrib. It is a SOLR search component, configured in solrconfig.xml and included in one or more SOLR request handlers. It has two main responsibilities: * Before the SOLR search, it connects to the external source and retrieves results, storing them in the SOLR request context * After the SOLR search, it matches SOLR document in the results set and external results via the join field, adding attributes from the external results to documents in the SOLR results set It takes the following initialisation parameters: * factoryClass - this specifies the user-supplied class implementing XJoinResultsFactory, used to generate external results * joinField - this specifies the attribute on which to join between SOLR documents and external results * external - this parameter set is passed to configure the XJoinResultsFactory implementation For example, in solrconfig.xml: {code:xml} test.TestXJoinResultsFactory id 1,2,3 {code} Here, the search component instantiates a new TextXJoinResultsFactory during initialisation, and passes it the "values" parameter (1, 2, 3) to configure it. To properly use the XJoinSearchComponent in a request handler, it must be included at the start and end of the component list, and may be configured with the following query parameters: * results - a comma-separated list of attributes from the XJoinResults implementation (created by the factory at search time) to be included in the SOLR results * fl - a comma-separated list of attributes from results objects (contained in an XJoinResults implementation) to be included in the SOLR results For example: {code:xml} .. true xx test_count id,value xjoin_test xjoin_test {code} h3. XJoinQParserPlugin This query parser plugin constructs a query from the resulting join ids from the external search, and is very similar to the TermsQParserPlugin. It takes no parameters, and the value to be parsed is the name of the XJoin search component that contains the results. h3. XJoinValueSourceParser This class provides a SOLR function that may be used, for example, in a boost function to weight the result score from external values. The function returns an attribute value from the external result with matching join attribute. The external attribute returned is specified by the argument of the function specification in the SOLR query URL (see below). The parameters for configuration in solrconfig.xml are: