使用compass-lucene作为缓存技术
除了搜索之外,还有什么我可以使用“指南针”的场景示例吗? 假设我们有一个页面列出了浏览次数最多的 10 篇文章。如何使用指南针来显示这种结果。有这方面的演示/示例项目可供参考吗? Jira 无疑是一个很好的例子,但它的源代码不可用。我想知道如何最大限度地发挥在应用程序中使用 compass-lucene 的优势。
我可以知道在哪里可以下载 spring-compass jpa @annotated 示例吗?我下载的夜间构建是基于 xml 的。
Any example of scenarios other than doing search for which I could use "compass"?
Lets say we have a page that list top 10 most view article. How to use compass to show this kind of results. Any demo/sample project on this to refer to? definitely Jira would be a good example but its source code is not available. I want to know how to maximize the benefits of using compass-lucene in an application.May i know where can i download spring-compass jpa @annotated example? The nightly built i downloaded is xml-based.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
嗯,据我所知,这就是它的设计目的。
我不确定这是一个好的用例,在我看来,当您想要在整个应用程序业务域模型中搜索结果时,Compass 很有用,即不仅可以说文章(在这种情况下,您可以只查询数据库) 。
现在,让我们假设您的域对象是 可搜索类并具有可搜索属性
numberOfViews
,我想可以搜索这个属性(参考整个搜索部分)。指南针发行版包括示例:库 突出显示 Compass::Core 的主要功能和 Petclinic 示例,展示如何将指南针添加到现有应用程序(Spring petclinic 示例)。
阅读作者的博客,Compass wiki 和参考 文档:)
如前所述,compass 发行版中包含的 spring-compass 示例基于 Spring 的 petclinic,它不使用注释(请参阅 SPR-2960)。为了以防万一,petclinic 带注释的实体已附加到 SPR-2960,因此请随意使用他们。
Well, AFAIK, this is what is has been designed for.
I'm not sure this is a good use-case, Compass is in my opinion useful when you want to search results across the whole application business domain model i.e. not only lets say articles (in that case, you can just query the database).
Now, let's imagine that your domains objects are searchable classes and have a searchable property
numberOfViews
, I guess it would be possible to search on this property (refer to the whole Searching section).The compass distribution includes samples: a Library basic example that highlights the main features of Compass::Core and a Petclinic sample that shows how to add compass to an existing application (the Spring petclinic sample).
Read the author's blog, Compass wiki and the reference documentation :)
As mentioned, the spring-compass sample included in compass distribution is based on Spring's petclinic which doesn't use annotations (see SPR-2960). Just in case, petclinic annotated entities are attached to SPR-2960 so feel free to use them.