lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Damian <robert.dam...@edevize.ro>
Subject Issue with lucene-core 3.4.0 and h2 database
Date Wed, 19 Jun 2019 15:40:00 GMT
 Hello,

For a long time I've been using lucene as a search engine for my embedded
h2 databases. I am using lucene-core 3.4.0, which I know is pretty old and
h2 database 1.3.160.

One issue that I discovered recently is that lucene indexing doesn't seem
to work properly. For example
SELECT COUNT(*) FROM BURSUCUL.NORMA WHERE NORMADESCRIERE LIKE '%beton%'
returns about 2000, but
SELECT COUNT(*) FROM FTL_SEARCH_DATA("+beton", 0, 0)
returns about 70 results, although the column "NORMADESCRIERE" in
"BURSUCUL.NORMA" is indexed.

considering that, I tried to drop the indexes and recreate them but when I
do:
CALL FTL_CREATE_INDEX("BURSUCUL", "NORMA", "NORMACOD, NORMADESCRIERE")
i get:
Error: org.h2.jdbc.JdbcSQLException: Error creating or initializing trigger
"FTL_NORMA" object, class "org.h2.fulltext.
FullTextLucene$FullTextTrigger", cause: "java.sql.SQLException: Column not
found: NORMACOD"; see root cause for details; SQL statement:
CREATE
 TRIGGER IF NOT EXISTS "BURSUCUL"."FTL_NORMA" AFTER INSERT, UPDATE,
DELETE, ROLLBACK ON "BURSUCUL"."NORMA" FOR EACH ROW CALL
"org.h2.fulltext.FullTextLucene$FullTextTrigger" [90043-160]

My first thought was that it must be a typo, but I checked a few times and
I know I wrote it well. Here is the structure of my table:

sql> SHOW COLUMNS FROM BURSUCUL.NORMA;
FIELD            | TYPE          | NULL | KEY | DEFAULT
normaid          | integer(10)   | NO   | PRI | (NEXT VALUE FOR BURSUCUL.
SYSTEM_SEQUENCE_A35B0D2E_EB1B_4869_B3C8_80767DBE85DE)
normalinkarticol | integer(10)   | NO   |     | NULL
normacod         | varchar(256)  | NO   |     | NULL
normaum          | varchar(256)  | NO   |     | NULL
normadescriere   | varchar(2048) | NO   |     | NULL



Updating to a newer version of h2 database and lucene would be an issue
since the application is already installed on a number of systems and that
would mean finding a way to update deployed databases on the fly.

Please let me know if you have any suggestions regarding these issues.
Thank you!

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message