Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
21ec14d4
提交
21ec14d4
authored
6月 05, 2008
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
the lucene index was always recreated and never closed
上级
c92f4f7b
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
1003 行增加
和
932 行删除
+1003
-932
changelog.html
h2/src/docsrc/html/changelog.html
+2
-1
_docs_en.utf8.txt
h2/src/docsrc/text/_docs_en.utf8.txt
+332
-308
_docs_ja.utf8.txt
h2/src/docsrc/text/_docs_ja.utf8.txt
+332
-308
_docs_en.properties
h2/src/docsrc/textbase/_docs_en.properties
+310
-302
_messages_en.properties
h2/src/docsrc/textbase/_messages_en.properties
+1
-1
FullTextLucene.java
h2/src/main/org/h2/fulltext/FullTextLucene.java
+26
-12
没有找到文件。
h2/src/docsrc/html/changelog.html
浏览文件 @
21ec14d4
...
...
@@ -17,7 +17,8 @@ Change Log
<h2>
Next Version (unreleased)
</h2>
<ul>
<li>
Support for overloaded Java methods. A user defined function can now be bound to
<li>
The Lucene fulltext index was always re-created when opening a database with fulltext index enabled.
</li><li>
Support for overloaded Java methods. A user defined function can now be bound to
multiple Java methods, if the Java methods have the same name but a different number
of parameters. Thanks to Gary Tong for providing a patch!
</li></ul>
...
...
h2/src/docsrc/text/_docs_en.utf8.txt
浏览文件 @
21ec14d4
差异被折叠。
点击展开。
h2/src/docsrc/text/_docs_ja.utf8.txt
浏览文件 @
21ec14d4
差异被折叠。
点击展开。
h2/src/docsrc/textbase/_docs_en.properties
浏览文件 @
21ec14d4
This source diff could not be displayed because it is too large. You can
view the blob
instead.
h2/src/docsrc/textbase/_messages_en.properties
浏览文件 @
21ec14d4
...
...
@@ -93,7 +93,7 @@
90070
=
Role {0} not found
90071
=
User or role {0} not found
90072
=
Roles and rights cannot be mixed
90073
=
Right not found
90073
=
Matching Java methods must have different parameter counts
\:
{0} and {1}
90074
=
Role {0} already granted
90075
=
Column is part of the index {0}
90076
=
Function alias {0} already exists
...
...
h2/src/main/org/h2/fulltext/FullTextLucene.java
浏览文件 @
21ec14d4
...
...
@@ -68,6 +68,7 @@ implements Trigger, CloseListener
private
int
[]
indexColumns
;
private
String
[]
columnNames
;
private
int
[]
dataTypes
;
private
String
indexPath
;
private
IndexModifier
indexer
;
//## Java 1.4 end ##
...
...
@@ -160,6 +161,13 @@ implements Trigger, CloseListener
stat
.
execute
(
"CREATE ALIAS IF NOT EXISTS FTL_SEARCH_DATA FOR \""
+
FullTextLucene
.
class
.
getName
()
+
".searchData\""
);
stat
.
execute
(
"CREATE ALIAS IF NOT EXISTS FTL_REINDEX FOR \""
+
FullTextLucene
.
class
.
getName
()
+
".reindex\""
);
stat
.
execute
(
"CREATE ALIAS IF NOT EXISTS FTL_DROP_ALL FOR \""
+
FullTextLucene
.
class
.
getName
()
+
".dropAll\""
);
String
path
=
getIndexPath
(
conn
);
IndexModifier
indexer
=
openIndexModifier
(
path
,
true
);
try
{
indexer
.
close
();
}
catch
(
Exception
e
)
{
throw
convertException
(
e
);
}
}
//## Java 1.4 end ##
...
...
@@ -171,6 +179,7 @@ implements Trigger, CloseListener
init
(
conn
);
this
.
schemaName
=
schemaName
;
this
.
tableName
=
tableName
;
this
.
indexPath
=
getIndexPath
(
conn
);
this
.
indexer
=
getIndexModifier
(
conn
);
ArrayList
keyList
=
new
ArrayList
();
DatabaseMetaData
meta
=
conn
.
getMetaData
();
...
...
@@ -569,19 +578,23 @@ implements Trigger, CloseListener
}
private
static
IndexModifier
getIndexModifier
(
Connection
conn
)
throws
SQLException
{
try
{
String
path
=
getIndexPath
(
conn
);
IndexModifier
indexer
;
synchronized
(
indexers
)
{
indexer
=
(
IndexModifier
)
indexers
.
get
(
path
);
if
(
indexer
==
null
)
{
Analyzer
analyzer
=
new
StandardAnalyzer
();
boolean
create
=
!
IndexReader
.
indexExists
(
path
);
indexer
=
new
IndexModifier
(
path
,
analyzer
,
create
);
indexers
.
put
(
path
,
indexer
);
}
String
path
=
getIndexPath
(
conn
);
IndexModifier
indexer
;
synchronized
(
indexers
)
{
indexer
=
(
IndexModifier
)
indexers
.
get
(
path
);
if
(
indexer
==
null
)
{
boolean
recreate
=
!
IndexReader
.
indexExists
(
path
);
indexer
=
openIndexModifier
(
path
,
recreate
);
indexers
.
put
(
path
,
indexer
);
}
return
indexer
;
}
return
indexer
;
}
private
static
IndexModifier
openIndexModifier
(
String
path
,
boolean
recreate
)
throws
SQLException
{
try
{
Analyzer
analyzer
=
new
StandardAnalyzer
();
return
new
IndexModifier
(
path
,
analyzer
,
recreate
);
}
catch
(
IOException
e
)
{
throw
convertException
(
e
);
}
...
...
@@ -621,6 +634,7 @@ implements Trigger, CloseListener
if
(
indexer
!=
null
)
{
indexer
.
flush
();
indexer
.
close
();
indexers
.
remove
(
indexPath
);
indexer
=
null
;
}
}
catch
(
Exception
e
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论