All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.adobe.cq.searchcollections.lucene.SubtreeQuery Maven / Gradle / Ivy

/*************************************************************************
 *
 * ADOBE CONFIDENTIAL
 * __________________
 *
 *  Copyright 2012 Adobe Systems Incorporated
 *  All Rights Reserved.
 *
 * NOTICE:  All information contained herein is, and remains
 * the property of Adobe Systems Incorporated and its suppliers,
 * if any.  The intellectual and technical concepts contained
 * herein are proprietary to Adobe Systems Incorporated and its
 * suppliers and are protected by trade secret or copyright law.
 * Dissemination of this information or reproduction of this material
 * is strictly forbidden unless prior written permission is obtained
 * from Adobe Systems Incorporated.
 **************************************************************************/
package com.adobe.cq.searchcollections.lucene;

import java.io.IOException;

import org.apache.lucene.index.IndexReader;
import org.apache.lucene.search.FilteredTermEnum;
import org.apache.lucene.search.MultiTermQuery;

/**
 * @deprecated
 */
class SubtreeQuery extends MultiTermQuery {

    /** Serial version UID */
    private static final long serialVersionUID = 8701293051322904847L;

    private final String path;

    private final boolean includeRoot;

    public SubtreeQuery(String path, boolean includeRoot) {
        this.path = path;
        this.includeRoot = includeRoot;
    }

    @Override
    protected FilteredTermEnum getEnum(IndexReader reader) throws IOException {
        return new SubtreeTermEnum(reader, path, includeRoot);
    }

    @Override
    public String toString(String field) {
        return path;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy