• 大小: 38.49MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-07-05
  • 语言: 其他
  • 标签: Lucene  in  action  

资源简介

全书共14章,分为两大部分。第1部分Lucene的核心,着重于Lucene的核心API介绍,并按照把Lucene集成到程序中的顺序组织;第2部分Lucene的应用,通过对Lucene内置工具的介绍,展示了Lucene技术的高级应用和在各种程序语言上的移植。

资源截图

代码片段和文件信息

package lia.admin;

/**
 * Copyright Manning Publications Co.
 *
 * Licensed under the Apache License Version 2.0 (the “License“);
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing software
 * distributed under the License is distributed on an “AS IS“ BASIS
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND either express or implied.
 * See the License for the specific lan      
*/

import java.io.IOException;
import org.apache.lucene.index.IndexWriter;

import org.apache.lucene.benchmark.byTask.tasks.CreateIndexTask;
import org.apache.lucene.benchmark.byTask.PerfRunData;
import org.apache.lucene.benchmark.byTask.utils.Config;

// From chapter 11

/** A task that you can use from a contrib/benchmark
 *  algorithm to create a ThreadedIndexWriter. */

public class CreateThreadedIndexTask extends CreateIndexTask {

  public CreateThreadedIndexTask(PerfRunData runData) {
    super(runData);
  }

  public int doLogic() throws IOException {
    PerfRunData runData = getRunData();
    Config config = runData.getConfig();
    IndexWriter writer = new ThreadedIndexWriter(
                                runData.getDirectory()
                                runData.getAnalyzer()
                                true
                                config.get(“writer.num.threads“ 4)
                                config.get(“writer.max.thread.queue.size“ 20)        
                                IndexWriter.MaxFieldLength.UNLIMITED);
    CreateIndexTask.setIndexWriterConfig(writer config);
    runData.setIndexWriter(writer);
    return 1;
  }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      18756  2010-03-18 13:47  lia2e\build.xml

     文件        990  2009-07-19 06:24  lia2e\conf\common-terms.utf8

     文件        511  2009-07-19 06:24  lia2e\conf\nutch-conf.xsl

     文件      41657  2009-07-19 06:24  lia2e\conf\nutch-default.xml

     文件        169  2009-07-19 06:24  lia2e\conf\nutch-site.xml

     文件      91302  2009-07-19 06:24  lia2e\conf\plugins\clustering-carrot2\carrot2-filter-lingo.jar

     文件     148385  2009-07-19 06:24  lia2e\conf\plugins\clustering-carrot2\carrot2-local-core.jar

     文件      86978  2009-07-19 06:24  lia2e\conf\plugins\clustering-carrot2\carrot2-snowball-stemmers.jar

     文件      67599  2009-07-19 06:24  lia2e\conf\plugins\clustering-carrot2\carrot2-util-common.jar

     文件      66513  2009-07-19 06:24  lia2e\conf\plugins\clustering-carrot2\carrot2-util-tokenizer.jar

     文件      12061  2009-07-19 06:24  lia2e\conf\plugins\clustering-carrot2\clustering-carrot2.jar

     文件     571259  2009-07-19 06:24  lia2e\conf\plugins\clustering-carrot2\commons-collections-3.2.jar

     文件      62103  2009-07-19 06:24  lia2e\conf\plugins\clustering-carrot2\commons-pool-1.3.jar

     文件      32653  2009-07-19 06:24  lia2e\conf\plugins\clustering-carrot2\Jama-1.0.2.jar

     文件       2087  2009-07-19 06:24  lia2e\conf\plugins\clustering-carrot2\plugin.xml

     文件      11412  2009-07-19 06:24  lia2e\conf\plugins\clustering-carrot2\violinstrings-1.0.2.jar

     文件      10624  2009-07-19 06:24  lia2e\conf\plugins\creativecommons\creativecommons.jar

     文件       2126  2009-07-19 06:24  lia2e\conf\plugins\creativecommons\plugin.xml

     文件       8844  2009-07-19 06:24  lia2e\conf\plugins\feed\feed.jar

     文件       1964  2009-07-19 06:24  lia2e\conf\plugins\feed\plugin.xml

     文件     205338  2009-07-19 06:24  lia2e\conf\plugins\feed\rome-0.9.jar

     文件       3142  2009-07-19 06:24  lia2e\conf\plugins\field-basic\field-basic.jar

     文件       1422  2009-07-19 06:24  lia2e\conf\plugins\field-basic\plugin.xml

     文件       2665  2009-07-19 06:24  lia2e\conf\plugins\field-boost\field-boost.jar

     文件       1422  2009-07-19 06:24  lia2e\conf\plugins\field-boost\plugin.xml

     文件       2101  2009-07-19 06:24  lia2e\conf\plugins\index-anchor\index-anchor.jar

     文件       1392  2009-07-19 06:24  lia2e\conf\plugins\index-anchor\plugin.xml

     文件       3066  2009-07-19 06:24  lia2e\conf\plugins\index-basic\index-basic.jar

     文件       1434  2009-07-19 06:24  lia2e\conf\plugins\index-basic\plugin.xml

     文件       4642  2009-07-19 06:24  lia2e\conf\plugins\index-more\index-more.jar

............此处省略447个文件信息

评论

共有 条评论