Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
toggle
Roman Hoyenko
Rebuild Lucene index
25 de Agosto de 2011 13:10
Resposta

Roman Hoyenko

Ranking: Liferay Master

Mensagens: 868

Data de entrada: 8 de Outubro de 2007

Mensagens recentes

I have my Lucene indexes messed up - I was experimenting with cluster environment and moved things around - from filesystem to db, etc. So now I get exceptions in the logs like:

2011-08-25 16:03:45,145 - com.liferay.portal.kernel.search.messaging.SearchWriterMessageListener - Unable to process message {destinationName=liferay/search_writer, responseDestinationName=null, responseId=null, payload={companyId=10132, document={uid=[15_PORTLET_10157_FIELD_11610], entryClassName=[com.liferay.portlet.journal.model.JournalArticle], scopeGroupId=[10157], rootEntryClassPK=[11612], groupRoleId=[10157-10144], type=, entryClassPK=[11610], version=[2.2], modified=[20110720153500], content=[Operations The ISG Data Operations Group is responsible for the daily maintenance and ongoing quality of many of the firm core data sets. The group's primary areas of responsibility include Client and Account Data and Securities and Pricing data and provide valuable data creation, maintenance and control functions to all business lines across ICG. The group primarily has a presence in London, New York and Singapore to provide a global service model.], groupId=[10157], title=, assetCategoryIds=[], userId=[11321], companyId=[10132], portletId=[15], assetTagNames=[], roleId=[10139, 10140]}, documents=null, end=0, id=null, ids=null, query=null, searchEngineCommand=UPDATE_DOCUMENT, sorts=null, start=0}, values=null}
ERRORjava.lang.ArrayIndexOutOfBoundsException: 2
at org.apache.lucene.util.BitVector.get(BitVector.java:106)
at org.apache.lucene.index.SegmentTermDocs.next(SegmentTermDocs.java:127)
at org.apache.lucene.index.DocumentsWriter.applyDeletes(DocumentsWriter.java:1063)
at org.apache.lucene.index.DocumentsWriter.applyDeletes(DocumentsWriter.java:1017)


Is there a way to rebuild lucene indexes? I tried the Reindex all search indexes in Server Administration, but I get exceptions when I do this:

2011-08-25 16:07:16,725 - com.liferay.portal.search.lucene.IndexAccessorImpl - Closing Lucene writer failed for 10132
ERRORjava.lang.ArrayIndexOutOfBoundsException: 2
at org.apache.lucene.util.BitVector.get(BitVector.java:106)
at org.apache.lucene.index.SegmentTermDocs.next(SegmentTermDocs.java:127)
at org.apache.lucene.index.DocumentsWriter.applyDeletes(DocumentsWriter.java:1063)
at org.apache.lucene.index.DocumentsWriter.applyDeletes(DocumentsWriter.java:1017)
at org.apache.lucene.index.IndexWriter.applyDeletes(IndexWriter.java:5332)
at org.apache.lucene.index.IndexWriter.doFlushInternal(IndexWriter.java:4455)
at org.apache.lucene.index.IndexWriter.doFlush(IndexWriter.java:4283)
at org.apache.lucene.index.IndexWriter.flush(IndexWriter.java:4274)
at org.apache.lucene.index.IndexWriter.closeInternal(IndexWriter.java:2241)
at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:2204)
at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:2168)
at com.liferay.portal.search.lucene.IndexAccessorImpl.close(IndexAccessorImpl.java:84)
at com.liferay.portal.search.lucene.IndexAccessorImpl.delete(IndexAccessorImpl.java:97)
at com.liferay.portal.search.lucene.LuceneHelperImpl.delete(LuceneHelperImpl.java:155)
at com.liferay.portal.search.lucene.LuceneHelperUtil.delete(LuceneHelperUtil.java:150)
at com.liferay.portal.search.lucene.LuceneIndexer.doReIndex(LuceneIndexer.java:98)
at com.liferay.portal.search.lucene.LuceneIndexer.reindex(LuceneIndexer.java:61)
at com.liferay.portal.search.lucene.LuceneIndexer.reindex(LuceneIndexer.java:54)


and then:

2011-08-25 16:08:08,767 - com.liferay.portlet.journal.util.JournalIndexer - com.liferay.portal.kernel.xml.DocumentException: Error on line 78 of document : An invalid XML character (Unicode: 0x3) was found in the CDATA section. Nested exception: An invalid XML character (Unicode: 0x3) was found in the CDATA section.
ERRORcom.liferay.portal.kernel.xml.DocumentException: Error on line 78 of document : An invalid XML character (Unicode: 0x3) was found in the CDATA section. Nested exception: An invalid XML character (Unicode: 0x3) was found in the CDATA section.
at com.liferay.portal.xml.SAXReaderImpl.read(SAXReaderImpl.java:372)
at com.liferay.portal.xml.SAXReaderImpl.read(SAXReaderImpl.java:360)
at com.liferay.portal.xml.SAXReaderImpl.read(SAXReaderImpl.java:377)
at com.liferay.portal.kernel.xml.SAXReaderUtil.read(SAXReaderUtil.java:139)
at com.liferay.portlet.journal.util.JournalIndexer.getIndexableContent(JournalIndexer.java:230)


Is there a way to fully clear Lucene indexes and start from scratch? Can I just remove the tables from the db? Another problem I have is that I can't see users in Control panel and as I understand it is related to Lucene as well.
Hitoshi Ozawa
RE: Rebuild Lucene index
25 de Agosto de 2011 16:57
Resposta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensagens: 8000

Data de entrada: 23 de Março de 2010

Mensagens recentes

I think you can just delete the lucene database and let the tables rebuild.

You can also set users.search.with.index=false and organizations.search.with.index=false to make liferay use the database instead of lucene.
This may effect performance.
Roman Hoyenko
RE: Rebuild Lucene index
27 de Agosto de 2011 11:40
Resposta

Roman Hoyenko

Ranking: Liferay Master

Mensagens: 868

Data de entrada: 8 de Outubro de 2007

Mensagens recentes

Thanks a lot, I will try Monday if hurricane doesn't blow us away emoticon
Roman Hoyenko
RE: Rebuild Lucene index
30 de Setembro de 2011 12:21
Resposta

Roman Hoyenko

Ranking: Liferay Master

Mensagens: 868

Data de entrada: 8 de Outubro de 2007

Mensagens recentes

I didn't have time to do this, finally got to see what's going on.

One strange thing about my Lucene setup - I wanted it to write to the filesystem instead of DB, but it doesn't look like it worked, I had this property:

#
# Designate whether Lucene stores indexes in a database via JDBC, file
# system, or in RAM.
#
#lucene.store.type=jdbc
lucene.store.type=file
#lucene.store.type=ram

and
#
# Set the directory where Lucene indexes are stored. This is only referenced
# if Lucene stores indexes in the file system.
#
lucene.dir=${liferay.home}/data/lucene/

but it still looks like lucene uses db. Any other place need changing for this to work? I didn't find anything.

Also, in the DB I have two tables LUCENE_0 and LUCENE_30625 (I don't remember the second number exactly). As I understand the second number is the Organization ID. I tried reindexing and I see updated data in the db. Is it safe to remove this data from the table?