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 harshchawla <ha...@livecareer.com> on 2013/08/23 12:59:09 UTC

How to patch Solr4.2 for SolrEnityProcessor Sub-Enity issue

According to
http://stackoverflow.com/questions/15734308/solrentityprocessor-is-called-only-once-for-sub-entities?lq=1
we can use the patched SolrEntityProcessor in
https://issues.apache.org/jira/browse/SOLR-3336?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel
to solve the subentity problem.

I tried renaming the jar file to zip and then try replacing the patched file
but as I got only java file I can't replace it with class file. So I drop
this idea.

Here is then what I have tried. I decompiled the original jar
solr-dataimporthandler-4.2.0.jar present in solr 4.2 package. Then I replace
the patch file. And try to compile the files for making the jar again. But I
started getting compilation errors.

.\org\apache\solr\handler\dataimport\XPathEntityProcessor.java:397: ')'
expected

/* 432 / if (XPathEntityProcessor.2.this.val$isEnd.get()) { ^
.\org\apache\solr\handler\dataimport\XPathEntityProcessor.java:397: expected
/ 432 / if (XPathEntityProcessor.2.this.val$isEnd.get()) { ^
.\org\apache\solr\handler\dataimport\XPathEntityProcessor.java:397: not a
statem ent / 432 / if (XPathEntityProcessor.2.this.val$isEnd.get()) { ^
.\org\apache\solr\handler\dataimport\XPathEntityProcessor.java:397: illegal
star t of expression / 432 */ if
(XPathEntityProcessor.2.this.val$isEnd.get()) { ^
.\org\apache\solr\handler\dataimport\XPathEntityProcessor.java:397: ';'
expected

/* 432 */ if (XPathEntityProcessor.2.this.val$isEnd.get()) { ^
.\org\apache\solr\handler\dataimport\XPathEntityProcessor.java:397: ';'
expected

/* 432 / if (XPathEntityProcessor.2.this.val$isEnd.get()) { ^
.\org\apache\solr\handler\dataimport\XPathEntityProcessor.java:398: not a
statem ent / 433 */ XPathEntityProcessor.2.this.val$throwExp.set(false); ^
.\org\apache\solr\handler\dataimport\XPathEntityProcessor.java:398: ';'
expected

/* 433 / XPathEntityProcessor.2.this.val$throwExp.set(false); ^
.\org\apache\solr\handler\dataimport\XPathEntityProcessor.java:406: not a
statem ent / 442 */ XPathEntityProcessor.2.this.val$isEnd.set(true); ^
.\org\apache\solr\handler\dataimport\XPathEntityProcessor.java:406: ';'
expected

/* 442 / XPathEntityProcessor.2.this.val$isEnd.set(true); ^
.\org\apache\solr\handler\dataimport\XPathEntityProcessor.java:409: not a
statem ent / 445 */ XPathEntityProcessor.2.this.offer(row); ^
.\org\apache\solr\handler\dataimport\XPathEntityProcessor.java:409: ';'
expected

/* 445 */ XPathEntityProcessor.2.this.offer(row); ^ 12 errors

Any idea how to patch Solr4.2 for this issue.

I thought it must be in Sol4.4 but it is not in it. Any help on this. 




--
View this message in context: http://lucene.472066.n3.nabble.com/How-to-patch-Solr4-2-for-SolrEnityProcessor-Sub-Enity-issue-tp4086292.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: How to patch Solr4.2 for SolrEnityProcessor Sub-Enity issue

Posted by harshchawla <ha...@livecareer.com>.
Thanks a lot for this fix. I am now eagerly waiting for solr - 4.5



--
View this message in context: http://lucene.472066.n3.nabble.com/How-to-patch-Solr4-2-for-SolrEnityProcessor-Sub-Enity-issue-tp4086292p4086973.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: How to patch Solr4.2 for SolrEnityProcessor Sub-Enity issue

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
This is fixed in trunk and branch_4x and will be available in the next
release (4.5)

See https://issues.apache.org/jira/browse/SOLR-5190

On Mon, Aug 26, 2013 at 12:37 PM, harshchawla <ha...@livecareer.com> wrote:
> Thanks a lot in advance. I am eagerly waiting for your response.
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/How-to-patch-Solr4-2-for-SolrEnityProcessor-Sub-Enity-issue-tp4086292p4086572.html
> Sent from the Solr - User mailing list archive at Nabble.com.



-- 
Regards,
Shalin Shekhar Mangar.

Re: How to patch Solr4.2 for SolrEnityProcessor Sub-Enity issue

Posted by harshchawla <ha...@livecareer.com>.
Thanks a lot in advance. I am eagerly waiting for your response.



--
View this message in context: http://lucene.472066.n3.nabble.com/How-to-patch-Solr4-2-for-SolrEnityProcessor-Sub-Enity-issue-tp4086292p4086572.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: How to patch Solr4.2 for SolrEnityProcessor Sub-Enity issue

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
You are right. The fix committed to source was not complete. I've
reopened SOLR-3336 and I will put up a test and fix.

https://issues.apache.org/jira/browse/SOLR-3336

On Mon, Aug 26, 2013 at 9:41 AM, harshchawla <ha...@livecareer.com> wrote:
> In the second reply of this link, it is discussed and more over I am facing
> the same issue here:
> http://stackoverflow.com/questions/15734308/solrentityprocessor-is-called-only-once-for-sub-entities?lq=1.
>
> See attached my data-config.xml of new core (let say) test
> <entity name="can" dataSource="dsms" query="select candidateid from
> Candidate c">
>                                 <field column="CandidateID"
> name="candidateid "/>
>                                 <entity name="dt" processor="SolrEntityProcessor"
> url="http://localhost:8983/solr/csearch" query="candidateid
> :${can.CandidateID}" fl="*">
>                                 </entity>
>                                 <entity name="psu" dataSource="dsms"
> query="select Value from [CandidateData] where
> candidateid=${can.CandidateID}">
>                                         <field column="Value" name="psu"/>
>                                 </entity>
> </entity>
>
> Here only the first record is getting parsed properly otherwise for all the
> remaining records only two field are coming in new core test even though
> core "csearch" contains all the field values for all the records.
>
> I hope it clarifies my situation more,
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/How-to-patch-Solr4-2-for-SolrEnityProcessor-Sub-Enity-issue-tp4086292p4086564.html
> Sent from the Solr - User mailing list archive at Nabble.com.



-- 
Regards,
Shalin Shekhar Mangar.

Re: How to patch Solr4.2 for SolrEnityProcessor Sub-Enity issue

Posted by harshchawla <ha...@livecareer.com>.
In the second reply of this link, it is discussed and more over I am facing
the same issue here:
http://stackoverflow.com/questions/15734308/solrentityprocessor-is-called-only-once-for-sub-entities?lq=1.

See attached my data-config.xml of new core (let say) test
<entity name="can" dataSource="dsms" query="select candidateid from
Candidate c">
                                <field column="CandidateID"
name="candidateid "/>
                		<entity name="dt" processor="SolrEntityProcessor"
url="http://localhost:8983/solr/csearch" query="candidateid
:${can.CandidateID}" fl="*">                               
                                </entity>
                                <entity name="psu" dataSource="dsms"
query="select Value from [CandidateData] where
candidateid=${can.CandidateID}">
                               		<field column="Value" name="psu"/>
                                </entity>
</entity>

Here only the first record is getting parsed properly otherwise for all the
remaining records only two field are coming in new core test even though
core "csearch" contains all the field values for all the records.

I hope it clarifies my situation more,



--
View this message in context: http://lucene.472066.n3.nabble.com/How-to-patch-Solr4-2-for-SolrEnityProcessor-Sub-Enity-issue-tp4086292p4086564.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: How to patch Solr4.2 for SolrEnityProcessor Sub-Enity issue

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
That issue was fixed in Solr 3.6 and 4.0-alpha. The latest Solr
releases already have that fix. Can you give more details on why you
think you are still affected by that bug?

On Fri, Aug 23, 2013 at 4:29 PM, harshchawla <ha...@livecareer.com> wrote:
> According to
> http://stackoverflow.com/questions/15734308/solrentityprocessor-is-called-only-once-for-sub-entities?lq=1
> we can use the patched SolrEntityProcessor in
> https://issues.apache.org/jira/browse/SOLR-3336?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel
> to solve the subentity problem.
>
> I tried renaming the jar file to zip and then try replacing the patched file
> but as I got only java file I can't replace it with class file. So I drop
> this idea.
>
> Here is then what I have tried. I decompiled the original jar
> solr-dataimporthandler-4.2.0.jar present in solr 4.2 package. Then I replace
> the patch file. And try to compile the files for making the jar again. But I
> started getting compilation errors.
>
> .\org\apache\solr\handler\dataimport\XPathEntityProcessor.java:397: ')'
> expected
>
> /* 432 / if (XPathEntityProcessor.2.this.val$isEnd.get()) { ^
> .\org\apache\solr\handler\dataimport\XPathEntityProcessor.java:397: expected
> / 432 / if (XPathEntityProcessor.2.this.val$isEnd.get()) { ^
> .\org\apache\solr\handler\dataimport\XPathEntityProcessor.java:397: not a
> statem ent / 432 / if (XPathEntityProcessor.2.this.val$isEnd.get()) { ^
> .\org\apache\solr\handler\dataimport\XPathEntityProcessor.java:397: illegal
> star t of expression / 432 */ if
> (XPathEntityProcessor.2.this.val$isEnd.get()) { ^
> .\org\apache\solr\handler\dataimport\XPathEntityProcessor.java:397: ';'
> expected
>
> /* 432 */ if (XPathEntityProcessor.2.this.val$isEnd.get()) { ^
> .\org\apache\solr\handler\dataimport\XPathEntityProcessor.java:397: ';'
> expected
>
> /* 432 / if (XPathEntityProcessor.2.this.val$isEnd.get()) { ^
> .\org\apache\solr\handler\dataimport\XPathEntityProcessor.java:398: not a
> statem ent / 433 */ XPathEntityProcessor.2.this.val$throwExp.set(false); ^
> .\org\apache\solr\handler\dataimport\XPathEntityProcessor.java:398: ';'
> expected
>
> /* 433 / XPathEntityProcessor.2.this.val$throwExp.set(false); ^
> .\org\apache\solr\handler\dataimport\XPathEntityProcessor.java:406: not a
> statem ent / 442 */ XPathEntityProcessor.2.this.val$isEnd.set(true); ^
> .\org\apache\solr\handler\dataimport\XPathEntityProcessor.java:406: ';'
> expected
>
> /* 442 / XPathEntityProcessor.2.this.val$isEnd.set(true); ^
> .\org\apache\solr\handler\dataimport\XPathEntityProcessor.java:409: not a
> statem ent / 445 */ XPathEntityProcessor.2.this.offer(row); ^
> .\org\apache\solr\handler\dataimport\XPathEntityProcessor.java:409: ';'
> expected
>
> /* 445 */ XPathEntityProcessor.2.this.offer(row); ^ 12 errors
>
> Any idea how to patch Solr4.2 for this issue.
>
> I thought it must be in Sol4.4 but it is not in it. Any help on this.
>
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/How-to-patch-Solr4-2-for-SolrEnityProcessor-Sub-Enity-issue-tp4086292.html
> Sent from the Solr - User mailing list archive at Nabble.com.



-- 
Regards,
Shalin Shekhar Mangar.