Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在寻找使用 Spring MVC 和 Hibernate Search 实现 Faceted Search 的建议和工作示例。
你到底在找什么?Hibernate Search 文档包含 faceting API 的示例,并且在 Hibernate Search 源代码中还有一些测试,展示了如何使用 API。如果在搜索过程中启用了分面,您可以通过以下方式获取分面列表:
List<Facet> facets = facetManager.getFacets( "myFacet" );
将此列表粘贴到渲染阶段可用的范围内,您应该能够迭代各个方面并根据自己的喜好构建页面。