首页 \ 问答 \ Solr MultiCore搜索(Solr MultiCore Search)

Solr MultiCore搜索(Solr MultiCore Search)

我正在使用Apache Solr进行搜索。 我用它来提供个人用户搜索。 即每个用户都有一个单独的物理Lucene索引。 所以对于10位用户,我在磁盘上有10个独立的物理索引。

为了支持这些索引的搜索,我打算使用Solr MultiCore Feature 。 随着我一直在阅读的各种文章,它看起来像这样工作。

我真的不知道的是,当一个solr搜索者得到一个查询,而不是将查询发送给所有多核时,我该如何将查询集中到具有该特定用户索引连接的核心? 这是配置更改还是需要执行代码级别更改?

即我想发送查询只有一个solr核心(基于用户标识)。 这甚至有可能吗?

更新:根据其中一个解决方案,我可以在solrconfig.xml中添加多核,即在开始solr时,我需要提及核心(或者在我的情况下是用户)。 所以现在,如果我想添加一个新用户的索引,我可能需要停止solr,编辑其配置,添加该用户核心并再次启动solr。 有没有办法动态地将核心添加到正在运行的solr实例?


I am using Apache Solr for search. I use this to provide personal user-based search. i.e. each user has a separate physical Lucene Index. So for 10 users, I have 10 separate physical indexes on disk.

To support searches on these indexes, I am planning to use Solr MultiCore Feature. With the various articles I have been reading regarding this, it looks like this would work.

Where I am actually not sure is, when a solr searcher gets a query, instead of sending the query to all the multiple-cores, how do I funnel the query to that core which has that particular user's index connected to? Is this a config change or do I need to do code level changes?

i.e. I want to send the query to only one solr-core (based on userid). Is this even possible?

UPDATE: So according to one of the solutons I can add multi-cores in the solrconfig.xml i.e. at the time of starting solr I'll need to mention the cores (or in my case the users). So now, if I want to add a new user's index, I'll probably need to stop solr, edit its config, add that users core & start solr again. Is there any way to dynamically add cores to a running solr instance?


原文:https://stackoverflow.com/questions/5221132
更新时间:2023-02-19 07:02

最满意答案

尝试使用区分大小写整理来帮助您将密码与小写版本进行比较,如下所示:

(len([PASSWORD])>(5) AND [PASSWORD] like '%[0-9]%' 
AND [PASSWORD] <> Lower([PASSWORD]) COLLATE Latin1_General_CS_AI)

或者我自己的例子是这样的:

Declare @Password varchar(20) = 'Hello'
if @Password <> Lower(@Password) COLLATE Latin1_General_CS_AI
    PRINT 'Upper'
else
    PRINT 'lower'

Try using a Case Sensitive Collation to help you out and compare password with a lower case version of it like below using your code:

(len([PASSWORD])>(5) AND [PASSWORD] like '%[0-9]%' 
AND [PASSWORD] <> Lower([PASSWORD]) COLLATE Latin1_General_CS_AI)

Or my own example would be like this:

Declare @Password varchar(20) = 'Hello'
if @Password <> Lower(@Password) COLLATE Latin1_General_CS_AI
    PRINT 'Upper'
else
    PRINT 'lower'

相关问答

更多
  • 尝试这个: SELECT * FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS WHERE CONSTRAINT_NAME ='FK_ChannelPlayerSkins_Channels' - 编辑 - 当我原来回答这个问题的时候,我在想“外键”,因为原来的问题是关于发现“FK_ChannelPlayerSkins_Channels”的问题。 从那时起,很多人都评论过发现其他“约束”这里有一些其他的疑问: --Returns on ...
  • 有可能,但添加没有名称的约束是一个非常糟糕的习惯 : CREATE TABLE tbl(SomeColumn VARCHAR(10) DEFAULT('test')) 将创建一个随机名称的CONSTRAINT 。 更好地利用它 CREATE TABLE tbl(SomeColumn VARCHAR(10) CONSTRAINT DF_YourTable_SomeColumm DEFAULT('test')) 这将做同样的事情,但会像你想要的那样命名约束。 如果在已部署的环境中运行升级脚本,这一点非常重要 ...
  • 我会拆分你的任务。 首先,分配唯一约束(这可以是表键): CREATE UNIQUE INDEX IX_UQ ON Mine(ProductId, CountryId, ApplicationId) 这是为了进行简单的验证并改进触发器查询。 其次,您的检查需要涉及许多记录(不能使用CHECK约束)。 这是触发器的任务: CREATE TRIGGER trMine ON Mine FOR INSERT,UPDATE IF (EXISTS( SELECT Mark FROM ( ...
  • 为什么不只是外键到另一个表并允许空值? 更好的方法是在另一个表中输入一个卡类型代码,然后存储一个密钥。 Why not just foreign key to another table and allow nulls? Even better would be to ahve a card type code in another table, and store a key to that.
  • 您的代码在rextester中有效 。 鉴于你在做什么,我建议宣布版本有5个字符: neEdition varchar(5) 要么: neEdition char(5) 这与检查约束更加一致。 You code works in rextester. Given what you are doing, I would recommend that the edition be declared to have 5 characters: neEdition varchar(5) or: neEditi ...
  • 尝试使用区分大小写整理来帮助您将密码与小写版本进行比较,如下所示: (len([PASSWORD])>(5) AND [PASSWORD] like '%[0-9]%' AND [PASSWORD] <> Lower([PASSWORD]) COLLATE Latin1_General_CS_AI) 或者我自己的例子是这样的: Declare @Password varchar(20) = 'Hello' if @Password <> Lower(@Password) COLLATE Latin1_G ...
  • 此条件在检查约束中无效,因为它是非确定性的。 如果时钟突然转回,那么有效的行现在可能无效。 约束将追溯无效。 您应该将此检查移至应用程序。 This condition is invalid in a check constraint because it is non-deterministic. If the clock is turned back suddenly rows that were valid could now become invalid. The constraint would ...
  • 您不能使用IF/ELSE ,但可以使用内联条件: CASE WHEN You cannot use IF/ELSE, but you can use inline conditionals: CASE WHEN
  • SQL Server中没有==运算符。 检查null时你必须使用“是” 请试试这个: ((Length is null AND starttime is not null AND endtime is not null) OR (Length is not null AND starttime is null AND endtime is null)) HTH There is no == operator in SQL Server. While checking for null you have t ...
  • 试试这个: ALTER TABLE ADD CONSTRAINT CHECK_YOURTABLE_COL CHECK(Col IN('IEU' , 'None IEU') OR Col LIKE '___/____') Col是具有CHECK约束的列 Try this one: ALTER TABLE ADD CONSTRAINT CHECK_YOURTABLE_COL CHECK(Col IN('IEU' , 'None IEU') ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。