luke

Lucene numeric range search with LUKE

不打扰是莪最后的温柔 提交于 2019-12-05 02:16:43
问题 I have a number of numeric Lucene indexed fields: 60000 78500 105000 If I use LUKE to query for 78500 as follows: price:78500 It returns the correct record, however if I try to return all three record as a range I get no results. price:[60000 TO 105000] I realise this is due to padding as numbers are treated strings by Lucene however I just wish to know what I should be putting into LUKE to return the three records. Many thanks for any help. 回答1: If the fields are indexed as NumericField you

Lucene numeric range search with LUKE

与世无争的帅哥 提交于 2019-12-03 20:23:47
I have a number of numeric Lucene indexed fields: 60000 78500 105000 If I use LUKE to query for 78500 as follows: price:78500 It returns the correct record, however if I try to return all three record as a range I get no results. price:[60000 TO 105000] I realise this is due to padding as numbers are treated strings by Lucene however I just wish to know what I should be putting into LUKE to return the three records. Many thanks for any help. If the fields are indexed as NumericField you must use "Use XML Query Parser" option in query parser tab and the 3.5 version of Luke: https://code.google

Upgrade solr 1.4 index to solr 3.3?

喜你入骨 提交于 2019-12-03 13:46:04
I have an existing index build using apache solr 1.4. I want to use this existing index in version 3.3. As you know the index format is changed after 3.x, so how is it possible to do this? I have exported the existing index (that is in 1.4 version) using Luke to XML. There's two ways to do this: if your index is unoptimized, then simply optimize it - this will upgrade the file format along the way. if your index is already optimized, you can't do this. Instead, use the command line tool supplied with solr (your path may differ from mine java -cp work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17

Luke 4.6.1 FormatTooNew error?

安稳与你 提交于 2019-12-01 05:24:16
So I'm trying to use Luke for the first time and I'm having some trouble. I point it to the directory I want, but see this: org.apache.lucene.index.IndexFormatTooNewException: Format version is not supported (resource: SimpleFSIndexInput(path="C:\Users*me*\Chat Data\chat-data\index\segments.gen")): -3 (needs to be between -2 and -2) Does anyone know how to fix this? Is it a compatibility issue? I'm lost. Looks like you are using a version of Luke which is too old for your index. You can get a newer version from https://github.com/DmitryKey/luke/releases/ . 来源: https://stackoverflow.com

Luke 4.6.1 FormatTooNew error?

流过昼夜 提交于 2019-12-01 02:51:33
问题 So I'm trying to use Luke for the first time and I'm having some trouble. I point it to the directory I want, but see this: org.apache.lucene.index.IndexFormatTooNewException: Format version is not supported (resource: SimpleFSIndexInput(path="C:\Users*me*\Chat Data\chat-data\index\segments.gen")): -3 (needs to be between -2 and -2) Does anyone know how to fix this? Is it a compatibility issue? I'm lost. 回答1: Looks like you are using a version of Luke which is too old for your index. You can

lucene开发必备工具luke介绍

僤鯓⒐⒋嵵緔 提交于 2019-11-30 16:28:08
本文已经迁移到 搞搜索 做lucene开发的,免不了要和索引文件打交道,但是一些二进制的文件我们怎么去看,下面就要隆重的有请luke了 根据百度百科的说法:Luke是一个用于Lucene搜索引擎的,方便开发和诊断的第三方工具,它可以访问现有Lucene的索引,并允许您显示和修改。 我们可以通过luke来进行一般的索引查看和修改操作。 就打个比方,lucene的索引文件就好像是数据库存储的数据文件,luke就是一个DBMS系统,相信都懂的^_^ 首先jdk是必须地,然后直接到googlecode上把最新的luke下下来,我现在用的是3.5版本,下下来就是一个jar包,可以直接双击打开,或者到命令行:java -jar /lukeall-3.5.0.jar,界面还是不错的哈,然后上方的菜单栏上的file按钮就可以打开索引目录了,如果当前索引已经被打开了(里面有write.lock文件了),我们就可以使用强制解锁的方法来打开目录,或者是使用readonly的方法来打开索引目录,打开后就可以像DBMS一看的查看索引里面保存的数据了,如果索引改变了,可以点击overview界面上的re-open按钮重新打开。 共有5个界面: overview是用来进行索引的一般性查看和操作的,比如索引目录民,索引文件版本。。。等等概要信息,右上角三个按钮分别可以重新打开索引,提交索引更改和关闭当前打开的索引

lucene开发序幕曲之luke神器

泄露秘密 提交于 2019-11-29 13:10:27
Lucene是一款很优秀的全文检索的开源库,目前最新的版本是Lucene4.4。 很多人知道lucene或者solr,但是却很少人知道luke,在这里笔者就对luke做一个简单的介绍,Luke是一个用于Lucene搜索引擎的,方便开发和诊断的第三方工具,它可以访问现有的Lucene的索引,并允许你显示和修改和调试。luke是google公司最早提供的,对于lucene的直接索引查看很方便,在这之前,如果你想查看你生成的lucene的索引的全部内容,你得需要写很多代码进行操作,更有甚者,也许你只想简单的看下生成索引的总数据量,你也得写一段代码才能统计出来,而luke的出现,就为lucene及solr生成的索引,可以非常方便的进行查询及调试,不仅如此luke还提供了良好的插件机制,使用者可以自定义某些功能进行安装使用,非常灵活。 使用luke工具,不仅可以对索引进行直接查看,还可以对索引进行增加,删除,修改以及优化,还可以是使用不同的分词器,对特定的字段进行分词等等,这一点非常类似solr的管理页面提供的功能,但是两者的侧重点不在一个地方。 luke工具的使用也非常简单,下载完luke后直接放在某个盘符下然后可以在cmd窗口找到luke工具所在的盘符根路径下使用"java -jar luke.jar"就可以启动了,有的luke工具直接双击运行就可以启动,使用时候两种方式都可以试一下

给LUKE增加word分词器

纵然是瞬间 提交于 2019-11-28 14:07:20
word分词是一个Java实现的分布式中文分词组件 1、下载 http://luke.googlecode.com/files/lukeall-4.0.0-ALPHA.jar (国内不能访问) 2、下载并解压 Java中文分词组件word-1.0-bin.zip 3、将解压后的 Java中文分词组件word-1.0-bin/word-1.0 文件夹里面的4个jar包解压到当前文件夹,用压缩解压工具如winrar打开lukeall-4.0.0-ALPHA.jar,将当前文件夹里面除了.jar、.bat、.html文件外的其他所有文件拖到lukeall-4.0.0-ALPHA.jar里面 4、执行命令 java -jar lukeall-4.0.0-ALPHA.jar 启动luke,在Search选项卡的Analysis里面就可以选择 org.apdplat.word.lucene.ChineseWordAnalyzer 分词器了 5、在Plugins选项卡的Available analyzers found on the current classpath里面也 可以选择 org.apdplat.word.lucene.ChineseWordAnalyzer 分词器 下载已经集成好的Luke插件: lukeall-4.0.0-ALPHA-with-word-1.0.jar