Fórum

LIferay solr highlight issue

akash kumar, modificado 10 Anos atrás.

LIferay solr highlight issue

New Member Postagens: 8 Data de Entrada: 11/07/12 Postagens Recentes
Hi Experts,

I am using solr4.4 with Liferay 6.1GA2.
I have customized search portlet(search.jsp and start.jsp) and added one more select option myData(By default is everything and This site).
If i will search after selecting myData it should give results from myData only
So now there is three options.
If i am searching after selecting everything and Thissite then getting highlight for search results from myData.
But if i am selecting myData option in search portlet and then searching, getting results correctly but no highlight.

After debugging a lot i find that querryTerms is zero and no snippet is generating.
Please suggest what should i do now.

Thanks
thumbnail
sushil patidar, modificado 10 Anos atrás.

RE: LIferay solr highlight issue

Expert Postagens: 467 Data de Entrada: 31/10/11 Postagens Recentes
Hi Ashok,
Check if you are setting following for your customizations.
searchContext.getQueryConfig().setHighlightEnabled(true)


Regards
akash kumar, modificado 10 Anos atrás.

RE: LIferay solr highlight issue

New Member Postagens: 8 Data de Entrada: 11/07/12 Postagens Recentes
Hi Sushil,

Actually i have created a class from there i am creating boolean query by overriding postProcessSearchQuery and it is working fine getting highlight for myData model when i am selecting everything and This site in search portlet.

But when i am selecting myData then only results is coming not getting highlight.

I have used searchContext.getQueryConfig().setHighlightEnabled(true) but still not working.

Thanks
thumbnail
sushil patidar, modificado 10 Anos atrás.

RE: LIferay solr highlight issue

Expert Postagens: 467 Data de Entrada: 31/10/11 Postagens Recentes
Hi ashok,
When you are searching using myData ,are you adding title and content field to search query?. Beacuase liferay highlights only (title and content )field.I mean if searched values are found in title and content field, it will be highlighted.Searched values found in other fields will not be highlighted.

Regards
akash kumar, modificado 10 Anos atrás.

RE: LIferay solr highlight issue

New Member Postagens: 8 Data de Entrada: 11/07/12 Postagens Recentes
Hi Sushil,

If am searching with liferay default search (lucene ) everything is working fine.
I am getting highlight in every case.

Can you please give me some pointers in details.

Thanks
thumbnail
sushil patidar, modificado 10 Anos atrás.

RE: LIferay solr highlight issue

Expert Postagens: 467 Data de Entrada: 31/10/11 Postagens Recentes
Hi Ashok,
Can you please share solr query which is created when you search using myData.?
So that i will be able to analyse the problem clearly .