001/* 002 * Copyright (c) 2006-2014 Nuxeo SA (http://nuxeo.com/) and others. 003 * 004 * All rights reserved. This program and the accompanying materials 005 * are made available under the terms of the Eclipse Public License v1.0 006 * which accompanies this distribution, and is available at 007 * http://www.eclipse.org/legal/epl-v10.html 008 * 009 * Contributors: 010 * Florent Guillaume 011 * Stephane Lacoin 012 */ 013package org.nuxeo.ecm.core.storage.dbs; 014 015import org.nuxeo.ecm.core.storage.DefaultFulltextParser; 016import org.nuxeo.ecm.core.storage.FulltextConfiguration; 017import org.nuxeo.ecm.core.storage.FulltextExtractorWork; 018import org.nuxeo.ecm.core.storage.FulltextUpdaterWork; 019 020/** 021 * Work task that does fulltext extraction from the blobs of the given document. 022 * <p> 023 * The extracted fulltext is then passed to the single-threaded {@link FulltextUpdaterWork}. 024 * 025 * @since 5.7 026 */ 027public class DBSFulltextExtractorWork extends FulltextExtractorWork { 028 029 private static final long serialVersionUID = 1L; 030 031 public DBSFulltextExtractorWork(String repositoryName, String docId) { 032 super(repositoryName, docId, repositoryName + ':' + docId + ":dbsFulltextExtractor", true); 033 } 034 035 @Override 036 public void initFulltextConfigurationAndParser() { 037 fulltextConfiguration = new FulltextConfiguration(); 038 fulltextConfiguration.indexNames.add("default"); 039 fulltextConfiguration.indexesAllBinary.add("default"); 040 fulltextParser = new DefaultFulltextParser(); 041 } 042 043}