[
https://issues.apache.org/jira/browse/SOLR-2632?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13623957#comment-13623957
]
lukes shaw commented on SOLR-2632:
----------------------------------
Hi everyone, recently i was trying to have the boost in the query and
highlighting on in parallel. But if have the boost, highlighting doesn't works,
but the moment i remove the boost highlighting start working again.
Below is the request i am sending.
http://localhost:8983/solr/collection1/select?q=%2B_query_%3A%22{!type%3Dedismax+qf%3D%27body^1.0+title^10.0%27+pf%3D%27body^2%27+ps%3D36+pf2%3D%27body^2%27+pf3%3D%27body^2%27+v%3D%27apple%27+mm%3D100}%22&group=true&group.field=content_group_id_k&group.ngroups=true&group.limit=3&fl=id%2Clanguage_k%2Clast_modified_date_dt%2Ctitle&rows=20&hl.snippets=1&hl.fragsize=200&hl.fl=body&hl.fl=title&hl=true&hl.q=%2B_query_%3A%22{!type%3Dedismax+qf%3D%27body^1.0+title^10.0%27+pf%3D%27body^2%27+ps%3D36+pf2%3D%27body^2%27+pf3%3D%27body^2%27+v%3D%27apple%27+mm%3D100}%22&debugQuery=true&wt=json&indent=true&hl.snippets=1&hl.fragsize=200&hl.fl=bosy&hl.fl=title&hl=true&boost=boost_weight
OR
http://localhost:8983/solr/collection1/select?q=%2B_query_%3A%22{!type%3Dedismax+qf%3D%27body^1.0+title^10.0%27+pf%3D%27body^2%27+ps%3D36+pf2%3D%27body^2%27+pf3%3D%27body^2%27+v%3D%27apple%27+mm%3D100}%22&group=true&group.field=content_group_id_k&group.ngroups=true&group.limit=3&fl=id%2Clanguage_k%2Clast_modified_date_dt%2Ctitle&rows=20&hl.snippets=1&hl.fragsize=200&hl.fl=body&hl.fl=title&hl=true&debugQuery=true&wt=json&indent=true&hl.snippets=1&hl.fragsize=200&hl.fl=bosy&hl.fl=title&hl=true&boost=boost_weight
But if i do above two without the boost or use bf instead of boost, things
works but i don't get the boost.
I am using SOLR4.1.0
Any help in this is really appreciated.
Regards,
Lokesh
> Highlighting does not work for embedded boost query that boosts a dismax query
> ------------------------------------------------------------------------------
>
> Key: SOLR-2632
> URL: https://issues.apache.org/jira/browse/SOLR-2632
> Project: Solr
> Issue Type: Bug
> Components: highlighter
> Affects Versions: 1.4.1, 3.2, 3.3
> Environment: Linux.
> Reproduced in different machines with different Linux distributions and
> different JDK's.
> Solr 3.3 and Lucidworks for solr 1.4.1 and 3.2.
> Reporter: Juan Antonio Farré Basurte
> Labels: _query_, boost, dismax, edismax, embedded, highlighting,
> hl.fl, query
>
> I need to issue a dismax query, with date boost (I'd like to use the
> multiplicative boost provided by boost queries) and also filtering for other
> fields with too many possible distinct values to fit in a filter query. To
> achieve this, I use the boost query as a nested query using the pseudofield
> _query_. I also need highlighting for the fields used in the dismax query,
> but highlighting does not work. If I just use the boosted dismax query
> without embedding it inside another query, it works correctly. If I use bf
> instead of a boost query, and embed directly the dismax query, it works too,
> but hl.fl needs to be specified.
> It's a bit complicated to explain, so, I'll give examples using the example
> data that comes with solr (the problem is reproducible in the example solr
> distribution, not only in my concrete project).
> http://localhost:8983/solr/select?q=%2binStock:true%20%2b_query_:%22{!boost%20b=$dateboost%20v=$qq%20defType=dismax}%22&qq=test&qf=name&dateboost=recip%28ms%28NOW,last_modified%29,3.16e-11,1,1%29&hl=true&hl.fl=name
> For this query, highlighting does not work. Specifying hl.fl or not, does not
> influence the result. The result is:
> <lst name="highlighting">
> <lst name="GB18030TEST"/>
> <lst name="UTF8TEST"/>
> </lst>
> http://localhost:8983/solr/select?q=_query_:%22{!boost%20b=$dateboost%20v=$qq%20defType=dismax}%22&qq=test&qf=name&dateboost=recip%28ms%28NOW,last_modified%29,3.16e-11,1,1%29&hl=true&hl.fl=name
> This doesn't work either. Same result.
> http://localhost:8983/solr/select?q={!boost b=$dateboost v=$qq
> defType=dismax}&qq=test&qf=name&dateboost=recip(ms(NOW,last_modified),3.16e-11,1,1)&hl=true
> In this case, hightlighting works correctly:
> <lst name="highlighting">
> <lst name="GB18030TEST">
> <arr name="name">
> <str><em>Test</em> with some GB18030 encoded characters</str>
> </arr>
> </lst>
> <lst name="UTF8TEST">
> <arr name="name">
> <str><em>Test</em> with some UTF-8 encoded characters</str>
> </arr>
> </lst>
> </lst>
> http://localhost:8983/solr/select?q=%2BinStock:true%20%2B_query_:%22{!dismax%20v=$qq}%22&qq=test&qf=name&bf=recip%28ms%28NOW,last_modified%29,3.16e-11,1,1%29&hl=true&hl.fl=name
> This also works. Same result as before. But in this case hl.fl is needed.
> Without it, highlighting does not work, either.
> Thanks.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]