Package org.apache.lucene.facet.index.params

Examples of org.apache.lucene.facet.index.params.DefaultFacetIndexingParams


                            DirectoryTaxonomyWriter destTaxWriter) throws IOException {
    // merge the taxonomies
    destTaxWriter.addTaxonomy(srcTaxDir, map);

    int ordinalMap[] = map.getMap();
    FacetIndexingParams params = new DefaultFacetIndexingParams();

    DirectoryReader reader = DirectoryReader.open(srcIndexDir, -1);
    List<AtomicReaderContext> leaves = reader.leaves();
    AtomicReader wrappedLeaves[] = new AtomicReader[leaves.size()];
    for (int i = 0; i < leaves.size(); i++) {
View Full Code Here


    // collect matching documents into a collector
    TopScoreDocCollector topDocsCollector = TopScoreDocCollector.create(10, true);

    if (indexingParams == null) {
      indexingParams = new DefaultFacetIndexingParams();
    }
   
    // Faceted search parameters indicate which facets are we interested in
    FacetSearchParams facetSearchParams = new FacetSearchParams(indexingParams);
   
View Full Code Here

                            DirectoryTaxonomyWriter destTaxWriter) throws IOException {
    // merge the taxonomies
    destTaxWriter.addTaxonomy(srcTaxDir, map);

    PayloadProcessorProvider payloadProcessor = new FacetsPayloadProcessorProvider(
        srcIndexDir, map.getMap(), new DefaultFacetIndexingParams());
    destIndexWriter.setPayloadProcessorProvider(payloadProcessor);

    IndexReader reader = DirectoryReader.open(srcIndexDir);
    try {
      destIndexWriter.addIndexes(reader);
View Full Code Here

    return newIndexWriterConfig(TEST_VERSION_CURRENT, analyzer);
  }

  /** Returns a default facet indexing params */
  protected FacetIndexingParams getFacetIndexingParams(final int partSize) {
    return new DefaultFacetIndexingParams() {
      @Override
      protected int fixedPartitionSize() {
        return partSize;
      }
    };
View Full Code Here

   * @throws IOException
   *
   */
  public CategoryDocumentBuilder(TaxonomyWriter taxonomyWriter)
      throws IOException {
    this(taxonomyWriter, new DefaultFacetIndexingParams());
  }
View Full Code Here

    }
    // The last thread uses ONLY the DefaultFacetIndexingParams so that
    // it references a different TFC cache. This will still result
    // in valid results, but will only search one of the category lists
    // instead of all of them.
    multis[numThreads - 1] = new Multi(slowIndexReader, slowTaxoReader, new DefaultFacetIndexingParams());

    // Gentleman, start your engines
    for (Multi m : multis) {
      m.start();
    }
View Full Code Here

    // Create temporary RAMDirectories
    Directory[][] dirs = FacetTestUtils.createIndexTaxonomyDirs(1);

    // Create our index/taxonomy writers
    IndexTaxonomyWriterPair[] writers = FacetTestUtils.createIndexTaxonomyWriterPair(dirs);
    DefaultFacetIndexingParams iParams = new DefaultFacetIndexingParams();

    // Add a facet to the index
    addFacets(iParams, writers[0].indexWriter, writers[0].taxWriter, "a", "b");

    // Commit Changes
View Full Code Here

    // Create temporary RAMDirectories
    Directory[][] dirs = FacetTestUtils.createIndexTaxonomyDirs(1);
    // Create our index/taxonomy writers
    IndexTaxonomyWriterPair[] writers = FacetTestUtils
    .createIndexTaxonomyWriterPair(dirs);
    DefaultFacetIndexingParams iParams = new DefaultFacetIndexingParams() {
      @Override
      protected int fixedPartitionSize() {
        return 2;
      }
    };
View Full Code Here

    // Write index using 'normal' directories
    IndexWriter w = new IndexWriter(indexDir, new IndexWriterConfig(
        TEST_VERSION_CURRENT, new MockAnalyzer(random, MockTokenizer.WHITESPACE, false)));
    DirectoryTaxonomyWriter tw = new DirectoryTaxonomyWriter(taxoDir);
    DefaultFacetIndexingParams iParams = new DefaultFacetIndexingParams();
    // Add documents and facets
    for (int i = 0; i < 1000; i++) {
      addFacets(iParams, w, tw, "facet", Integer.toString(i));
    }
    w.close();
View Full Code Here

  public void testMultipleIndices() throws IOException {
    // Create temporary RAMDirectories
    Directory[][] dirs = FacetTestUtils.createIndexTaxonomyDirs(2);
    // Create our index/taxonomy writers
    IndexTaxonomyWriterPair[] writers = FacetTestUtils.createIndexTaxonomyWriterPair(dirs);
    DefaultFacetIndexingParams iParams = new DefaultFacetIndexingParams();

    // Add a facet to the index
    addFacets(iParams, writers[0].indexWriter, writers[0].taxWriter, "a", "b");
    addFacets(iParams, writers[1].indexWriter, writers[1].taxWriter, "d", "e");
    // Commit Changes
View Full Code Here

TOP

Related Classes of org.apache.lucene.facet.index.params.DefaultFacetIndexingParams

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.