Hi All,
I have successfully integrated solr search engine to liferay 6.1 CE and able to index entities(Liferay+custom entities).
But when i retrieve data from solr search engine, i am getting zero hits. Please find the below steps and let me know my mistakes.
Step1: Custom Table script
(CREATE TABLE `libertycare`.`liberty_program` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`lpName` varchar(250) NOT NULL DEFAULT '',
`type` varchar(45) NOT NULL DEFAULT '',
`created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`companyId` bigint(20) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)) ;)
Step2: Created custom portlet and custom entity(LibertyProgram)service classes using ServiceBuilder tool.
Step3: Created LibertyProgramIndexer.java by extending BaseIndexer.
Step4: Added LibertyProgramIndexer class to indexer-class element inside liferay-portlet.xml.
<indexer-class>com.xerox.ghs.he.portlet.searchentity.util.LibertyProgramIndexer</indexer-class>
Step5: Created search.jsp and retrived results but getting zero hits.
Indexer indexer = IndexerRegistryUtil.getIndexer(LibertyProgram.class);
SearchContext searchContext = SearchContextFactory.getInstance(request);
searchContext.setAttribute("paginationType", "regular");
searchContext.setEnd(searchContainer.getEnd());
searchContext.setKeywords(keywords);
searchContext.setStart(searchContainer.getStart());
Hits results = indexer.search(searchContext);
Step6: Deployed custom portlet and indexed custom entity from ServerAdministration tab from controlpanel.
Step7: I am able to find the indexed data. But when i retrieve data from solr, i am getting zero hits.
Could you please provide me the valuable inputs to retrieve indexed data from solr.
Thanks in advance................
Best Regards,
Ranga Rao Bobbili
Adaequare INC