Examples of Indexer


Examples of com.salesforce.hbase.index.Indexer

    admin.createTable(desc);
    HTable primary = new HTable(UTIL.getConfiguration(), tableNameBytes);

    // overwrite the codec so we can verify the current state
    HRegion region = UTIL.getMiniHBaseCluster().getRegions(tableNameBytes).get(0);
    Indexer indexer =
        (Indexer) region.getCoprocessorHost().findCoprocessor(Indexer.class.getName());
    CoveredColumnsIndexBuilder builder =
        (CoveredColumnsIndexBuilder) indexer.getBuilderForTesting();
    VerifyingIndexCodec codec = new VerifyingIndexCodec();
    builder.setIndexCodecForTesting(codec);

    // setup the Puts we want to write
    final long ts = System.currentTimeMillis();
View Full Code Here

Examples of edu.isi.karma.semantictypes.tfIdf.Indexer

        // Ignore, the searcher might not work if index is empty.
      }
    }

    // index the document
    Indexer indexer = new Indexer(indexDirectory);
    try {
      indexer.open();
      if (labelDoc != null) {
        IndexableField existingContent = labelDoc.getField(Indexer.CONTENT_FIELD_NAME);
        indexer.updateDocument(existingContent, sb.toString(), label);
      } else {
        indexer.addDocument(sb.toString(), label);
      }
      indexer.commit();
    } finally {
      indexer.close();
    }

    return true;
  }
View Full Code Here

Examples of lius.index.Indexer

                Property prop = jcrContent.getProperty("jcr:mimeType");
                                String mimeType = prop.getString();
                               
                Property content = jcrContent.getProperty("jcr:data");
                InputStream is = content.getStream();
                                Indexer indexer = IndexerFactory.getIndexer(is, mimeType, getLiusConfig());
                               
                                if (indexer == null) {
                                    System.out.println(prop.getString());
                                    System.out.println(nodeToIndex.getName());
                                }
                                else{
                                    lf.setValue(indexer.getContent());
                                    LiusField newLiusField = new LiusField();
                                    BeanUtils.copyProperties(newLiusField, lf);

                                    toIndex2.add(newLiusField);
                                    found = true;
View Full Code Here

Examples of net.jcores.jre.options.Indexer

       
        Assert.assertEquals(Data.s1.length, c.intValue());
       
        c.set(0);
        final ConcurrentHashMap<Integer, Object> cc = new ConcurrentHashMap<Integer, Object>();
        final Indexer indexer = Indexer.NEW();
       
        $(Data.sn).map(new F1<String, Void>() {
            @SuppressWarnings("boxing")
            @Override
            public Void f(String x) {
                c.getAndIncrement();
                if(cc.containsKey(indexer.i())) System.out.println("DOUBLE " + indexer.i());
                cc.put(indexer.i(), new Object());
                return null;
            }
        }, indexer);
        Assert.assertEquals(Data.sn.length, c.intValue());
View Full Code Here

Examples of org.apache.cocoon.components.search.components.Indexer

        }
        AnalyzerManager analyzerM = null;
        try {

            indexer_busy = true;
            Indexer indexer = (Indexer) this.manager.lookup(indexer_role);

            // update maybe the analyzer
            analyzerM = (AnalyzerManager) this.manager
                    .lookup(AnalyzerManager.ROLE);

            indexer.setAnalyzer(analyzerM.getAnalyzer(getDefaultAnalyzerID()));
            indexer.setIndex(directory);

            return indexer;
        } catch (ServiceException ex1) {
            throw new IndexException(ex1);
        } catch (ConfigurationException ex2) {
View Full Code Here

Examples of org.apache.hbase.index.Indexer

    admin.createTable(desc);
    HTable primary = new HTable(UTIL.getConfiguration(), tableNameBytes);

    // overwrite the codec so we can verify the current state
    HRegion region = UTIL.getMiniHBaseCluster().getRegions(tableNameBytes).get(0);
    Indexer indexer =
        (Indexer) region.getCoprocessorHost().findCoprocessor(Indexer.class.getName());
    CoveredColumnsIndexBuilder builder =
        (CoveredColumnsIndexBuilder) indexer.getBuilderForTesting();
    VerifyingIndexCodec codec = new VerifyingIndexCodec();
    builder.setIndexCodecForTesting(codec);

    // setup the Puts we want to write
    final long ts = System.currentTimeMillis();
View Full Code Here

Examples of org.apache.jackrabbit.mk.index.Indexer

    private ContentRepositoryImpl(MicroKernel mk) {
        this(mk, getDefaultIndexProvider(mk));
    }

    private static QueryIndexProvider getDefaultIndexProvider(MicroKernel mk) {
        QueryIndexProvider provider = new Indexer(mk);
        provider.init();
        return provider;
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.index.Indexer

public class PropertyIndexTest {

    @Test
    public void test() {
        MicroKernel mk = new MicroKernelImpl();
        Indexer indexer = new Indexer(mk);
        indexer.init();
        PropertyIndex index = indexer.createPropertyIndex("id", true);

        String head = mk.getHeadRevision();

        // meta data
        String meta = mk.getNodes(Indexer.INDEX_CONFIG_PATH, head, 1, 0, -1, null);
        Assert.assertEquals("{\":childNodeCount\":2,\":data\":{\":childNodeCount\":0}," +
                "\"property@id,unique\":{\":childNodeCount\":1,\":data\":{}}}", meta);

        String oldHead = head;

        Assert.assertEquals(null, index.getPath("1", head));

        head = mk.commit("/", "+\"test\" : {\"id\":\"1\"}", head, null);
        head = mk.commit("/", "+\"test2\" : {\"id\":\"2\"}", head, null);

        Assert.assertEquals("/test", index.getPath("1", head));
        Assert.assertEquals("/test2", index.getPath("2", head));

        Assert.assertEquals("/test", index.getPath("1", oldHead));
        Assert.assertEquals("/test2", index.getPath("2", oldHead));

        Assert.assertEquals("/test", index.getPath("1", head));
        Assert.assertEquals("/test2", index.getPath("2", head));

        head = mk.commit("/", "-\"test2\"", head, null);
        head = mk.commit("/test", "+\"test\" : {\"id\":\"3\"}", head, null);

        Assert.assertEquals("/test/test", index.getPath("3", head));

        // Recreate the indexer
        indexer = new Indexer(mk);
        indexer.init();
        index = indexer.createPropertyIndex("id", true);
        head = mk.getHeadRevision();
        Assert.assertEquals("/test/test", index.getPath("3", head));
        Assert.assertEquals(null, index.getPath("0", head));

        Assert.assertEquals("/test", index.getPath("1", head));
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.index.old.Indexer

    private final Indexer indexer;
    private final Set<String> branchRevisions = Collections.synchronizedSet(new HashSet<String>());

    public IndexWrapper(MicroKernel mk) {
        this.mk = MicroKernelWrapperBase.wrap(mk);
        this.indexer = new Indexer(mk);
        indexer.init();
    }
View Full Code Here

Examples of org.apache.lenya.lucene.index.Indexer

            log.debug("Lucene configuration: " + luceneConfig);

            String luceneConfigAbsolutePath = servletContextPath + File.separator + "lenya" + File.separator + "pubs" + File.separator + publicationId  + File.separator + luceneConfig;
            log.debug("Lucene configuration: " + luceneConfigAbsolutePath);

            Indexer indexer = Index.getIndexer(luceneConfigAbsolutePath);
      indexer.indexDocument(new File(files));
        } catch (Exception e) {
            log.error("" + e);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.