OSDN Git Service

LuceneのCJKAnalyzerを利用したbi-gramによる全文検索に対応した
authoryuki <kimaira7@gmail.com>
Mon, 2 Sep 2013 07:23:45 +0000 (16:23 +0900)
committeryuki <kimaira7@gmail.com>
Mon, 2 Sep 2013 07:23:45 +0000 (16:23 +0900)
.classpath
lib/h2-1.3.158.jar [deleted file]
lib/h2-1.3.163.jar [new file with mode: 0644]
lib/h2-lucene-ex-1.3.163.jar [new file with mode: 0644]
lib/lucene-analyzers-3.6.2.jar [new file with mode: 0644]
src/cx/fbn/nevernote/sql/DatabaseConnection.java

index 7b170d0..3c80fb4 100644 (file)
@@ -3,7 +3,6 @@
        <classpathentry kind="src" path="src"/>
        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
        <classpathentry kind="lib" path="lib/evernote-api-1.20.jar"/>
        <classpathentry kind="src" path="src"/>
        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
        <classpathentry kind="lib" path="lib/evernote-api-1.20.jar"/>
-       <classpathentry kind="lib" path="lib/h2-1.3.158.jar"/>
        <classpathentry kind="lib" path="lib/libthrift.jar"/>
        <classpathentry kind="lib" path="lib/log4j-1.2.14.jar"/>
        <classpathentry kind="lib" path="lib/commons-lang3-3.0.jar"/>
        <classpathentry kind="lib" path="lib/libthrift.jar"/>
        <classpathentry kind="lib" path="lib/log4j-1.2.14.jar"/>
        <classpathentry kind="lib" path="lib/commons-lang3-3.0.jar"/>
        <classpathentry kind="lib" path="lib/httpcore-4.1.jar"/>
        <classpathentry kind="lib" path="lib/httpmime-4.1.1.jar"/>
        <classpathentry kind="lib" path="lib/pdfbox-app-1.6.0.jar"/>
        <classpathentry kind="lib" path="lib/httpcore-4.1.jar"/>
        <classpathentry kind="lib" path="lib/httpmime-4.1.1.jar"/>
        <classpathentry kind="lib" path="lib/pdfbox-app-1.6.0.jar"/>
-       <classpathentry kind="lib" path="C:/pleiades/workspace/NeighborNote/lib/lucene-core-3.6.2.jar"/>
-       <classpathentry kind="lib" path="C:/pleiades/scribe-1.3.0.jar"/>
-       <classpathentry kind="lib" path="C:/pleiades/qtjambi-win32-lgpl-4.5.2_01/qtjambi-4.5.2_01.jar"/>
-       <classpathentry kind="lib" path="C:/pleiades/qtjambi-win32-lgpl-4.5.2_01/qtjambi-win32-msvc2005-4.5.2_01.jar"/>
+       <classpathentry kind="lib" path="lib/scribe-1.3.0.jar"/>
+       <classpathentry kind="lib" path="C:/Users/Yuki/Desktop/pleiades/qtjambi-win64-4.5.2_01.jar"/>
+       <classpathentry kind="lib" path="C:/Users/Yuki/Desktop/pleiades/qtjambi-win64-msvc2005x64-4.5.2_01.jar"/>
+       <classpathentry kind="lib" path="lib/lucene-core-3.6.2.jar"/>
+       <classpathentry kind="lib" path="lib/h2-1.3.163.jar"/>
+       <classpathentry kind="lib" path="lib/h2-lucene-ex-1.3.163.jar"/>
+       <classpathentry kind="lib" path="lib/lucene-analyzers-3.6.2.jar"/>
        <classpathentry kind="output" path="bin"/>
 </classpath>
        <classpathentry kind="output" path="bin"/>
 </classpath>
diff --git a/lib/h2-1.3.158.jar b/lib/h2-1.3.158.jar
deleted file mode 100644 (file)
index b62b456..0000000
Binary files a/lib/h2-1.3.158.jar and /dev/null differ
diff --git a/lib/h2-1.3.163.jar b/lib/h2-1.3.163.jar
new file mode 100644 (file)
index 0000000..ea557bd
Binary files /dev/null and b/lib/h2-1.3.163.jar differ
diff --git a/lib/h2-lucene-ex-1.3.163.jar b/lib/h2-lucene-ex-1.3.163.jar
new file mode 100644 (file)
index 0000000..363327a
Binary files /dev/null and b/lib/h2-lucene-ex-1.3.163.jar differ
diff --git a/lib/lucene-analyzers-3.6.2.jar b/lib/lucene-analyzers-3.6.2.jar
new file mode 100644 (file)
index 0000000..752c714
Binary files /dev/null and b/lib/lucene-analyzers-3.6.2.jar differ
index 5714bdf..965896a 100644 (file)
@@ -309,7 +309,7 @@ public class DatabaseConnection {
                        }
                        
                        // Apache Luceneを使った全文検索のための準備
                        }
                        
                        // Apache Luceneを使った全文検索のための準備
-                       query.exec("CREATE ALIAS IF NOT EXISTS FTL_INIT FOR \"org.h2.fulltext.FullTextLucene.init\"");
+                       query.exec("CREATE ALIAS IF NOT EXISTS FTL_INIT FOR \"org.h2.fulltext.FullTextLuceneEx.init\"");
                        query.exec("CALL FTL_INIT()");
                        
                        Global.rebuildFullTextNoteTarget(this);
                        query.exec("CALL FTL_INIT()");
                        
                        Global.rebuildFullTextNoteTarget(this);
@@ -323,7 +323,7 @@ public class DatabaseConnection {
                        rQuery.exec("update noteResources set resourceText = ''");
                        
                        // Apache Luceneを使った全文検索のための準備
                        rQuery.exec("update noteResources set resourceText = ''");
                        
                        // Apache Luceneを使った全文検索のための準備
-                       rQuery.exec("CREATE ALIAS IF NOT EXISTS FTL_INIT FOR \"org.h2.fulltext.FullTextLucene.init\"");
+                       rQuery.exec("CREATE ALIAS IF NOT EXISTS FTL_INIT FOR \"org.h2.fulltext.FullTextLuceneEx.init\"");
                        rQuery.exec("CALL FTL_INIT()");
                        
                        Global.rebuildFullTextResourceTarget(this);
                        rQuery.exec("CALL FTL_INIT()");
                        
                        Global.rebuildFullTextResourceTarget(this);