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

Kuntal Ganguly commented on SOLR-3191:
--------------------------------------

I have tried this patch on Solr 4.2.1 and 4.9, but this patch is not working 
with custom doc transformer.

I have a custom transformer that does the following:

The Custom transformer for joining between two entities and merging fields from 
second entity into the response of 1st entity is deployed in both local and 
staging boxes.

Usecase:

Say  Entity-1 type=ProjectDocument and Entity-2 type=Projects.Now we want to 
search on certain fields of Entity-1 (document_createbyname),
then join with Entity-2 based on common field/fields between two entities 
(pinprojectid)and finally fetch and merge field/fields of Entity-2(projecttype) 
into the response of Entity-1.


Sample Query:

Local::
http://10.10.87.91:4983/solr/collection1/select?q=type:ProjectDocument AND 
document_createbyname:"Sudipta Sarkar"
&fl=*,[mytrans5 jf=pinprojectid if=type:Projects mf=projecttype]

Staging::
http://10.1.1.230:6983/solr/collection1/select?q=type:ProjectDocument AND 
document_documenttitle:testing&&fl=*,[mytrans5 jf=pinprojectid if=type:Projects 
mf=pwaccountid,projectaddress2,projecttype,projectenddate,project_city]

Details of transformer

Transformer name->mytrans5
It has three parameter:

1. jf (Joining Field- Mandatory)= can be single or multi-value separated by 
comma. This should contain common fields between two entities.

2. mf (Merge Field- Mandatory)= can be single or multi-value separated by 
comma. This fields will be fetch from 2nd entity and merge with 1st entity 
response.

3. if (Identity Field- Optional)= single value. This fields specify the second 
entity uniquely from 1st entity (say type:Projects). If this fields is not 
provided during query,this will then read default value from configuration 
file. If default value is also missing,then it will take the first value from 
merge field parameter.

[mytrans5 jf=pinprojectid,pwaccountid if=type:Projects 
mf=projecttype,projectenddate,project_city]



Can you suggest me what to do? Because the transformer is working fine without 
this patch properly as expected.



> field exclusion from fl
> -----------------------
>
>                 Key: SOLR-3191
>                 URL: https://issues.apache.org/jira/browse/SOLR-3191
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Luca Cavanna
>            Priority: Minor
>         Attachments: SOLR-3191.patch, SOLR-3191.patch
>
>
> I think it would be useful to add a way to exclude field from the Solr 
> response. If I have for example 100 stored fields and I want to return all of 
> them but one, it would be handy to list just the field I want to exclude 
> instead of the 99 fields for inclusion through fl.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to