コード例 #1
0
  public void testApply() throws Exception {
    Central c = writeDocument(config, analyzer);

    Central newC =
        SimpleCentralConfig.createCentral(
            StorageFac.createToMongo("61.250.201.78", "search", "storageTest"));
    newC.newSearcher().search("bleujin").debugPrint();
    Debug.line('@', config.buildDir().getLockID(), newC.dir().getLockID());

    Indexer writer = c.newIndexer();
    writer.index(
        analyzer,
        new IndexJob<Void>() {
          public Void handle(IndexSession session) throws Exception {
            session.insertDocument(MyDocument.testDocument().keyword("name", "bleujin"));
            return null;
          }
        });

    newC.newSearcher().search("bleujin").debugPrint();
    Debug.line();
  }