mirror of
https://github.com/apache/lucene.git
synced 2025-03-01 13:59:12 +00:00
Use a HashSet to workaround suspected Lucene bug which returns same file name multiple times
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@730052 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8c1db20c9a
commit
fd6b300d8b
@ -268,7 +268,8 @@ public class ReplicationHandler extends RequestHandlerBase implements SolrCoreAw
|
|||||||
List<Map<String, Object>> result = new ArrayList<Map<String, Object>>();
|
List<Map<String, Object>> result = new ArrayList<Map<String, Object>>();
|
||||||
try {
|
try {
|
||||||
//get all the files in the commit
|
//get all the files in the commit
|
||||||
Collection<String> files = commit.getFileNames();
|
//use a set to workaround possible Lucene bug which returns same file name multiple times
|
||||||
|
Collection<String> files = new HashSet<String>(commit.getFileNames());
|
||||||
for (String fileName : files) {
|
for (String fileName : files) {
|
||||||
File file = new File(core.getIndexDir(), fileName);
|
File file = new File(core.getIndexDir(), fileName);
|
||||||
Map<String, Object> fileMeta = getFileInfo(file);
|
Map<String, Object> fileMeta = getFileInfo(file);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user