【问题标题】:lucene indexing large database with multible tableslucene索引具有多个表的大型数据库
【发布时间】:2014-04-21 18:36:37
【问题描述】:

我有 2 个表,其中 1 个表包含网站文本(不是 html)内容的大量数据(15gb)。我想索引这 10 个表(有关系)。 eg: select a.id ,a.title,a.ipaddress, b.content from table1 a, table2 b where a.id=b.id;

这里的问题是从 oracle 数据库检索数据以进行索引需要 70-80 小时。我尝试了服务器端分页,例如 rownum >1 和

哪个最好?单独索引还是单独索引? 注意:我在数据库中的数据不会更新。我只需要最好的方法。

【问题讨论】:

    标签: lucene lucene.net


    【解决方案1】:

    是否可以使用两个索引的组合来检索数据。

    是的,可以从两个索引中检索数据。

    为每个索引打开一个 IndexReaders。称他们为 reader1 和 reader2。然后您可以使用MultiReader 来读取索引并附加内容。

    MultiReader multiReader = new MultiReader(reader1, reader2); IndexSearcher searcher = new IndexSearcher(multiReader);

    参考:How to perform search over independent index sets and merge results?

    哪个最好?单独索引还是单独索引?注意:我在数据库中的数据不会更新。我只需要最好的方法。

    由于数据库中的数据不会改变,我建议您使用单个索引。

    顺便说一句,您可能想看看How to make indexing faster

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-07-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-09-20
      • 2011-07-13
      相关资源
      最近更新 更多