首页 \ 问答 \ 自定义Solr完全导入(Custom Solr Full Import)

自定义Solr完全导入(Custom Solr Full Import)

我有一个solr核心core1,它有几个Facet类型,我想为它们实现自定义导入。 例如:我有以下方面类型:

  • Facet1
  • Facet2
  • Facet3

当我使用数据导入处理程序时,出于商业原因我不想做“delta”,我只想对Facet1和Facet2进行清理/完全导入,而不用单独使用Facet3。 这在Solr有可能吗?

任何帮助/方向表示赞赏。


I have a solr core core1, which has a couple of Facet Types and I want to implement a custom Import for them. For eg: I have the Following Facet Types:

  • Facet1
  • Facet2
  • Facet3

When I use the Data Import Handler, I don't want to do the "delta" for business reasons, and I just want to do a clean / Full-Import for Facet1 and Facet2 and leave alone Facet3. Is this possible in Solr?

Any help / direction is appreciated.


原文:https://stackoverflow.com/questions/26370361
更新时间:2023-03-09 07:03

最满意答案

segue每次都会创建一个新的EditViewController 。 要向前传递数据,您需要将数据分配给EditViewController属性,然后将该数据复制到viewDidLoad方法中的titleTextView.text中。 这是必要的,因为@IBOutlet没有设置,并且在prepareForSegue运行时仍然是nil

所以:

  1. 将属性var textToEdit = ""EditViewController
  2. prepareForSegue ,设置addTitleViewController.textToEdit = /* the text you want to edit */
  3. EditViewController viewDidLoad中,设置titleTextView.text = textToEdit

注意:您的delegate应该被声明为weak以避免保留周期(这将导致您通过永不释放EditViewController来泄漏内存。您的@IBOutlet也应该被声明为weak


The segue will create a new EditViewController every time. To pass data forward, you will need to assign the data to an EditViewController property and then copy that data into titleTextView.text in the viewDidLoad method. This is necessary because the @IBOutlets are not set up and are still nil when prepareForSegue runs.

So:

  1. add the property var textToEdit = "" to your EditViewController.
  2. In prepareForSegue, set addTitleViewController.textToEdit = /* the text you want to edit */
  3. In viewDidLoad of EditViewController, set titleTextView.text = textToEdit.

Note: Your delegate should be declared weak to avoid a retain cycle (which will cause you to leak memory by never freeing EditViewControllers. Your @IBOutlets should also be declared weak.

相关问答

更多
  • segue每次都会创建一个新的EditViewController 。 要向前传递数据,您需要将数据分配给EditViewController属性,然后将该数据复制到viewDidLoad方法中的titleTextView.text中。 这是必要的,因为@IBOutlet没有设置,并且在prepareForSegue运行时仍然是nil 。 所以: 将属性var textToEdit = ""到EditViewController 。 在prepareForSegue ,设置addTitleViewContr ...
  • 您应该明确指定数组类型: miForFunkA.Invoke(sourceOfFunkA, new object[] { methodInfo.Name, Delegate.CreateDelegate(typeof(Action), miForFunkB) }); 如果这不能解决您的问题,您应该编辑您的问题,以便更清楚您正在尝试做什么,所涉及的所有变量的声明,您现在拥有的代码,它的作用以及与您的不同之处想做。 You should be to specify the array type ...
  • 你打电话时: container.add(data_a); // ^^^^^^^^^^^ 显式提供模板参数意味着编译器不会推导出模板参数(即,您没有获得转发引用行为)。 使用DataClassA作为模板参数实例化add意味着它的签名是: void add(DataClassA&& tag) 这是一个右值引用,而不是转发引用,因此左值参数不能绑定到它。 要使用完美转发,必须让编译器从参数中推导出模板参数。 基于参数的值类别,有三种可能的推论( T , T& ...
  • 我可以让这件事工作的唯一方法是使用回调,如评论中的帖子所述。 这不是我想要的理想解决方案,但我想这将是必须的。 我将此问题标记为已结束。 The only way I could get this thing to work was to use call backs, as mentioned in the post in the comment. This wasn't the ideal solution that I was looking for, but I guess this will ha ...
  • 一种解决方案是在您出示插页式广告时清除您的IBAction中的计数,然后当插页式广告被删除时,如果您有IBOutlets,则可以使用按下的按钮调用您的servicesButton函数。 func interstitialDidDismissScreen(ad: GADInterstitial!) { self.servicesButton(buttonThatWasPressed) } 这将回忆你所有的逻辑。 另一种方法是为新视图标题设置一个类级变量,并设置当按下按钮时,无论你在哪里调用pres ...
  • 这是否意味着任何这样的代表被单独翻译(编组?)为一个静态函数... 是的,你猜对了。 不完全是“静态函数”,CLR内部有一大堆代码可以执行这种魔法。 它为thunk自动生成机器代码,以适应从本机代码到托管代码的调用。 本机代码获取指向该thunk的函数指针。 参数值可能必须被转换,这是一种标准的编码编组任务。 并且总是随时调整来匹配管理方法的调用。 挖掘存储的委托的目标属性以提供this属性是其中的一部分。 它跳过堆栈帧,绑定到前一个托管帧的链接,因此GC可以看到它再次需要查找对象根。 然而,有一个令人讨厌 ...
  • 与在服务器端发生的forward不同, sendRedirect导致浏览器向重定向位置发起新请求,这意味着第二个语句为真。 Unlike forward which happens on the server-side, sendRedirect causes the browser to initiate a new request to the redirect location, which means the second statement is true.
  • 您需要在协议中定义-printThis并使A实现此协议。 您还需要将委托标记为符合此委托。 即: @protocol Printer - (void)printThis; @end @interface A : NSObject //... @end @interface B : //... @property (nonatomic, weak) id delegate; @end ARC需要了解方法调用的接口才能正确管理内存。 如果 ...
  • 首先你应该像这样改变你的协议: @protocol CoreDataDelegate //- (NSMutableArray *) fetchCoreData; - (void) getMyLocationEntityArray:(NSMutableArray *)entityArray; @end 您将MapViewController设置为响应您的协议CoreDateDelegate 。 所以,我想你在MapViewController ListTableViewController你的ListT ...
  • 不要将代码放在ViewControllerB类中,这将导致recursive loop 。 这是一个自我调用的循环,使循环永久化。 在viewDidLoad ,代码在加载视图时执行。 所以你正在加载一个视图,然后创建一个新的ViewControllerB对象,并加载它,这将反过来创建一个ViewControllerB ... 尝试将此代码放在ViewControllerA类中,在-viewDidAppear 。 每次回来时,代码都会再次执行,创建一个新的ViewControllerB并推送到堆栈。 看看我在 ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)