• luke入门


    一、参考

    github luke

    Lucene 02 - Lucene的入门程序(Java API的简单使用)

    修复mac字体模糊

    二、基本介绍

    (1) 从lucene8.1之后, luke已经是lucene的子模块了,不需要单独安装;

    (2) luke基于Swing创建, SwingJava编写的一个UI画图库;

    (3) luke用于查看lucene索引的数据详情

    三、运行lucene3.3.0

    3.1 下载

    下载地址

    3.2 解压编译

    (1) 解压源码文件

    unzip luke-3.3.0.zip

    # ls -ll luke-3.3.0
    
    total 64
    -rw-r--r--@ 1 yz  staff  15311 Jul  6  2011 CHANGES.txt
    -rw-r--r--@ 1 yz  staff   4092 Jul  6  2011 build.xml
    drwxr-xr-x@ 9 yz  staff    288 Jul  6  2011 lib
    -rw-r--r--@ 1 yz  staff    551 Jul  6  2011 luke-local.jnlp
    -rw-r--r--@ 1 yz  staff   1512 Jul  6  2011 luke.gif
    -rw-r--r--@ 1 yz  staff    549 Jul  6  2011 luke.jnlp
    drwxr-xr-x@ 7 yz  staff    224 Jul  6  2011 src
    
    

    (2) 进入项目,执行编译

    ant, 详见ant入门

    编译失败, error如下

    
    Buildfile: /Users/yz/work/github/yzlucene/resources/luke-3.3.0/build.xml
    
    clean:
    
    init:
        [mkdir] Created dir: /Users/yz/work/github/yzlucene/resources/luke-3.3.0/build
        [mkdir] Created dir: /Users/yz/work/github/yzlucene/resources/luke-3.3.0/dist
    
    compile:
        [javac] /Users/yz/work/github/yzlucene/resources/luke-3.3.0/build.xml:28: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
        [javac] Compiling 55 source files to /Users/yz/work/github/yzlucene/resources/luke-3.3.0/build
        [javac] warning: [options] bootstrap class path not set in conjunction with -source 5
        [javac] error: Source option 5 is no longer supported. Use 6 or later.
        [javac] error: Target option 1.5 is no longer supported. Use 1.6 or later.
    
    BUILD FAILED
    /Users/yz/work/github/yzlucene/resources/luke-3.3.0/build.xml:28: Compile failed; see the compiler error output for details.
    
    Total time: 1 second
    
    

    分析原因是jdk版本问题,修改build.xml

    再次编译ant, 编译成功

    dist:
         [copy] Copying 24 files to /Users/yz/work/github/yzlucene/resources/luke-3.3.0/dist
          [zip] Building zip: /Users/yz/work/github/yzlucene/resources/luke-3.3.0/dist/luke-src-3.3.0.zip
          [tar] Building tar: /Users/yz/work/github/yzlucene/resources/luke-3.3.0/dist/luke-src-3.3.0.tgz
    
    BUILD SUCCESSFUL
    Total time: 31 seconds
    

    3.3 运行luke3.3.0

    cd build/
    
    java -jar lukeall-3.3.0.jar
    
    

    四、问题

    4.1 luke字体模糊

    如上,出现字体模糊的问题,解决方法是启用mac proCGFontRenderingFontSmoothing的功能

    # 终端输入命令,可以启用该功能
    
    defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO
    
    
  • 相关阅读:
    横竖屏切换
    org.apache.harmony.xml.ExpatParser$ParseException: At line 1, column 0: unknown encoding
    @Value() 使用方法
    调用第三方超时处理
    spring 配置注解定时器quartz01
    tomcat:PermGen space
    06-图3 六度空间 (30分)
    06-图2 Saving James Bond
    06-图1 列出连通集 (25分)
    05-树9 Huffman Codes (30分)
  • 原文地址:https://www.cnblogs.com/thewindyz/p/14092880.html
Copyright © 2020-2023  润新知