Another dirty trick to eliminate the last unnecessary lookup during indexing snapshots.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6124 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Britt Park
2007-06-28 00:22:45 +00:00
parent 8aa69caee3
commit fcb4c9c54b

View File

@@ -716,7 +716,19 @@ public class AVMLuceneIndexerImpl extends AbstractLuceneIndexerImpl<String> impl
}
doc.add(new Field(attributeName + ".locale", locale.toString().toLowerCase(), Field.Store.NO, Field.Index.UN_TOKENIZED, Field.TermVector.NO));
ContentReader reader = contentService.getReader(banana, propertyName);
ContentReader reader = null;
try
{
reader = contentService.getRawReader(contentData.getContentUrl());
reader.setEncoding(contentData.getEncoding());
reader.setLocale(contentData.getLocale());
reader.setMimetype(contentData.getMimetype());
}
catch (Exception e)
{
reader = null;
}
// ContentReader reader = contentService.getReader(banana, propertyName);
if (reader != null && reader.exists())
{
boolean readerReady = true;