Teresa? I'm don sure I follow.. Probably you need something like
<requestHandler name="/select" class="solr.SearchHandler">
      <lst name="defaults">
<!-- OR -->
      <lst name="append">
  <!-- no % encoding, xml entities with &; -->
     <str
name="fl">_1_Trigger:if(termfreq(TRIGGERED_ENTITIES,&quot;${customerNumber}&quot;),
&quot;Y&quot;,&quot;N&quot;),_2_Duplicate:def(TRANSACTION_DESCRIPTION,&quot;&quot;)..,
</str>
<!-- OR -->
   <str
name="fl">_1_Trigger:if(termfreq(TRIGGERED_ENTITIES,&quot;${customerNumber}&quot;),
&quot;Y&quot;,&quot;N&quot;)</str>
    <str
name="fl">_2_Duplicate:def(TRANSACTION_DESCRIPTION,&quot;&quot;)</str>
    <str name="fl">...</str>
<!-- OR -->
      <arr
name="fl"><str>_1_Trigger:if(termfreq(TRIGGERED_ENTITIES,&quot;${customerNumber}&quot;),
&quot;Y&quot;,&quot;N&quot;)</str>
    <str>_2_Duplicate:def(TRANSACTION_DESCRIPTION,&quot;&quot;)</str>
    <str">...</str>
   </arr>

Note: I don't know which syntax will really work, and event not sure about
particular syntax from your letter (those colons and commas)

Good luck!

On Tue, Oct 18, 2022 at 4:05 PM Teresa McMains <[email protected]>
wrote:

> Mikhail, I can't tell you how much I appreciate your response! Thank you.
> I am very new at doing anything with solr and feel very out of my element.
> I'm pasting the request handler from solrconfig.xml below. It was written
> by some folks in my consulting organization that are long since gone and,
> as a whole, the whole team never really had anyone who understood solr
> anyway (so nothing's changed!).
>
> We have other document types and when we query them the field list is
> short so it's no problem explicitly passing fl for those. But I see below
> someone from the past has explicitly left a comment that they intended
> parameters to be explicitly overridden in the request (at least for fq).
>
> So... if I understand the solr doc correctly (and maybe I don't), I really
> just have to specify my field list here??
> How do I handle column aliases and function calls like:
> _13_Beneficiary_Address:def(BENEADDRESS,%22%22)?
>
> After some late night reading it almost even sounded like I could use
> simple parameter substitution to maintain my field list. Is that an insane
> idea??
>
> Many many thanks!!
> Teresa
>
>
>   <requestHandler name="/select" class="solr.SearchHandler">
>       <lst name="defaults">
>         <str name="q">*:*</str>
>         <str name="defType">edismax</str>
>         <str name="stopwords">true</str>
>         <str name="lowercaseOperators">true</str>
>         <str name="rows">10</str>
>         <str name="df">_tokens</str>
>
>                            <!-- PSD - phrase boosting...only affects
> relevancy, not inclusion -->
>                            <str name="pf">_tokens^3</str>
>                            <str name="ps">10</str>
>                            <str name="pf2">_tokens^2</str>
>                            <str name="ps2">1</str>
>
>
>                            <!-- PSD - field boosting -->
>                            <str name="qf">_primaryLabels^10 doc_id^50
> telephoneNumbers^5 nationalIdentifiers^5 _tokens</str>
>                            <str name="f._primaryLabels.qf">
>                                         alertid
>                                         risk_assessment_id
>                                         account_name
>                                         account_number
>                                         bank_number
>                                         bank_name
>                                         party_name
>                                         party_number
>                                         household_number
>                                         head_of_household_name
>                                         ext_party_number
>                                         full_name
>                                         associate_number
>                                         associate_full_name
>                                         branch_number
>                                         branch_name
>                                         case_id
>                                         report_key
>                                         entity_id
>                                         attachment_name
>                                         title
>                                         filename
>                                         TRANSACTION_KEY
>                                         TRANSACTION_REFERENCE_NUMBER
>                                         BENE
>                                         BENEACCT
>                                         BENECUSTID
>                                         BYORDER
>                                         BYORDERACCT
>                                         BYORDERCUSTID
>                            </str>
>
> <!--        We want to omit transactions from the global search, since it
> doesn't know how to display them
>              All targeted searches MUST send an fq param to override this
> default.
>              That fq should contain the doc_type:[name] filter that was
> originally in the q param.
>              As long as fq is present (even if empty) it'll override this
> default. -->
>         <str name="fq">-doc_type:trxn</str>
>         <!-- end PSD Additoin -->
>       </lst>
>   </requestHandler>
>   <!-- config for the admin interface -->
>   <admin>
>     <defaultQuery>solr</defaultQuery>
>   </admin>
>
>
>
>
> -----Original Message-----
> From: Mikhail Khludnev <[email protected]>
> Sent: Tuesday, October 18, 2022 2:53 AM
> To: [email protected]
> Subject: Re: How to implement custom transform class
>
> Hello, Teresa.
> It doesn't seem to like a case for the result transformer.
> Note:
> - Huge parameters can be sent via POST (and even get) in the request
> body/payload. Here's an example $curl --request GET --url
> http://localhost:8984/solr/testcore/select
> --header <http://localhost:8984/solr/testcore/select--header>
> 'content-type: application/x-www-form-urlencoded' --data 'q=*:*'
> Btw, colleagues, is it described anywhere in the ref guide?
>
> - long static fl param can be configured as default handler param
> https://solr.apache.org/guide/solr/latest/configuration-guide/requesthandlers-searchcomponents.html#defaults
> - large rows values can burn one's CPU, it's rather preferable scroll
> results with cursors see
> https://solr.apache.org/guide/solr/latest/query-guide/pagination-of-results.html#performance-problems-with-deep-paging
>
> Enjoy
>
> On Mon, Oct 17, 2022 at 4:51 PM Teresa McMains <[email protected]>
> wrote:
>
> > Hi. I have a client using solr version 5.5.x. We're using solr within
> > a third party application which calls a URL to return some documents
> > which it will display on a web page. The URL has become ridiculously
> > long and I would like to switch it to use a custom transformer and
> > have read the documentation at:
> > https://solr.apache.org/guide/8_6/transforming-result-documents.html
> > but I'm not entirely sure what I'm doing, aside from maybe using a
> subquery?
> > Could someone help set me on the right path? Our URL is below. The
> > field aliases are necessary to permit everything to display as the
> > client wants it.
> >
> > Many thanks!
> > Teresa
> >
> >
> > /solr/aml/select?q=BENE_ENTITY_NUMBER%3A%22${customerNumber}%22%2BOR%2
> > BBYORDER_ENTITY_NUMBER%3A%22${customerNumber}%22&wt=json&fl=_1_Trigger
> > :if(termfreq(TRIGGERED_ENTITIES,%22${customerNumber}%22),%22Y%22,%22N%
> > 22),_2_Duplicate:def(TRANSACTION_DESCRIPTION,%22%22),_3_Transaction_No
> > :TRANSACTION_REFERENCE_NUMBER,_4_Transaction_Date:TRANSACTION_DATE,_5_
> > Amount:CURRENCY_AMOUNT,_6_ByOrder_Name:def(BYORDER,%22%22),_7_ByOrder_
> > Id:BYORDER_ENTITY_NUMBER,_8_ByOrder_Address:def(BYORDERADDRESS,%22%22)
> > ,_9_ByOrder_Country:def(BYORDERCOUNTRY,%22%22),_10_ByOrder_Bank_Name:d
> > ef(BYORDERBANK,%22%22),_11_Beneficiary_Name:def(BENE,%22%22),_12_Benef
> > iciary_Id:BENE_ENTITY_NUMBER,_13_Beneficiary_Address:def(BENEADDRESS,%
> > 22%22),_14_Beneficiary_Country:def(BENECOUNTRY,%22%22),_15_Beneficiary
> > _Bank_Name:def(BENEBANK,%22%22),_16_Primary_Medium:def(PRIMARY_MEDIUM_
> > DESC,%22%22),_17_Secondary_Medium:def(SECONDARY_MEDIUM_DESC,%22%22),_1
> > 8_Alert_Ids:TRIGGERED_ALERTS,_19_Alert_Descriptions:def(TRIGGERED_ALER
> >
> T_DESCRIPTIONS,%22%22),_20_Mechanism:def(MECHANISM_DESC,%22%22),_21_Instructions:INSTRUCTIONS,_22_Transaction_Type:def(TRANSACTION_CDI_DESC,%22%22),_23_ByOrder_Account:def(BYORDERACCT,%22%22),_24_ByOrder_Cust_Id:def(BYORDERCUSTID,%22%22),_25_Beneficiary_Account:def(BENEACCT,%22%22),_26_Beneficiary_Cust_Id:def(BENECUSTID,%22%22),_27_ByOrder_Bank_Cust_Id:def(BYORDERBANKCUSTID,%22%22),_28_ByOrder_Bank_Id:def(BYORDERBANKID,%22%22),_29_ByOrder_Bank_Account:def(BYORDERBANKACCT,%22%22),_30_ByOrder_Bank_Address:def(BYORDERBANKADDRESS,%22%22),_31_ByOrder_Bank_Country:def(BYORDERCOUNTRY,%22%22),_32_Sender_Bank_Name:def(SEND_BANK,%22%22),_33_Sender_Bank_Cust_Id:def(SEND_BANK_CUST_ID,%22%22),_34_Sender_Bank_Id:def(SEND_BANK_ID,%22%22),_35_Sender_Bank_Account:def(SEND_BANK_ACCT,%22%22),_36_Sender_Bank_Address:def(SEND_BANK_ADDRESS,%22%22),_37_Sender_Bank_Country:def(SEND_BANK_COUNTRY,%22%22),_38_Intermediary3_Bank_Name:def(INTERMEDIARY3,%22%22),_39_Intermediary3_Bank_Cust_Id:def(INTERMEDIARYCUSTID3,%22%22),_40_Intermediary3_Bank_Id:def(INTERMEDIARYID3,%22%22),_41_Intermediary3_Bank_Account:def(INTERMEDIARYACCT3,%22%22),_42_Intermediary3_Bank_Address:def(INTERMEDIARYADDRESS3,%22%22),_43_Intermediary3_Bank_Country:def(INTERMEDIARYCOUNTRY3,%22%22),_44_Intermediary4_Bank_Name:def(INTERMEDIARY4,%22%22),_45_Intermediary4_Bank_Cust_Id:def(INTERMEDIARYCUSTID4,%22%22),_46_Intermediary4_Bank_Id:def(INTERMEDIARYID4,%22%22),_47_Intermediary4_Bank_Account:def(INTERMEDIARYACCT4,%22%22),_48_Intermediary4_Bank_Address:def(INTERMEDIARYADDRESS4,%22%22),_49_Intermediary4_Bank_Country:def(INTERMEDIARYCOUNTRY4,%22%22),_50_Receiver_Bank_Name:def(REC_BANK,%22%22),_51_Receiver_Bank_Cust_Id:def(REC_BANK_CUST_ID,%22%22),_52_Receiver_Bank_Id:def(REC_BANK_ID,%22%22),_53_Receiver_Bank_Account:def(REC_BANK_ACCT,%22%22),_54_Receiver_Bank_Address:def(REC_BANK_ADDRESS,%22%22),_55_Receiver_Bank_Country:def(REC_BANK_COUNTRY,%22%22),_56_Bene_Bank_Cust_Id:def(BENEBANKCUSTID,%22%22),_57_Bene_Bank_Id:def(BENEBANKID,%22%22),_58_Bene_Bank_Account:def(BENEBANKACCT,%22%22),_59_Bene_Bank_Address:def(BENEBANKADDRESS,%22%22),_60_Bene_Bank_Country:def(BENEBANKCOUNTRY,%22%22),,_61_Instgagt_Bank_Name:def(INSTGAGT,%22%22),_62_Instgagt_Bank_Cust_Id:def(INSTGAGTCUSTID,%22%22),_63_Instgagt_Bank_Id:def(INSTGAGTID,%22%22),_64_Instgagt_Bank_Account:def(INSTGAGTACCT,%22%22),_65_Instgagt_Bank_Address:def(INSTGAGTADDRESS,%22%22),_66_Instgagt_Bank_Country:def(INSTGAGTCOUNTRY,%22%22),_67_Instdagt_Bank_Name:def(INSTDAGT,%22%22),_68_Instdagt_Bank_Cust_Id:def(INSTDAGTCUSTID,%22%22),_69_Instdagt_Bank_Id:def(INSTDAGTID,%22%22),_70_Instdagt_Bank_Account:def(INSTDAGTACCT,%22%22),_71_Instdagt_Bank_Address:def(INSTDAGTADDRESS,%22%22),_72_Instdagt_Bank_Country:def(INSTDAGTCOUNTRY,%22%22),_73_Bene2_Bank_Name:def(BENE2,%22%22),_74_Bene2_Bank_Cust_Id:def(BENECUSTID2,%22%22),_75_Bene2_Bank_Id:def(BENEID2,%22%22),_76_Bene2_Bank_Account:def(BENEACCT2,%22%22),_77_Bene2_Bank_Address:def(BENEADDRESS2,%22%22),_78_Bene2_Bank_Country:def(BENECOUNTRY2,%22%22),_79_Byorder2_Bank_Name:def(BYORDER2,%22%22),_80_Byorder2_Bank_Cust_Id:def(BYORDERCUSTID2,%22%22),_81_Byorder2_Bank_Id:def(BYORDERID2,%22%22),_82_Byorder2_Bank_Account:def(BYORDERACCT2,%22%22),_83_Byorder2_Bank_Address:def(BYORDERADDRESS2,%22%22),_84_Byorder2_Bank_Country:def(BYORDERCOUNTRY2,%22%22),_85_Prvsinstgagt1_Bank_Name:def(PRVSINSTGAGT1,%22%22),_86_Prvsinstgagt1_Bank_Cust_Id:def(PRVSINSTGAGTCUSTID1,%22%22),_87_Prvsinstgagt1_Bank_Id:def(PRVSINSTGAGTID1,%22%22),_88_Prvsinstgagt1_Bank_Account:def(PRVSINSTGAGTACCT1,%22%22),_89_Prvsinstgagt1_Bank_Address:def(PRVSINSTGAGTADDRESS1,%22%22),_90_Prvsinstgagt1_Bank_Country:def(PRVSINSTGAGTCOUNTRY1,%22%22),_91_Notes:NOTES,_92_System_Reference:MTR_SYS_REF,_93_Raw_Message:def(RAW_MESSAGE,%22%22)%26fq=doc_type%3Atrxn&rows=100000&start=0
> >
>
>
> --
> Sincerely yours
> Mikhail Khludnev
>


-- 
Sincerely yours
Mikhail Khludnev

Reply via email to