关于SOLR文件的问题等等 [英] Questions about SOLR documents and some more

查看:24
本文介绍了关于SOLR文件的问题等等的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

网站:分类广告网站(用户可以放置广告、搜索广告等)

Website: Classifieds website (users may put ads, search ads etc)

我打算使用SOLR进行搜索,然后只返回ID为nr:s的结果,然后使用这些ID nr:s查询mysql,最后以这些ID:s显示结果.

I plan to use SOLR for searching and then return results as ID nr:s only, and then use those ID nr:s and query mysql, and then lastly display the results with those ID:s.

目前我在 MySQL 中有大约 30 个表,每个类别一个.

Currently I have around 30 tables in MySQL, one for each category.

1- 你认为我的做法应该与上面不同吗?

1- Do you think I should do it differently than above?

2- 我应该只使用一个 SOLR 文档还是多个文档?另外,文档是否与 SOLR 索引相同?

2- Should I use only one SOLR document, or multiple documents? Also, is document the same as a SOLR index?

3- 知道每个表中有很多列,只使用 SOLR 并跳过 MySQL 会更好吗?我个人更擅长使用 MySQL,而不是 SOLR.

3- Would it be better to Only use SOLR and skip MySQL knowing that I have alot of columns in each table? Personally I am much better at using MySQL than SOLR.

4- 假设用户想在特定地区搜索汽车,这种类型的查询是如何在 SOLR 中执行/完成的?例如:q=cars&region=washington 可能吗?

4- Say the user wants to search for cars in a specific region, how is this type of querying performed/done in SOLR? Ex: q=cars&region=washington possible?

您可能认为有很多关于 SOLR 的信息,但没有,尤其是关于将 PHP 与 SOLR 和 SOLR php 客户端一起使用的信息......也许我会在了解了所有这些后写点东西... 或者你们中的一个人可以写点什么!

You may think there is alot of info about SOLR out there, but there isn't, and especially not about using PHP with SOLR and a SOLR php client... Maybe I will write something when I have learned all this... Or maybe one of you could write something up!

再次感谢所有帮助...

Thanks again for all help...

推荐答案

首先,定义:一个 Solr/Lucene 文档大致相当于一个数据库行.索引与数据库表大致相同.

First, the definitions: a Solr/Lucene document is roughly the equivalent of a database row. An index is roughly the same as a database table.

我建议尝试将所有与机密相关的信息存储在 Solr 中.查询 Solr 然后查询数据库效率低下,很可能没有必要.

I recommend trying to store all the classified-related information in Solr. Querying Solr and then the database is inefficient and very likely unnecessary.

假设您在 Solr 中有一个 region 字段,则在特定区域中的查询类似于 q=cars+region:washington.

Querying in a specific region would be something like q=cars+region:washington assuming you have a region field in Solr.

Solr wiki 有大量的好信息和一个 非常好的基础教程.当然,这总是可以改进的,因此如果您发现任何不清楚的地方,请告知 Solr 团队.

The Solr wiki has tons of good information and a pretty good basic tutorial. Of course this can always be improved, so if you find anything that isn't clear please let the Solr team know about it.

我无法对 PHP 客户端发表评论,因为我不使用 PHP.

I can't comment on the PHP client since I don't use PHP.

这篇关于关于SOLR文件的问题等等的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆