Hi Jayaprakash,
Thanks for the support.
Here we have written custom index field for 'Starts With' feature. So we are
expecting results which starts with given keyword. Also Priority should be
"breadcrumbtitleindexed_t" then by "Descnameindexed_t". If you see the below
result set, first result is starts with given keyword ('Prothrombin') at
"Descnameindexed_t" but that is less priority one. We expect 2nd and 3rd
results should come at top as keyword starts with "breadcrumbtitleindexed_t"
Custom index fields definition:
<field fieldName="breadCrumbTitleIndexed" storageType="yes"
indexType="UNTOKENIZED" returnType="text"> ***</field>
<field fieldName="DescNameIndexed" storageType="yes" indexType="tokenized"
returnType="text"> ***</field>
Query:
https://localhost:8983/solr/***_web_index/select?bq=(breadcrumbtitleindexed_t:%22QQQ%20prothrombin%22)^20&bq=(Descnameindexed_t:%22QQQ%20prothrombin%22)^10&q=((((mediacontent_t:culture+AND+categorytype_t:Testdoc)++-)+OR+((bodycontent_t:(prothrombin)+AND+_templatename:(%22Test+Instruction%22))++-))+AND+haslayout_b:(true))&defType=edismax&hl.simple.post=+%3C/span%3E+&hl.maxAnalyzedChars=200000&hl.fl=bodycontent_t,mediacontent_t&fl=name,rilis_name_t,breadcrumb_title_t,breadcrumbtitleindexed_t,
Descnameindexed_t,score&rows=1000
Results:
{
"responseHeader":{
"status":0,
"QTime":3,
"params":{
"q":"((((mediacontent_t:culture AND categorytype_t:Testdoc) -) OR
((bodycontent_t:(prothrombin) AND _templatename:(\"Test Instruction\")) -))
AND haslayout_b:(true))",
"defType":"edismax",
"hl.simple.post":" </span> ",
"hl.maxAnalyzedChars":"200000",
"fl":"name, Desc_name_t,breadcrumb_title_t,breadcrumbtitleindexed_t,
Descnameindexed_t,score",
"hl.fl":"bodycontent_t,mediacontent_t",
"rows":"1000",
"bq":["(breadcrumbtitleindexed_t:\"QQQ prothrombin\")^20",
"(Descnameindexed_t:\"QQQ prothrombin\")^10",
"(Descnameindexed_t:\"QQQ prothrombin\")^10"]}},
"response":{"numFound":13627,"start":0,"maxScore":160.02832,"docs":[
{
"breadcrumb_title_t":"PT",
"breadcrumbtitleindexed_t":"QQQ PT",
"Desc_name_t":"Prothrombin Time",
"name":"PT",
"Descnameindexed_t":"QQQ Prothrombin Time",
"score":160.02832},
{
"name":"Prothrombin Time, POCT",
"Desc_name_t":"Protime (ISTAT)",
"Descnameindexed_t":"QQQ Protime (ISTAT)",
"breadcrumbtitleindexed_t":"QQQ Prothrombin Time, POCT",
"breadcrumb_title_t":"Prothrombin Time, POCT",
"score":138.15654},
{
"name":"Prothrombin 20210 GA GENE Nucleic Acid Amplification",
"Desc_name_t":"PT 20210 (REG)",
"Descnameindexed_t":"QQQ PT 20210 (REG)",
"breadcrumbtitleindexed_t":"QQQ Prothrombin 20210 GA GENE Nucleic Acid
Amplification",
"breadcrumb_title_t":"Prothrombin 20210 GA GENE Nucleic Acid
Amplification",
"score":102.24854},
Thanks,
Thamizh
-----Original Message-----
From: Jeyaprakash Singarayar <[email protected]>
Sent: Tuesday, October 5, 2021 11:40 AM
To: [email protected]
Subject: Re: Search results priority failed using boosting
Caution: This email came from outside Kaiser Permanente. Do not open
attachments or click on links if you do not recognize the sender.
______________________________________________________________________
Hi Tamizhazhagan,
Please share the schema definition of those fields, solrconfig and some sample
docs that you indexed.
On Mon, Oct 4, 2021 at 8:36 PM Thamizhazhagan B <[email protected]>
wrote:
> Hi Folks,
>
> I am new to Solr. Can you please suggest your solution for the below issue.
>
> Thanks,
> Thamizh
>
> -----Original Message-----
> From: Thamizhazhagan B <[email protected]>
> Sent: Tuesday, October 5, 2021 2:16 AM
> To: [email protected]
> Subject: Search results priority failed using boosting
>
> Caution: This email came from outside Kaiser Permanente. Do not open
> attachments or click on links if you do not recognize the sender.
>
> ______________________________________________________________________
> Hi,
>
> We have following fields that should be prioritized as below
>
>
> * Name (Priority 1)
> * Code (Priority 2)
> * Description (Priority 3)
> * Short description (Priority 4)
>
>
> Boost query:
> bq=(Name)^50&bq=(Code)^40&bq=(Description)^30&bq=(Short
> description)^20
>
> Boosting is not working as Priority3 items comes to top than Priority2.
>
> Actual results in rare scenarios:
>
>
> * Name (Priority 1)
> * Description (Priority 3)
> * Code (Priority 2)
> * Short description (Priority 4
>
> So we applied constant score (^=) and also tried to give high score
> for code (P2) than Description (P3), but that also not giving expected
> results.
>
> Please guide me how to bring results in correct order as per priority
> using boosting consistently across all scenarios.
>
> Thanks for your support!!
>
> Thanks,
> Thamizh
>
>
>
>
> NOTICE TO RECIPIENT: If you are not the intended recipient of this
> e-mail, you are prohibited from sharing, copying, or otherwise using
> or disclosing its contents. If you have received this e-mail in
> error, please notify the sender immediately by reply e-mail and
> permanently delete this e-mail and any attachments without reading,
> forwarding or saving them.
> v.173.295 Thank you.
>