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

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

问题描述

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

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

我计划使用SOLR搜索,然后返回结果作为ID nr:然后使用那些ID nr:s和查询mysql,然后最后显示具有这些ID的结果。

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?

只使用一个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.

在特定区域中查询将类似 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.

我不能评论PHP客户端,因为我不使用PHP。

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

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

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