简体   繁体   English

在Solr中一次索引文件目录一次又一次

[英]Index directory of files at once not one after another in solr

I have large directory contain set of files, which I need to index in solr 4.10.0 and I don't want to index them one after another as every single indexing of file the index of solr core will be changed. 我有一个包含文件集的大目录,我需要在solr 4.10.0中建立索引,并且我不想一个接一个地建立索引,因为文件的每个索引都将更改solr核心的索引。 Is there any method to index the whole directory once without the need to combine all these files into a big one file? 是否有任何方法可以将整个目录编制一次索引,而无需将所有这些文件组合成一个大文件?

Your question is not very clear, regardless of indexing one file at a time or all together there will be changes to the indexes. 您的问题不是很清楚,无论是一次索引一个文件还是将所有索引一起索引都会发生变化。

Thanks -Hussain 谢谢-侯赛因

It all depends on your requirement now, I'll just weigh in the pros and cons Indexing files individually, you can search them individually. 现在这一切都取决于您的要求,我将权衡利弊索引文件,您可以单独搜索它们。 So lets take an eg Name: File1 Contents: File1 因此,让我们举个例子:名称:File1目录:File1

Similarly File2 and File3 Now post indexing if you query SOLR for keyword "file", you'll get three documents. 类似地,File2和File3现在如果您向SOLR查询关键字“ file”,则发布索引,您将获得三个文档。

On the other approach if you combine all the three file and index it as one document, you'll only get one document. 在另一种方法上,如果将所有三个文件组合在一起并作为一个文档编制索引,则只会得到一个文档。 It all depends on what you are trying to achieve at the end. 这完全取决于您最终要达到的目标。

Thanks
-Hussain

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM