Fórum

Liferay Indexing Specifics

Tim Cardwell, modificado 10 Anos atrás.

Liferay Indexing Specifics

Junior Member Postagens: 29 Data de Entrada: 19/07/12 Postagens Recentes
I have some questions on how Liferay pushes documents to it's index.

Is there a class that is in charge of pushing updates and adds to the index? For example, if I am updating a DLFileEntry object or JournalArticle object, their respective 'update' class methods will update the objects in the database AND update the index. I checked the source code, and while it isn't jumping out at me, there has to be some sort of API call that tells the index to be updated.

Is there a way to only update certain fields for a given document? Right now, if I modify something that requires a full re-index, Liferay will drop the index and slowly start to re-build it. For example, let's say I want to add a custom field to all Journal Articles; I update the IndexerPostProcessor with the new field and kick of the Journal Article re-index. All journal article will be deleted from the index and slowly be added back with our new field. This doesn't take too long for Journal Articles, but for DLFileEntrys, this takes quite a while - over half a day. Is there a way to only push that new field to the index?

Also - I'm using Solr to index these items, not Liferay's out of the box lucene index.

Let me know if I need to be more clear on anything,
-Tim
thumbnail
Zsigmond Rab, modificado 10 Anos atrás.

RE: Liferay Indexing Specifics

Liferay Master Postagens: 728 Data de Entrada: 05/01/10 Postagens Recentes
Hi Tim,

unfortunately, this is the way how it's working. The whole document is updated for the object.

Is that necessary to index a value for the new custom field immediately for all of the objects? Isn't that possible to index the objects on demand? With meaning, an object should be indexed only, if it's being updated.

Otherwise, you have to change the logic of indexing.

Regards,
Zsigmond