FileDocCategorySizeDatePackage
PlainTextStrategy.javaAPI DocApache Lucene 2.1.02019Wed Feb 14 10:46:04 GMT 2007org.apache.lucene.gdata.search.analysis

PlainTextStrategy

public class PlainTextStrategy extends ContentStrategy
author
Simon Willnauer

Fields Summary
Constructors Summary
protected PlainTextStrategy(org.apache.lucene.gdata.search.config.IndexSchemaField fieldConfiguration)

        super(fieldConfiguration);
        
    
Methods Summary
public voidprocessIndexable(Indexable indexable)

see
org.apache.lucene.gdata.search.analysis.ContentStrategy#processIndexable(org.apache.lucene.gdata.search.analysis.Indexable)

        String path = this.config.getPath();
        try {
            Node node = indexable.applyPath(path);
            if(node == null)
                throw new NotIndexableException("Could not retrieve content for schema field: "+this.config);
            this.content = node.getTextContent();
            
        } catch (XPathExpressionException e) {
            throw new NotIndexableException("Can not apply Path", e);
        }