File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
src/main/java/org/xbib/elasticsearch/action Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 77
88 <groupId >org.xbib.elasticsearch.plugin</groupId >
99 <artifactId >elasticsearch-knapsack</artifactId >
10- <version >1.0.0.RC1.1 </version >
10+ <version >1.0.0.RC1.2 </version >
1111
1212 <packaging >jar</packaging >
1313
9797 <dependency >
9898 <groupId >org.hamcrest</groupId >
9999 <artifactId >hamcrest-all</artifactId >
100- <version >1.3 </version >
100+ <version >1.1 </version >
101101 <scope >test</scope >
102102 </dependency >
103103
Original file line number Diff line number Diff line change @@ -201,13 +201,14 @@ public void run() {
201201 String lastCoord = null ;
202202 while ((packet = session .read ()) != null ) {
203203 String [] entry = KnapsackPacket .decodeName (packet .name ());
204- if (entry .length != 4 ) {
204+ if (entry .length < 2 ) {
205205 throw new ElasticsearchIllegalStateException ("archive entry too short, can't import" );
206206 }
207207 String index = entry [0 ];
208208 String type = entry [1 ];
209- String id = entry [2 ];
210- String field = entry [3 ];
209+ // entry length != 4 ? older knapsack format
210+ String id = entry .length > 2 ? entry [2 ] : null ;
211+ String field = entry .length > 3 ? entry [3 ] : "_source" ;
211212 if ("_settings" .equals (type )) {
212213 index = mapIndex (index );
213214 String settings ;
You can’t perform that action at this time.
0 commit comments