Index: lucene/contrib/facet/src/test/org/apache/lucene/facet/FacetTestBase.java =================================================================== --- lucene/contrib/facet/src/test/org/apache/lucene/facet/FacetTestBase.java (revision 1188595) +++ lucene/contrib/facet/src/test/org/apache/lucene/facet/FacetTestBase.java (working copy) @@ -9,7 +9,6 @@ import java.util.List; import java.util.Map; -import org.apache.lucene.DocumentBuilder.DocumentBuilderException; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.MockAnalyzer; import org.apache.lucene.analysis.MockTokenizer; @@ -189,7 +188,7 @@ *

Subclasses can override this to test different scenarios */ protected void populateIndex(RandomIndexWriter iw, TaxonomyWriter taxo, FacetIndexingParams iParams) - throws IOException, DocumentBuilderException, CorruptIndexException { + throws IOException, CorruptIndexException { // add test documents int numDocsToIndex = numDocsToIndex(); for (int doc=0; doc - * The idea is that implementations implement {@link #build(Document doc)}, - * which adds to the given Document whatever {@link Field}s it wants to add. A - * DocumentBuilder is also allowed to inspect or change existing Fields in the - * Document, if it wishes to. - *

- * Implementations should normally have a constructor with parameters which - * determine what {@link #build(Document)} will add to doc.
- * To allow reuse of the DocumentBuilder object, implementations are also - * encouraged to have a setter method, which remembers its parameters just like - * the constructor. This setter method cannot be described in this interface, - * because it will take different parameters in each implementation. - *

- * The interface defines a builder pattern, which allows applications to invoke - * several document builders in the following way: - * - *

- * builder1.build(builder2.build(builder3.build(new Document())));
- * 
- * - * @lucene.experimental - */ -public interface DocumentBuilder { - - /** An exception thrown from {@link DocumentBuilder}'s build(). */ - public static class DocumentBuilderException extends Exception { - - public DocumentBuilderException() { - super(); - } - - public DocumentBuilderException(String message) { - super(message); - } - - public DocumentBuilderException(String message, Throwable cause) { - super(message, cause); - } - - public DocumentBuilderException(Throwable cause) { - super(cause); - } - - } - - /** - * Adds to the given document whatever {@link Field}s the implementation needs - * to add. Return the docunment instance to allow for chaining calls. - */ - public Document build(Document doc) throws DocumentBuilderException; - -} Index: lucene/contrib/facet/src/examples/org/apache/lucene/facet/example/simple/SimpleIndexer.java =================================================================== --- lucene/contrib/facet/src/examples/org/apache/lucene/facet/example/simple/SimpleIndexer.java (revision 1188595) +++ lucene/contrib/facet/src/examples/org/apache/lucene/facet/example/simple/SimpleIndexer.java (working copy) @@ -11,7 +11,6 @@ import org.apache.lucene.index.IndexWriterConfig.OpenMode; import org.apache.lucene.store.Directory; -import org.apache.lucene.DocumentBuilder; import org.apache.lucene.facet.example.ExampleUtils; import org.apache.lucene.facet.index.CategoryDocumentBuilder; import org.apache.lucene.facet.taxonomy.CategoryPath; @@ -66,7 +65,7 @@ // we do not alter indexing parameters! // a category document builder will add the categories to a document once build() is called - DocumentBuilder categoryDocBuilder = new CategoryDocumentBuilder(taxo).setCategoryPaths(facetList); + CategoryDocumentBuilder categoryDocBuilder = new CategoryDocumentBuilder(taxo).setCategoryPaths(facetList); // create a plain Lucene document and add some regular Lucene fields to it Document doc = new Document(); Index: lucene/contrib/facet/src/examples/org/apache/lucene/facet/example/multiCL/MultiCLIndexer.java =================================================================== --- lucene/contrib/facet/src/examples/org/apache/lucene/facet/example/multiCL/MultiCLIndexer.java (revision 1188595) +++ lucene/contrib/facet/src/examples/org/apache/lucene/facet/example/multiCL/MultiCLIndexer.java (working copy) @@ -14,7 +14,6 @@ import org.apache.lucene.store.Directory; import org.apache.lucene.store.RAMDirectory; -import org.apache.lucene.DocumentBuilder; import org.apache.lucene.facet.example.ExampleUtils; import org.apache.lucene.facet.example.simple.SimpleUtils; import org.apache.lucene.facet.index.CategoryDocumentBuilder; @@ -167,7 +166,7 @@ // we do not alter indexing parameters! // a category document builder will add the categories to a document // once build() is called - DocumentBuilder categoryDocBuilder = new CategoryDocumentBuilder( + CategoryDocumentBuilder categoryDocBuilder = new CategoryDocumentBuilder( taxo, iParams).setCategoryPaths(facetList); // create a plain Lucene document and add some regular Lucene fields