[ 
https://issues.apache.org/jira/browse/SOLR-4787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13691612#comment-13691612
 ] 

Kranti Parisa commented on SOLR-4787:
-------------------------------------

I am trying to apply this patch on branch_4x code 
(http://svn.apache.org/repos/asf/lucene/dev/branches/branch_4x). but getting 
the following error, any idea?

wget https://issues.apache.org/jira/secure/attachment/12587067/SOLR-4787.patch 
-O - | patch -p0 --dry-run

--2013-06-23 17:35:32--  
https://issues.apache.org/jira/secure/attachment/12587067/SOLR-4787.patch
Resolving issues.apache.org... 140.211.11.121
Connecting to issues.apache.org|140.211.11.121|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 26641 (26K) [text/x-patch]
Saving to: `STDOUT'

100%[===========================================================>] 26,641       
143K/s   in 0.2s

2013-06-23 17:35:32 (143 KB/s) - written to stdout [26641/26641]

patching file solr/example/solr/collection1/conf/solrconfig.xml
Hunk #1 FAILED at 81.
Hunk #2 succeeded at 515 (offset -2 lines).
Hunk #3 succeeded at 564 (offset -2 lines).
Hunk #4 succeeded at 1535 (offset 6 lines).
Hunk #5 succeeded at 1548 (offset 6 lines).
Hunk #6 succeeded at 1788 (offset 6 lines).
Hunk #7 succeeded at 1803 (offset 6 lines).
1 out of 7 hunks FAILED -- saving rejects to file 
solr/example/solr/collection1/conf/solrconfig.xml.rej
patching file solr/example/exampledocs/mem.xml
patching file solr/contrib/joins/ivy.xml
patching file solr/contrib/joins/src/java/org/apache/solr/joins/CacheSet.java
patching file 
solr/contrib/joins/src/java/org/apache/solr/joins/SegmentBitSetCollector.java
patching file 
solr/contrib/joins/src/java/org/apache/solr/joins/PostFilterJoinQParserPlugin.java
patching file 
solr/contrib/joins/src/java/org/apache/solr/joins/ValueSourceJoinParserPlugin.java
patching file solr/contrib/joins/README.txt
patching file solr/contrib/joins/build.xml
                
> Join Contrib
> ------------
>
>                 Key: SOLR-4787
>                 URL: https://issues.apache.org/jira/browse/SOLR-4787
>             Project: Solr
>          Issue Type: New Feature
>          Components: search
>    Affects Versions: 4.2.1
>            Reporter: Joel Bernstein
>            Priority: Minor
>             Fix For: 4.4
>
>         Attachments: SOLR-4787.patch, SOLR-4787.patch, SOLR-4787.patch, 
> SOLR-4787.patch, SOLR-4787.patch, SOLR-4787.patch, SOLR-4787.patch, 
> SOLR-4787.patch, SOLR-4787.patch
>
>
> This contrib provides a place where different join implementations can be 
> contributed to Solr. This contrib currently includes 2 join implementations. 
> The initial patch was generated from the Solr 4.3 tag. Because of changes in 
> the FieldCache API this patch will only build with Solr 4.2 or above.
> *PostFilterJoinQParserPlugin aka "pjoin"*
> The pjoin provides a join implementation that filters results in one core 
> based on the results of a search in another core. This is similar in 
> functionality to the JoinQParserPlugin but the implementation differs in a 
> couple of important ways.
> The first way is that the pjoin is designed to work with integer join keys 
> only. So, in order to use pjoin, integer join keys must be included in both 
> the to and from core.
> The second difference is that the pjoin builds memory structures that are 
> used to quickly connect the join keys. It also uses a custom SolrCache named 
> "join" to hold intermediate DocSets which are needed to build the join memory 
> structures. So, the pjoin will need more memory then the JoinQParserPlugin to 
> perform the join.
> The main advantage of the pjoin is that it can scale to join millions of keys 
> between cores.
> Because it's a PostFilter, it only needs to join records that match the main 
> query.
> The syntax of the pjoin is the same as the JoinQParserPlugin except that the 
> plugin is referenced by the string "pjoin" rather then "join".
> fq=\{!pjoin fromCore=collection2 from=id_i to=id_i\}user:customer1
> The example filter query above will search the fromCore (collection2) for 
> "user:customer1". This query will generate a list of values from the "from" 
> field that will be used to filter the main query. Only records from the main 
> query, where the "to" field is present in the "from" list will be included in 
> the results.
> The solrconfig.xml in the main query core must contain the reference to the 
> pjoin.
> <queryParser name="pjoin" 
> class="org.apache.solr.joins.PostFilterJoinQParserPlugin"/>
> And the join contrib jars must be registed in the solrconfig.xml.
> <lib dir="../../../dist/" regex="solr-joins-\d.*\.jar" />
> The solrconfig.xml in the fromcore must have the "join" SolrCache configured.
>  <cache name="join"
>               class="solr.LRUCache"
>               size="4096"
>               initialSize="1024"
>               />
> *ValueSourceJoinParserPlugin aka vjoin*
> The second implementation is the ValueSourceJoinParserPlugin aka "vjoin". 
> This implements a ValueSource function query that can return a value from a 
> second core based on join keys and limiting query. The limiting query can be 
> used to select a specific subset of data from the join core. This allows 
> customer specific relevance data to be stored in a separate core and then 
> joined in the main query.
> The vjoin is called using the "vjoin" function query. For example:
> bf=vjoin(fromCore, fromKey, fromVal, toKey, query)
> This example shows "vjoin" being called by the edismax boost function 
> parameter. This example will return the "fromVal" from the "fromCore". The 
> "fromKey" and "toKey" are used to link the records from the main query to the 
> records in the "fromCore". The "query" is used to select a specific set of 
> records to join with in fromCore.
> Currently the fromKey and toKey must be longs but this will change in future 
> versions. Like the pjoin, the "join" SolrCache is used to hold the join 
> memory structures.
> To configure the vjoin you must register the ValueSource plugin in the 
> solrconfig.xml as follows:
> <valueSourceParser name="vjoin" 
> class="org.apache.solr.joins.ValueSourceJoinParserPlugin" />

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to