Apache Lucene Solr4.0,帮助解决多匹配任务的 solrconfig.xml 或查询字符串

发布于 2024-11-18 14:43:10 字数 1327 浏览 1 评论 0原文

我正在学习 Apache Lucene Solr4.0 语法和功能,并且希望在单个页面上发出最少数量的请求。

据我了解,这可以通过创建查询字符串(组、方面等的组合)或通过在 solrconfig.xml 中创建 requestHandler 来实现,两种方式都适合我

此页面特别显示至少 4不同的产品数据集和类别列表:

产品是最想要的产品列表

  • - 已被许多用户标记为想要的 6 个产品的列表
  • 最常提供 - 已被标记为用户
  • 最常 提供该产品的 6 个产品的列表本周通缉——本周需求量最高的 1 种产品
  • 随机产品 - 网站上提供的 5 种随机选择的产品
  • 所有产品类别的列表以及每个类别中各自的产品数量

也很高兴拥有: 对于本周最想要的产品 - 人们为换取该产品而提供的 5 种产品的列表

示例数据:

[TABLE PRODUCTS]
| ProductID | CategoryID | Title |
|     1     |     1      | Hat   |
|     2     |     2      | Soap  | 
|     3     |     1      | Tail  |
[WANT LIST]
| ID   | ProductID | UserID | DateAdded  |
|  1   |     1     |    1   | 2011-01-01 |
|  2   |     1     |    2   | 2011-06-01 |
|  3   |     1     |    4   | 2011-06-03 |
|  4   |     2     |    5   | 2011-01-01 |
|  5   |     2     |    6   | 2011-01-01 |
[HAVE LIST]
| ID   | ProductID | UserID | DateAdded  |
|  1   |     1     |    1   | 2011-01-01 |
|  2   |     1     |    2   | 2011-06-01 |
|  3   |     1     |    4   | 2011-06-03 |
|  4   |     2     |    5   | 2011-01-01 |
|  5   |     2     |    6   | 2011-01-01 |
[CATEGORIES]
| CategoryID | Title  |
|      1     | Things |
|      2     |  Bath  |
|      3     | Chairs |

I'm learning Apache Lucene Solr4.0 syntax and functionality and would like to make a minimum number of requests on a single page.

It is my understanding that this can be achieved by either creating a Query String (thour a combination of group, facet, etc.) or by creating a requestHandler in solrconfig.xml, either way works for me

This page particularly displays at the minimum 4 different sets of product data and a list of categories:

Products is a list of products

  • Most Wanted - list of 6 products that have been marked as wanted by many users
  • Most Offered - list of 6 products that have been marked as users offer this products
  • Most Wanted this week - 1 product that was in the highest demand this week
  • Random products - 5 randomly selected products that are available on the site
  • List of all product categories with the respective product count in each category

Would also be nice to have:
For Most wanted this week - a list of 5 products that people are offering in return for this product

Sample data:

[TABLE PRODUCTS]
| ProductID | CategoryID | Title |
|     1     |     1      | Hat   |
|     2     |     2      | Soap  | 
|     3     |     1      | Tail  |
[WANT LIST]
| ID   | ProductID | UserID | DateAdded  |
|  1   |     1     |    1   | 2011-01-01 |
|  2   |     1     |    2   | 2011-06-01 |
|  3   |     1     |    4   | 2011-06-03 |
|  4   |     2     |    5   | 2011-01-01 |
|  5   |     2     |    6   | 2011-01-01 |
[HAVE LIST]
| ID   | ProductID | UserID | DateAdded  |
|  1   |     1     |    1   | 2011-01-01 |
|  2   |     1     |    2   | 2011-06-01 |
|  3   |     1     |    4   | 2011-06-03 |
|  4   |     2     |    5   | 2011-01-01 |
|  5   |     2     |    6   | 2011-01-01 |
[CATEGORIES]
| CategoryID | Title  |
|      1     | Things |
|      2     |  Bath  |
|      3     | Chairs |

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文