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

KeywordStrategy

public class KeywordStrategy extends ContentStrategy
author
Simon Willnauer

Fields Summary
Constructors Summary
public KeywordStrategy(org.apache.lucene.gdata.search.config.IndexSchemaField fieldConfig)

param
fieldConfig

        super(Field.Index.UN_TOKENIZED,Field.Store.YES,fieldConfig);
    
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);
        }