Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: RE: How to associate custom entity with Segments in liferay 7.3
I'm extending Segments Criteria Contributor with some custom segment rules in liferay 7.3, and for this I had created a contributor class which implements SegmentsCriteriaContributor. After deployong the module, a new segment criteria contributor was added with the rule I had defined within the class.
Now the issue which I'm facing is that how to associate this custom criteria contributor with a custom entity to return the number of matched data.
I tried to follow Creating-a-Segment-Criteria-Contributor for my reference but the issue which I face was that while it was performing search in ODataRetriver, I was getting null pointer exception as my entity is not indexable and I don't want this to be indexable.
So it will be a great help if someone could help me ith this.
Thanks
Disclaimer: I've not followed the whole documentation chapter, never implemented this, and might have missed something.
You claim that you don't implement indexing - and you don't want to. On the other hand, that might be just what the framework expects: There are many operations that are implemented through the index in order to lower the demand on the database, and/or improve performance. In case you've hit exactly this situation (I'm neither claiming you do or you don't), it's your choice if you work around this by figuring out how to replace index-based search with database-based search, or to implement indexing. Indexing might come in handy in other situations as well...
Hi Olaf,
Thanks for your response..!!
I ended up with making my entity indexable and now it is working as per our requirements.
Thanks
Powered by Liferay™