你能使用 Lucene 作为 OODB 吗?

发布于 2024-07-24 04:48:21 字数 398 浏览 5 评论 0原文

鉴于 Lucene 是一个强大的基于文档的搜索引擎,它可以用作简单应用程序(EG、CMS 样式应用程序)的对象数据库吗?如果可以,您认为有哪些好处和限制?

我了解 RDBMS 的作用(并每天使用它们),但希望探索其他技术/想法。

例如,假设我的域实体如下:

[Serializable]
public class Employee
{
    public string FirstName {get;set;}
    public string Surname {get;set;}
}

我可以使用反射并将 Employee 对象的属性值存储为 Lucene 文档中的字段,并将 Employee 对象的二进制序列化版本存储到同一 Lucene 文档中的另一个字段中吗?

Given that Lucene is a robust document based search engine could it be used as an Object Database for simple applications (E.G., CMS style applications) and if so what do you see the benefits and limitations?

I understand the role of the RDBMS (and use them on a daily basis) but watned to explore other technologies/ideas.

For example say my domain entities are like:

[Serializable]
public class Employee
{
    public string FirstName {get;set;}
    public string Surname {get;set;}
}

Could I use reflection and store the property values of the Employee object as fields in a Lucene document, plus store a binary serialized version of the Employee object into another field in the same Lucene document?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

暖伴 2024-07-31 04:48:21

不。尝试使用 Lucene 作为有效的 OODB(面向对象数据库)就像尝试将方钉装入圆孔中一样。 他们确实是两种完全不同的野兽。

Lucene 擅长构建一组文档的文本索引...而不是存储对象(在编程意义上)。 也许您误解了什么是面向对象数据库。 您可以查看维基百科上的定义:

对象数据库

面向对象的数据库有其一席之地。 如果您确实有一个可以从 OODB 中受益的应用程序,我建议您查看类似 InterSystems Caché 的内容

No. Trying to use Lucene as an effective OODB (Object Oriented Database) is going to be like trying to fit a square peg into a round hole. They're really two completely different beasts.

Lucene is good at building a text index of a set of documents...not storing objects (in a programming sense). Maybe you mis-understand what an Object Oriented Database is. You can check out the definition at Wikipedia:

Object Databases

Object Oriented Databases have their place. If you truly have an application that would benefit from an OODB, I would suggest checking out something like InterSystems Caché

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文