You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by khirb7 <kh...@gmail.com> on 2008/04/13 16:37:20 UTC
how to apply a patch
hello every body
May be it's a stupid question as I am new in Solr, I want to know how to
apply a patch, for example this one that I find here:
https://issues.apache.org/jira/browse/SOLR-225
SOLR-225+260-HighlightPlugins.patch
SOLR-225-HighlightingConfig.patch
to Allow pluggable Highlighting classes -- Formatters and Fragmenters,
are these two files are one patch or two differente patch and how to apply
them.
thank you in advance.
--
View this message in context: http://www.nabble.com/how-to-apply-a-patch-tp16659477p16659477.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: how to apply a patch
Posted by Grant Ingersoll <gs...@apache.org>.
Note, this patch has been applied to trunk.
At any rate, here's what I did for this patch:
Downloaded to my Solr patches directory from the JIRA website
My setup looks like:
./patches
./solr-clean #contains a clean copy of Solr. It never has
uncommitted patches on it
On the command line
>cd ./solr-clean
>svn up
>patch -p 0 -i ../patches/SOLR-225+260-HighlightPlugins.patch
You could optionally add the --dry-run flag if you want to see
if it applies cleanly w/o affecting the files.
Then, assuming it applies cleanly, you would do:
ant clean dist example
if you wanted to generate new jars and the example.
On Apr 14, 2008, at 12:30 PM, khirb7 wrote:
>
>
>
> Grant Ingersoll-6 wrote:
>>
>> I generally do:
>>
>> svn up (make sure I am up to date)
>> patch -p 0 -i <path to patch> [--dry-run]
>>
>> I usually do the --dry-run first to see if it applies cleanly, then
>> drop it if it does.
>>
>> HTH,
>> Grant
>>
>> On Apr 13, 2008, at 10:37 AM, khirb7 wrote:
>>
>>>
>>> hello every body
>>>
>>> May be it's a stupid question as I am new in Solr, I want to know
>>> how to
>>> apply a patch, for example this one that I find here:
>>> https://issues.apache.org/jira/browse/SOLR-225
>>> SOLR-225+260-HighlightPlugins.patch
>>> SOLR-225-HighlightingConfig.patch
>>> to Allow pluggable Highlighting classes -- Formatters and
>>> Fragmenters,
>>> are these two files are one patch or two differente patch and how to
>>> apply
>>> them.
>>>
>>> thank you in advance.
>>> --
>>> View this message in context:
>>> http://www.nabble.com/how-to-apply-a-patch-tp16659477p16659477.html
>>> Sent from the Solr - User mailing list archive at Nabble.com.
>>>
>>
>> --------------------------
>> Grant Ingersoll
>>
>> Lucene Helpful Hints:
>> http://wiki.apache.org/lucene-java/BasicsOfPerformance
>> http://wiki.apache.org/lucene-java/LuceneFAQ
>>
>
> thank you Grant,
> could you please give me an example how to patch because I am new in
> solr
> and linux too:
>
> first of all I am little bit confused by : <path to patch>
> here patch
> -p 0 -i <path to patch> [--dry-run]
> <path to patch> does it mean where is the patch file located after
> downloading eg: /tmp/SOLR-225-HighlightingConfig.patch ?
>
> secondly may I be at solr home directory when I apply the patch
> like this:
>
> khitb7@khal:~solr$ svn up
> khitb7@khal:~solr$ patch -p 0 -i /tmp/SOLR-225-
> HighlightingConfig.patch
> [--dry-run]
>
> then: I suppose that the changes will affect the .java or
> (.xml )file
> which location is specified in the the patch file for example by :
>
> Index: src/test/test-files/solr/conf/solrconfig.xml
> ===================================================================
> --- src/test/test-files/solr/conf/solrconfig.xml (revision 546303)
> +++ src/test/test-files/solr/conf/solrconfig.xml (working copy)
>
> and by :
>
> Index: src/test/org/apache/solr/highlight/HighlighterTest.java
> ===================================================================
> --- src/test/org/apache/solr/highlight/HighlighterTest.java
> (revision 0)
> +++ src/test/org/apache/solr/highlight/HighlighterTest.java
> (revision 0)
>
>
>
> located for example in :
> /tmp/apache-solr-1.2.0/src/test/org/apache/solr/hightlight
>
>
> After a patch is applied do I have to compile the updated *.java
> file
> and how to incorporate it again in the .jar file then after to
> the lib
> directory of the .war file of solr. (I am using eclipse).
>
> I think that these are little basic (stupid) questions but
>
> I will be really gratefull to any response, any answer is welcome.
>
>
>
> --
> View this message in context: http://www.nabble.com/how-to-apply-a-patch-tp16659477p16678819.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
--------------------------
Grant Ingersoll
Lucene Helpful Hints:
http://wiki.apache.org/lucene-java/BasicsOfPerformance
http://wiki.apache.org/lucene-java/LuceneFAQ
Re: how to apply a patch
Posted by khirb7 <kh...@gmail.com>.
Grant Ingersoll-6 wrote:
>
> I generally do:
>
> svn up (make sure I am up to date)
> patch -p 0 -i <path to patch> [--dry-run]
>
> I usually do the --dry-run first to see if it applies cleanly, then
> drop it if it does.
>
> HTH,
> Grant
>
> On Apr 13, 2008, at 10:37 AM, khirb7 wrote:
>
>>
>> hello every body
>>
>> May be it's a stupid question as I am new in Solr, I want to know
>> how to
>> apply a patch, for example this one that I find here:
>> https://issues.apache.org/jira/browse/SOLR-225
>> SOLR-225+260-HighlightPlugins.patch
>> SOLR-225-HighlightingConfig.patch
>> to Allow pluggable Highlighting classes -- Formatters and
>> Fragmenters,
>> are these two files are one patch or two differente patch and how to
>> apply
>> them.
>>
>> thank you in advance.
>> --
>> View this message in context:
>> http://www.nabble.com/how-to-apply-a-patch-tp16659477p16659477.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>>
>
> --------------------------
> Grant Ingersoll
>
> Lucene Helpful Hints:
> http://wiki.apache.org/lucene-java/BasicsOfPerformance
> http://wiki.apache.org/lucene-java/LuceneFAQ
>
thank you Grant,
could you please give me an example how to patch because I am new in solr
and linux too:
first of all I am little bit confused by : <path to patch> here patch
-p 0 -i <path to patch> [--dry-run]
<path to patch> does it mean where is the patch file located after
downloading eg: /tmp/SOLR-225-HighlightingConfig.patch ?
secondly may I be at solr home directory when I apply the patch like this:
khitb7@khal:~solr$ svn up
khitb7@khal:~solr$ patch -p 0 -i /tmp/SOLR-225-HighlightingConfig.patch
[--dry-run]
then: I suppose that the changes will affect the .java or (.xml )file
which location is specified in the the patch file for example by :
Index: src/test/test-files/solr/conf/solrconfig.xml
===================================================================
--- src/test/test-files/solr/conf/solrconfig.xml (revision 546303)
+++ src/test/test-files/solr/conf/solrconfig.xml (working copy)
and by :
Index: src/test/org/apache/solr/highlight/HighlighterTest.java
===================================================================
--- src/test/org/apache/solr/highlight/HighlighterTest.java (revision 0)
+++ src/test/org/apache/solr/highlight/HighlighterTest.java (revision 0)
located for example in :
/tmp/apache-solr-1.2.0/src/test/org/apache/solr/hightlight
After a patch is applied do I have to compile the updated *.java file
and how to incorporate it again in the .jar file then after to the lib
directory of the .war file of solr. (I am using eclipse).
I think that these are little basic (stupid) questions but
I will be really gratefull to any response, any answer is welcome.
--
View this message in context: http://www.nabble.com/how-to-apply-a-patch-tp16659477p16678819.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: how to apply a patch
Posted by Grant Ingersoll <gs...@apache.org>.
I generally do:
svn up (make sure I am up to date)
patch -p 0 -i <path to patch> [--dry-run]
I usually do the --dry-run first to see if it applies cleanly, then
drop it if it does.
HTH,
Grant
On Apr 13, 2008, at 10:37 AM, khirb7 wrote:
>
> hello every body
>
> May be it's a stupid question as I am new in Solr, I want to know
> how to
> apply a patch, for example this one that I find here:
> https://issues.apache.org/jira/browse/SOLR-225
> SOLR-225+260-HighlightPlugins.patch
> SOLR-225-HighlightingConfig.patch
> to Allow pluggable Highlighting classes -- Formatters and
> Fragmenters,
> are these two files are one patch or two differente patch and how to
> apply
> them.
>
> thank you in advance.
> --
> View this message in context: http://www.nabble.com/how-to-apply-a-patch-tp16659477p16659477.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
--------------------------
Grant Ingersoll
Lucene Helpful Hints:
http://wiki.apache.org/lucene-java/BasicsOfPerformance
http://wiki.apache.org/lucene-java/LuceneFAQ