cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to provide dynamic parameter in Solr query?

0 Kudos
799

Hi Experts, I have written following solr query for indexing. SELECT {Pk} FROM {WebContentPage as w} where {w.Country} = 'gb' AND {w:modifiedtime} >= ?customTime i need to index those elements in solr which are modified or created in hybris after "customTime" the value of customTime attribute is saved at SolrindexerCronJobModel.

Note- index job runs in every 10 mins accordingly value of customTime attribute gets updated

How can i pass the value of customeTime in as query parameter? thanks in advance

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

You can make use of implementation of interface de.hybris.platform.solrfacetsearch.search.context.FacetSearchListener#beforeSearch to add any dynamic values before it hits to solr server for results

0 Kudos

Hi Hamid, can you provide some sample code?