|
|
@ -82,7 +82,7 @@ public class DocumentIndex extends Segment {
|
|
|
|
throw new IOException("cannot parse " + file.toString() + ": " + e.getMessage());
|
|
|
|
throw new IOException("cannot parse " + file.toString() + ": " + e.getMessage());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
final Condenser condenser = new Condenser(document, true, true);
|
|
|
|
final Condenser condenser = new Condenser(document, true, true);
|
|
|
|
return super.storeDocument(
|
|
|
|
return super.storeDocument(
|
|
|
|
url,
|
|
|
|
url,
|
|
|
|
null,
|
|
|
|
null,
|
|
|
|
new Date(file.lastModified()),
|
|
|
|
new Date(file.lastModified()),
|
|
|
@ -119,7 +119,7 @@ public class DocumentIndex extends Segment {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
add(w);
|
|
|
|
add(w);
|
|
|
|
} catch (IOException e) {
|
|
|
|
} catch (IOException e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
if (e.getMessage().indexOf("cannot parse") < 0) e.printStackTrace();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -154,6 +154,10 @@ public class DocumentIndex extends Segment {
|
|
|
|
return find(querystring, 0, 20);
|
|
|
|
return find(querystring, 0, 20);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void close() {
|
|
|
|
|
|
|
|
super.close();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static void main(String[] args) {
|
|
|
|
public static void main(String[] args) {
|
|
|
|
// first argument: path to segment
|
|
|
|
// first argument: path to segment
|
|
|
|
// second argument: either 'add' or 'search'
|
|
|
|
// second argument: either 'add' or 'search'
|
|
|
|