lucene的两个小问题

淘宝/天猫商家必看:不懂技术也能搞懂的奇门对接原理与ERP/WMS联调避坑指南 本文为淘宝/天猫商家详细解析阿里奇门对接原理与ERP/WMS联调避坑指南,帮助不懂技术的商家轻松管理数据对接流程。通过标准化接口和安全传输,奇门解决了代运营店铺数据获取难题,提升发货效率。文章还提供了联调阶段的实用技巧和常见问题解决方案,助力商家高效完成系统对接。 阅读详情

1,RangeQuery
   如果我们要查询某个范围的文档,最先想到的可能就是它。
   比如我们要查询的field是时间,使用字符串存储
   RangeQuery rQuery=new RangeQuery(new Term("date","2000-01-01"),new Term("date","2009-01-01"),true);
   结果出现Too Many Clauses的异常,为什么呢?原因就是lucene的实现方法是:把RangeQuery用BooleanQuery来实现,上面的Query会用一个BooleanQuery来实现,
这个BooleanQuery的termQuery是2000-01-01,...,2009-01-01,所有被索引的值中满足条件的。那么想想看这会有多少。
   解决方法,使用RangeFilter

2,Sort
   比如我们想对查询结果根据date域来排序,最先想到的可能是:
   Hits hits = searcher.search(bQuery,new Sort("date"));
   但是却被告知Heap Space不够。怎么会呢?把它改成Hits hits = searcher.search(bQuery); 运行的飞快而且不用什么内存。
   原因,lucene会把所有文档的date域加载到内存中。为什么呢?不太清楚,难道是先排序,然后查询? 等哪天有空再看看源代码吧。
   解决方法,先查询,然后自己排序。


------------------------------------------zz----------------------------------------
http://www.nabble.com/java.lang.OutOfMemoryError:-Java-heap-space-when-sorting-the-fields-td16121128.html

Nabble | Old Nabble1 | Software » Apache » Lucene » Lucene - Java » Lucene - Java Users Login : Register
java.lang.OutOfMemoryError: Java heap space when sorting the fields
View:  Threaded Chronologically All Messages New views 10 Messages — Rating Filter:  0 1 2 3 4 5   Alert me   

 java.lang.OutOfMemoryError: Java heap space when sorting the fields  by sandyg Mar 18, 2008; 09:23pm :: Rate this Message:    - Use ratings to moderate (?)

Reply | Reply to Author | Print | View Threaded | Show Only this Message
this is my search content

QueryParser parser = new QueryParser("keyword",new StandardAnalyzer());
Query query = parser.parse("1");

Sort sort = new Sort(new SortField(sortField));
         Hits       hits = searcher.search(query,sort);

And i had huge data about 13 millions of records
i am not sure y its giving outof memory exception and
no exception when no sorting is done
plz some one help me yar

and also if to increase heap space how to increase it programatically i had command prompt
java -Xms<initial heap size> -Xmx<maximum heap size>
please.....

 Re: java.lang.OutOfMemoryError: Java heap space when sorting the fields  by chrislusf Mar 18, 2008; 11:19pm :: Rate this Message:    - Use ratings to

moderate (?)

Reply | Reply to Author | Print | View Threaded | Show Only this Message
This is because sorting will load all values in that sortFirled into memory.

If it's an integer, you will need 4*N bytes, which is additional 52M for you.

There is no programatical way to increase memory size.

--
Chris Lu
-------------------------
Instant Scalable Full-Text Search On Any Database/Application
site: http://www.dbsight.net
demo: http://search.dbsight.com
Lucene Database Search in 3 minutes:
http://wiki.dbsight.com/index.php?title=Create_Lucene_Database_Search_in_3_minutes
DBSight customer, a shopping comparison site, (anonymous per request)
got 2.6 Million Euro funding!


On Tue, Mar 18, 2008 at 6:23 AM, sandyg <gaddamsandeeps@...> wrote:
>
>  this is my search content
>
>  QueryParser parser = new QueryParser("keyword",new StandardAnalyzer());
>  Query query = parser.parse("1");
>
>  Sort sort = new Sort(new SortField(sortField));
>          Hits       hits = searcher.search(query,sort);
>
>  And i had huge data about 13 millions of records
>  i am not sure y its giving outof memory exception and
>  no exception when no sorting is done
>  plz some one help me yar
>
>  and also if to increase heap space how to increase it programatically i had
>  command prompt
>  java -Xms<initial heap size> -Xmx<maximum heap size>
>  please.....
>  --
>  View this message in context: http://www.nabble.com/java.lang.OutOfMemoryError%3A-Java-heap-space-when-sorting-the-fields-tp16121128p16121128.html
>  Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: java-user-unsubscribe@...
>  For additional commands, e-mail: java-user-help@...
>
> ...[show rest of quote]
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@...
For additional commands, e-mail: java-user-help@...

 

 Re: java.lang.OutOfMemoryError: Java heap space when sorting the fields  by markrmiller Mar 19, 2008; 12:20am :: Rate this Message:    - Use ratings to

moderate (?)

Reply | Reply to Author | Print | View Threaded | Show Only this Message
To sort on 13mil docs will take like at least 400 mb for the field
cache. Thats if you only sort on one field...it can grow fast if you
allow multi field sorting.

How much RAM are you giving your app?

sandyg wrote:
> this is my search content
>
> QueryParser parser = new QueryParser("keyword",new StandardAnalyzer());
> Query query = parser.parse("1");
>
> Sort sort = new Sort(new SortField(sortField));
>           Hits       hits = searcher.search(query,sort);
>
> And i had huge data about 13 millions of records
> i am not sure y its giving outof memory exception and
> no exception when no sorting is done
> plz some one help me yar
>
> and also if to increase heap space how to increase it programatically i had
> command prompt
> java -Xms<initial heap size>  -Xmx<maximum heap size>
> please.....
>     ...[show rest of quote]
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@...
For additional commands, e-mail: java-user-help@...

 

 Re: java.lang.OutOfMemoryError: Java heap space when sorting the fields  by markrmiller Mar 19, 2008; 12:26am :: Rate this Message:    - Use ratings to

moderate (?)

Reply | Reply to Author | Print | View Threaded | Show Only this Message
> Whoops...10 times to much there. more like 40 meg I think. A string
> sort could be a bit higher though, you also need to store all of terms
> to index into.


sandyg wrote:
> this is my search content
>
> QueryParser parser = new QueryParser("keyword",new StandardAnalyzer());
> Query query = parser.parse("1");
>
> Sort sort = new Sort(new SortField(sortField));
>           Hits       hits = searcher.search(query,sort);
>
> And i had huge data about 13 millions of records
> i am not sure y its giving outof memory exception and
> no exception when no sorting is done
> plz some one help me yar
>
> and also if to increase heap space how to increase it programatically i had
> command prompt
> java -Xms<initial heap size>  -Xmx<maximum heap size>
> please.....
>     ...[show rest of quote]
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@...
For additional commands, e-mail: java-user-help@...

 

 Re: java.lang.OutOfMemoryError: Java heap space when sorting the fields  by sandyg Mar 19, 2008; 02:33pm :: Rate this Message:    - Use ratings to moderate

(?)

Reply | Reply to Author | Print | View Threaded | Show Only this Message
Thanks for the reply.
Actually am sorting on a specific field that is on keyword feild which is unique
and i had 1 gb ram

markrmiller wrote:To sort on 13mil docs will take like at least 400 mb for the field
cache. Thats if you only sort on one field...it can grow fast if you
allow multi field sorting.

How much RAM are you giving your app?

sandyg wrote:
> this is my search content
>
> QueryParser parser = new QueryParser("keyword",new StandardAnalyzer());
> Query query = parser.parse("1");
>
> Sort sort = new Sort(new SortField(sortField));
>           Hits       hits = searcher.search(query,sort);
>
> And i had huge data about 13 millions of records
> i am not sure y its giving outof memory exception and
> no exception when no sorting is done
> plz some one help me yar
>
> and also if to increase heap space how to increase it programatically i had
> command prompt
> java -Xms<initial heap size>  -Xmx<maximum heap size>
> please.....
>    

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
...[show rest of quote]

 Re: java.lang.OutOfMemoryError: Java heap space when sorting the fields  by sandyg Mar 19, 2008; 02:37pm :: Rate this Message:    - Use ratings to moderate

(?)

Reply | Reply to Author | Print | View Threaded | Show Only this Message
How can i do sorting on the results i get  (if already hits are there then how to sort on the hits),instead of sorting on all the values b4 getting results

Chris Lu wrote:This is because sorting will load all values in that sortFirled into memory.

If it's an integer, you will need 4*N bytes, which is additional 52M for you.

There is no programatical way to increase memory size.

--
Chris Lu
-------------------------
Instant Scalable Full-Text Search On Any Database/Application
site: http://www.dbsight.net
demo: http://search.dbsight.com
Lucene Database Search in 3 minutes:
http://wiki.dbsight.com/index.php?title=Create_Lucene_Database_Search_in_3_minutes
DBSight customer, a shopping comparison site, (anonymous per request)
got 2.6 Million Euro funding!


On Tue, Mar 18, 2008 at 6:23 AM, sandyg <gaddamsandeeps@gmail.com> wrote:
>
>  this is my search content
>
>  QueryParser parser = new QueryParser("keyword",new StandardAnalyzer());
>  Query query = parser.parse("1");
>
>  Sort sort = new Sort(new SortField(sortField));
>          Hits       hits = searcher.search(query,sort);
>
>  And i had huge data about 13 millions of records
>  i am not sure y its giving outof memory exception and
>  no exception when no sorting is done
>  plz some one help me yar
>
>  and also if to increase heap space how to increase it programatically i had
>  command prompt
>  java -Xms<initial heap size> -Xmx<maximum heap size>
>  please.....
>  --
>  View this message in context: http://www.nabble.com/java.lang.OutOfMemoryError%3A-Java-heap-space-when-sorting-the-fields-tp16121128p16121128.html
>  Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>  For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
...[show rest of quote]

 Re: java.lang.OutOfMemoryError: Java heap space when sorting the fields  by sandyg Mar 19, 2008; 03:04pm :: Rate this Message:    - Use ratings to moderate

(?)

Reply | Reply to Author | Print | View Threaded | Show Only this Message
Hi,
And is it not passibe to sort on the result we get instead of on all the values like
Hits       hits = searcher.search(query);
and it will be good if got sorting on the hits i.e on the result
because my sorting is based on specific  field and that field should be sorted when i click on it.
thanks for the reply


markrmiller wrote:To sort on 13mil docs will take like at least 400 mb for the field
cache. Thats if you only sort on one field...it can grow fast if you
allow multi field sorting.

How much RAM are you giving your app?

sandyg wrote:
> this is my search content
>
> QueryParser parser = new QueryParser("keyword",new StandardAnalyzer());
> Query query = parser.parse("1");
>
> Sort sort = new Sort(new SortField(sortField));
>           Hits       hits = searcher.search(query,sort);
>
> And i had huge data about 13 millions of records
> i am not sure y its giving outof memory exception and
> no exception when no sorting is done
> plz some one help me yar
>
> and also if to increase heap space how to increase it programatically i had
> command prompt
> java -Xms<initial heap size>  -Xmx<maximum heap size>
> please.....
>    

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
...[show rest of quote]

 Re: java.lang.OutOfMemoryError: Java heap space when sorting the fields  by markrmiller Mar 20, 2008; 04:22am :: Rate this Message:    - Use ratings to

moderate (?)

Reply | Reply to Author | Print | View Threaded | Show Only this Message
Heres what happens: in order to sort all of the hits you get back on a
field, you need to get the value of that field for comparisons right?
Well it turns out that reading a field value from the index is pretty
slow (its on the disk after all)...so Lucene will read all of the terms
in the field off disk once (on the first sort/search request) and cache
them. So if your field is an Int your talking numDocs*32 bits for your
cache. For a Long field its numDocs*64. For a String field Lucene caches
a String array with every unique term and then an int array indexing
into the term array.

You might think, if I only ask for the top 10 docs, don't i only read 10
field values? But of course you don't know what docs will be returned as
each search comes in...so you have to cache them all.
Like the other answer said, one field is going to be roughly 50 MB. You
can do the math yourself...I ripped the 40 doing some rough stuff in my
head, but around 50mb is prob closer.

So anyway, you *are* only sorting on the hits you get back...but youll
get different hits all the time so you still have to cache all the field
values. The FieldCache class does this, and thats whats taking up the
RAM. You should have 50 to give it though I would assume...how much RAM
are you giving the JVM?

- mark

sandyg wrote:
> Hi,
> And is it not passibe to sort on the result we get instead of on all the
> values like
> Hits       hits = searcher.search(query);
> and it will be good if got sorting on the hits i.e on the result
> because my sorting is based on specific  field and that field should be
> sorted when i click on it.
> thanks for the reply
>
>
> markrmiller wrote:
>    
>> To sort on 13mil docs will take like at least 400 mb for the field
>> cache. Thats if you only sort on one field...it can grow fast if you
>> allow multi field sorting.
>>
>> How much RAM are you giving your app?
>>
>> sandyg wrote:
>>      
>>> this is my search content
>>>
>>> QueryParser parser = new QueryParser("keyword",new StandardAnalyzer());
>>> Query query = parser.parse("1");
>>>
>>> Sort sort = new Sort(new SortField(sortField));
>>>            Hits       hits = searcher.search(query,sort);
>>>
>>> And i had huge data about 13 millions of records
>>> i am not sure y its giving outof memory exception and
>>> no exception when no sorting is done
>>> plz some one help me yar
>>>
>>> and also if to increase heap space how to increase it programatically i
>>> had
>>> command prompt
>>> java -Xms<initial heap size>   -Xmx<maximum heap size>
>>> please.....
>>>
>>>        
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@...
>> For additional commands, e-mail: java-user-help@...
>>
>>
>>
>>      
>
>     ...[show rest of quote]
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@...
For additional commands, e-mail: java-user-help@...

 

 Re: java.lang.OutOfMemoryError: Java heap space when sorting the fields  by Daniel Noll-3 Mar 20, 2008; 06:41am :: Rate this Message:    - Use ratings to

moderate (?)

Reply | Reply to Author | Print | View Threaded | Show Only this Message
On Thursday 20 March 2008 07:22:27 Mark Miller wrote:
> You might think, if I only ask for the top 10 docs, don't i only read 10
> field values? But of course you don't know what docs will be returned as
> each search comes in...so you have to cache them all.

If it lazily cached one field at a time, I guess this wouldn't be a problem...
but you would still eventually still run out of memory after performing a
certain number of queries.

I guess one solution would be a FieldCache backed by storage on hard disk.

Daniel

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@...
For additional commands, e-mail: java-user-help@...

 

 Re: java.lang.OutOfMemoryError: Java heap space when sorting the fields  by hossman Mar 20, 2008; 07:53am :: Rate this Message:    - Use ratings to moderate

(?)

Reply | Reply to Author | Print | View Threaded | Show Only this Message

: You might think, if I only ask for the top 10 docs, don't i only read 10 field
: values? But of course you don't know what docs will be returned as each search
: comes in...so you have to cache them all.

Arguements have been made in the past that when you have an index
large enough that the FieldCache is prohibitively expensive, and you
expect the number of *matching* documents to be significantly smaller then
the total number of documents, it might make sense to Sort using
LazyLoaded "stored" field values ... it's a pretty radical shift from the
current sorting approach, and would require some explicit work on the part
of the indexing/searching code, but a patch along that lines was created a
while back...

https://issues.apache.org/jira/browse/LUCENE-769

...based on the last comment i posted in that issue, i clearly
thought it showed a lot of promise, but needed cleaned up.  I admittedly
lost track of it as other things took priority in life.  if people want
to dust it off, try it out, and make comments about it's effectiveness I'm
sure it could be revived.

 


-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@...
For additional commands, e-mail: java-user-help@...

 

 


« Search Nabble for "lucene sort heap"

LightInTheBox - Buy quality products at wholesale price! 被过滤广告Free embeddable forum powered by Nabble  Forum Help 

 

【教程4>第2章>第19节】 GMSK解调系统的FPGA开发与matlab对比验证 MSK(Minimum Shift Keying,最小频移键控)和GMSK(Gaussian Minimum Shift Keying,高斯最小频移键控)都是数字调制技术,主要用于无线通信系统中将数字信号转换为模拟信号进行传输。它们都是连续相位移键控(Continuous Phase Shift Keying, CPK)的一种形式,意味着相邻码元之间没有相位跳变的突变,而是连续过渡,这有助于减少信号带宽和降低邻道干扰。GMSK的解调过程与MSK类似,我们这里还是采用和MSK解调一样的1bit解调方法。 阅读详情

相关推荐

WRF后处理总结:wrf-python与NCL在WRF后处理中的基本应用——变量提取、计算与可视化

判断需要提取的变量与诊断量确定后,使用getvar函数进行提取。可使用ncdump-h命令查看wrfout中的变量,wrf中的诊断量分类也可从官方文档处查阅。判断绘图类型所需的可视化绘图类型,决定了你在WRF后处理中的计算步骤。1D点线图:ll_to_xy interpline2D填色图:interplevel3D剖面图:vinterp vertcross绘图、美化色标、XY轴、标签的设置等等。

weixin_43750300的博客 1万+

解决lucene 1.* 使用排序后内存溢出问题

使用lucene一段时间了,最近发现使用sort后服务器内存大赠,经常在800M左右。查了下资料,发现,在lucene 现有所有版本中都有这个问题。现给出测试代码和解决方法:(非原创,是询问[韩国人]后解决的)下面是测试代码: 1usingLucene.Net.Analysis;2usingLucene.Net.Analysis.Standard;3usingLu...

dbz547388190的博客 473

别光看教程了!手把手带你用STM32F103C8T6最小系统板点亮第一个LED(附完整电路图)

本文详细介绍了如何使用STM32F103C8T6最小系统板点亮第一个LED,从硬件连接到软件开发环境搭建,再到编写和下载程序,手把手教你完成STM32入门的第一步。适合初学者快速上手STM32开发,附完整电路图和代码示例。

weixin_28678831的博客 193

有关Lucene的问题:用Lucene构建实时索引

所谓事务性,本多指数据库的属性,包括ACID四个基本要素:原子性(Atomicity)、一致性(Consistency)、隔离性(Isolation)、持久性(Durability)。 我们这里主要讨论隔离性,Lucene的IndexReader和IndexWriter具有隔离性。 当IndexReader.open打开一个索引的时候,相对于给当前索引进行了一次snapshot,此后的任何

clusteryun的专栏 366

Modelsim安装教程以及管理员身份运行patch_dll.bat时找不到文件mgls.dll的解决

Modesim安装教程 Modesim版本有很多,但是安装方式大都相同,我们以modesim.10.5为例,电脑使用的是win10 64位,讲一下安装过程中的步骤以及出现问题的解决方法 一 安装 1.首先解压安装包,在解压的安装包内选择应用程序,右键选择管理员运行。 2.稍等一会,有的电脑会弹出是否允许modesim进行更改,选择 是 即可,然后出现下面的界面,点击下一步。 3.弹出此界面选择安装路径,选择安装路径,我是在D盘新建的文件夹,直接把文件夹中的路径复制在框内。文件夹名称切记不要带中文 4.

weixin_48564372的博客 1万+

STM32与小米CyberGear微电机的CAN通信协议深度解析

本文深度解析STM32与小米CyberGear微电机的CAN通信协议,涵盖硬件连接、CAN总线配置、通信协议解析及多电机协同控制。重点介绍了基于STM32的电机控制实践,包括运动模式、速度与位置模式设置,以及数据反馈与故障诊断,为机器人及自动化设备开发提供实用指南。

www00的博客 359

Lucene学习之Lucene入门暨中文文件搜索问题的解决

Lucene是一款优秀的全文检索引擎的框架,提供了完整的查询引擎和索引引擎。由于Lucene自带的例子可以正常处理英文文件,但是中文的文件却不能正常处理。网上查了很多资料,很多人都在问这个问题,但是答案却是只字片语,没有针对这个问题提出一个完整的解决办法。经过一番摸索,终于解决了这个问题。关键之处在于读入文件时需要为文件字符流指定编码字符集,并且该字符集需要与文件的编码字符集一致,才能保证根据...

iteye_19930的博客 227

BurpSuit在不同浏览器中配置代理

文章通过分享各大浏览器如何设置代理的知识,帮助初学者快速掌握代理配置相关技能。

北冥同学的成长记录笔记 1万+

Lucene 跑demo碰到的问题

想运行一下Lucene官网上的小程序,配置好Classpath可是还是不能运行。原文信息如下: Once you've gotten this far you're probably itching to go. Let's build an index! Assuming you've set your CLASSPATH correctly, just type: java org

train的专栏 2953

Python通用编程规范-09 安全编程规范

1.9 安全编程规范 1.9.1 异常行为 1.9.1.1 禁止抑制或者忽略已检查异常 【说明】: 编码人员常常会通过一个空的或者无意义的catch块来抑制捕获的已检查异常。每一个catch块都应该确保程序只会在继续有效的情况下才会继续运行下去。因此,catch块必须要么从异常情况中恢复,要么重新抛出适合当前catch块上下文的另一个异常以允许最邻近的外层try-catch语句块来进行恢复工作。异常会打断应用原本预期的控制流程。例如,try块中位于异常发生点之后的任何表达式和语句都不会被执行。因此,异常必须

zhao12501的博客 2871

mybaits-plus通用CRUD详解及代码案例

文章目录mybaitsplus通用CRUD插入操作方法定义测试用例mybaitsplus主键生成策略设置自增主键设置输入主键:UUID:ID_WORKER_STR:ID_WORKER:更新操作根据id更新方法定义:方法步骤根据条件更新方法定义:更新步骤:根据条件更新(可以更新NULL)删除操作根据id删除方法定义:删除步骤:根据 entity 条件删除方法定义:删除步骤:根据ID 批量删除方法定义:删除步骤:查询操作根据id查询方法定义:查询步骤:根据id批量查询方法定义:查询步骤:根据 entity 条件

流楚丶格念的博客 3405

用lucene对时间索引后搜索的问题。(转)

用lucene对时间索引后搜索的问题。 (转)我的数据量比较大,故后台采用一个线程专用于索引的建立。目前索引库已经在700多M了,估计全部建立完成在1.5G左右。 每一个doc里包括了一个field(sendtime,时间字符串...

338

android 蓝牙通讯demo

android 下蓝牙通讯demo,实现了发现蓝牙,使能蓝牙,通过蓝牙发送消息。

lucene索引的建立昨天的问题已解决

//昨天的错误找到了 搜索与创建的目录不应在同一个根目录下。 //全靠队长啊 import java.io.File; import java.io.FileReader; import java.io.IOException; import org.apache.lucene.analysis.standard.StandardAnalyzer; import org.apache.luce

Lves Li的专栏 1548

OV9734 DATASHEET,完整规格书

OV9734完整规格书,包括电气参数,尺寸规格,寄存器配置表等

文档:亲测可用解决vnc灰屏,黑屏,鼠标大黑叉情况

主要解决vnc-viewer灰屏,黑屏,鼠标大黑叉等现象,详细见文档。

lucene+compass中文乱码问题

大家谁碰到过,我感觉是个常见问题。有那位解决的!

GODOMONEY的专栏 918

pscad IEEE标准系统搭建说明

pscad IEEE标准系统搭建说明,包含典型的IEEE 9节点、14节点、30节点、39节点和118节点系统。内含标准测试系统的原始数据和潮流结果。

Lucene的IndexWriter在初始化的时候遇到IndexWriter is closed的问题

Lucene3.5之后,IndexWriter的初始化有了一个IndexConfig来作为其初始化的参数,当我们在使用IndexWrier的时候一定要注意在最后把writer关闭,下面是我在平时的使用中遇到的问题:1、初始化IndexWriter遇到的异常: org.apache.lucene.store.LockObtainFailedException: Lock obtain ti

jiubugeinifo的专栏 1万+

[ lucene FAQ ] Lucene常见问题汇总[更新中]

转载请注明出处: author:huangfox http://www.cnblogs.com/huangfox/archive/2010/10/14/1851190.html 请输入标     Lucene删除文档,使用IndexReader还是IndexWriter? 当磁盘索引被IndexSearcher打开时,为什么优化操作后索引容量翻倍? 检索结果怎么排序?对于不同类型(例...

weixin_34290000的博客 186

在使用lucene时碰见的问题

<br />在对startstation这个text控件进行lucene监控的时候,发现只要我想隐藏当前startstation都会报错,是什么原因呢?<br />在系统中debugger之后发现每次都是在startstion.value = "已选择起点" 时报错,这是为什么呢?<br />当时一直没弄清楚,突发灵感联想到我是在隐藏startstion之后对startstion赋值的,是不是使用了lucene之后,不能隐藏startstion后再赋值呢?于是将startstion.value = "已选择

java的涟漪 1169

lucene 搜索_使用Lucene的搜索服务器搜索Jira问题

lucene 搜索 您可能还记得我的第一篇博客文章 ,该文章描述了Lucene开发人员如何使用Lucene搜索应用程序查找我们的Jira问题来食用我们自己的狗粮。 该应用程序已成为许多现代Lucene功能的强大展示,例如侧向钻取和动态范围刻面, 基于中缀匹配的新建议 , 张贴荧光笔 ,块联接查询,因此您可以跳转到与您的匹配的特定问题注释搜索,近实时索引和搜索等。每当新用户向我询问Lucen...

最佳 Java 编程 216

使用Lucene的搜索服务器搜索Jira问题

您可能还记得我的第一篇博客文章,其中描述了Lucene开发人员如何使用Lucene搜索应用程序查找我们的Jira问题来食用我们自己的狗食。 该应用程序已成为许多Lucene现代功能的强大展示,例如侧向钻取和动态范围刻面, 基于中缀匹配的新建议 , 发布荧光笔 ,块联接查询,因此您可以跳转到与您的匹配的特定问题注释搜索,近实时索引和搜索等。每当新用户向我询问Lucene的功能时,我都会将他...

最佳 Java 编程 228

近期项目中遇到的问题Lucene.NET、MonoRail

1.Lucene.NET返回查询集合 有的时候,可能不需要或者不能使用hits.Doc(i).Get("ID")读取数据,此时,可以返回一个集合。 Hits hits = null; //……省略BooleanQuery那个代码 //orderValue排序,reverse正倒序 hits = iSearch.Search(bq, new Sort(new Sort...

linuxstuding 98

lucene问题

索引已经建立,但就是检索不到数据。hits.length()一直为0 public Hits search(String queryString) { Hits hits = null; try { File file = new File(indexPath); Directory directory = FSDirectory.getDirect...

zoven 139

有关lucene的问题

1.异常:Lock obtain timed out: NativeFSLock 原因:没有及时关闭indexWriter或者indexReader,lucene进行读写的时候会在文件夹里面创建lock ,不关闭的话,lock一直存在,下次进行读写,就会出现该问题 解决方法:3.0以及3.0版本之前的,写入document之后,关闭indexWriter ,查询用到indexSearcher...

weixin_30664051的博客 314

Lucene-Grep 项目常见问题解决方案

Lucene-Grep 项目常见问题解决方案 项目基础介绍 Lucene-Grep 是一个基于 Lucene Monitor 的类 Grep 工具,使用 GraalVM 的 native-image 技术进行编译。它支持 Lucene 查询语法,并提供了多种查询解析器和文本分析配置。该项目的主要编程语言是 Clojure,同时也涉及到 Java 和 GraalVM 的相关技术。 新手使用注意事项及...

gitblog_00585的博客 579

Lucene.net之解决锁的问题

1 public sealed class SearchIndexManager 2 { 3 private static readonly SearchIndexManager searchManager=new SearchIndexManager(); 4 private SearchIndexManager() 5 ...

weixin_30446197的博客 183
上一篇: 美女美女你莫慌
下一篇: 清明
fancyerII
博客等级 码龄23年 48粉丝 164原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值