mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-06-16 17:55:15 +00:00
. Advanced Search improvements
. Fix to Lucene Indexer (from Andy) to correct the bug where if content was not indexed (e.g. JPEG) then it's mimetype/size values did not get added to the index. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2107 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
parent
4e3f42d47a
commit
6c65b84a91
@ -1395,6 +1395,9 @@ public class LuceneIndexerImpl extends LuceneBase implements LuceneIndexer
|
||||
ContentData contentData = DefaultTypeConverter.INSTANCE.convert(ContentData.class, value);
|
||||
if (index)
|
||||
{
|
||||
// store mimetype in index - even if content does not index it is useful
|
||||
doc.add(new Field(attributeName+".mimetype", contentData.getMimetype(), false, true, false));
|
||||
|
||||
ContentReader reader = contentService.getReader(nodeRef, propertyName);
|
||||
if (reader != null && reader.exists())
|
||||
{
|
||||
@ -1459,7 +1462,6 @@ public class LuceneIndexerImpl extends LuceneBase implements LuceneIndexer
|
||||
}
|
||||
doc.add(Field.Text("TEXT", isr));
|
||||
|
||||
|
||||
ris = reader.getReader().getContentInputStream();
|
||||
try
|
||||
{
|
||||
@ -1473,9 +1475,6 @@ public class LuceneIndexerImpl extends LuceneBase implements LuceneIndexer
|
||||
doc.add(Field.Text("@"
|
||||
+ QName.createQName(propertyName.getNamespaceURI(), ISO9075
|
||||
.encode(propertyName.getLocalName())), isr));
|
||||
|
||||
|
||||
doc.add(new Field(attributeName+".mimetype", contentData.getMimetype(), false, true, false));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user