OrientDB:FullText 索引与 Lucene FullText 索引

OrientDB: FullText indexes vs Lucene FullText indexes

OrientDB有两种全文索引:一种是their own implementation and the second one is Lucene implementation。但是,绝对不清楚我应该使用什么。

我了解到 Lucene 提供了更多功能。但是,如果不需要这些功能怎么办。我应该使用标准的全文索引还是使用 Lucene?那么显然性能是主要问题。

使用 LUCENE 引擎的索引 "FULL TEXT" 提供良好的全文索引,但不能用于索引其他类型。它是持久的、事务性的并且支持范围查询。 有关 lucene 的更多信息,请参阅 link

引擎SB-TREE的索引"FULL TEXT" 该索引是使用基于 B-Tree 索引算法的算法创建的。它已经进行了多项优化,这些优化与数据插入和范围查询有关。与所有其他基于树的索引一样,SB-Tree 索引算法经历 log(N) 复杂度,但该对数的底数约为 500。该索引算法提供了良好的功能组合,类似于可从其他索引类型。它适合一般用途,持久耐用,事务性强,支持范围查询。

一个比较速度的简单例子:

  • DB one: 100000 top of Class Person with 属性 name with value "the name is 1...n " and Lucene index on this 属性

  • DB 一个:Class 人名 属性 的 100000 人,其名字的值为 "the name is 1...n " 和此 属性[=13= 上的 sbtree 索引]

在一个数据库上:select from Person where name LUCENE "49000" return 一条记录 --> 查询在 0.039 秒内执行。

Db on two: select from Persona where name = "49000" return 一条记录 --> 查询在 1.364 秒内执行