Lucene fulltext search with like feature hax :) v 1.4.200+ :)

55 views
Skip to first unread message

mps

unread,
Aug 16, 2021, 4:25:19 PM8/16/21
to H2 Database
Hi!

I put this together for a partial Lucene search. If you don’t find a flaw in it, use it and say it. :)

If it’s not good or there’s a better solution, I still look forward to your feedback!

thx, mps

SELECT SUBSTRING(FTR.KEY,6) AS KEY,FTI."SCHEMA", FTI."TABLE",FTS."NAME" AS SEARCH_RESULT
FROM FT.WORDS FTS
JOIN FT.MAP FTM ON FTM.WORDID = FTS.ID
JOIN FT."ROWS" FTR ON FTR.ID = FTM.ROWID
JOIN FT.INDEXES FTI ON FTI.ID = FTR.INDEXID
WHERE FTS.NAME LIKE '%FOOBAR%'
ORDER BY FTI."TABLE"
Reply all
Reply to author
Forward
0 new messages