Index: trunk/lucene-search-2.0/src/org/wikimedia/lsearch/search/SearchEngine.java |
— | — | @@ -167,7 +167,7 @@ |
168 | 168 | |
169 | 169 | TopDocs hits=null; |
170 | 170 | // see if we can search only part of the index |
171 | | - if(nsfw!=null && (iid.isMainPart() || iid.isNssplit())){ |
| 171 | + if(nsfw!=null && (iid.isMainsplit() || iid.isNssplit())){ |
172 | 172 | String part = null; |
173 | 173 | for(NamespaceFilter f : nsfw.getFilter().decompose()){ |
174 | 174 | if(part == null) |
Index: trunk/lucene-search-2.0/src/org/wikimedia/lsearch/oai/IncrementalUpdater.java |
— | — | @@ -82,6 +82,7 @@ |
83 | 83 | boolean notification = true; |
84 | 84 | HashSet<String> excludeList = new HashSet<String>(); |
85 | 85 | HashSet<String> firstPass = new HashSet<String>(); // if dbname is here, then it's our update pass |
| 86 | + String defaultTimestamp = "2001-01-01"; |
86 | 87 | boolean fetchReferences = true; |
87 | 88 | // args |
88 | 89 | for(int i=0; i<args.length; i++){ |
— | — | @@ -91,6 +92,8 @@ |
92 | 93 | sleepTime = Long.parseLong(args[++i])*1000; |
93 | 94 | else if(args[i].equals("-t")) |
94 | 95 | timestamp = args[++i]; |
| 96 | + else if(args[i].equals("-dt")) |
| 97 | + defaultTimestamp = args[++i]; |
95 | 98 | else if(args[i].equals("-f")) |
96 | 99 | dblist = args[++i]; |
97 | 100 | else if(args[i].equals("-e")) |
— | — | @@ -127,7 +130,8 @@ |
128 | 131 | System.out.println("Options:"); |
129 | 132 | System.out.println(" -d - daemonize, otherwise runs only one round of updates to dbs"); |
130 | 133 | System.out.println(" -s - sleep time in seconds after one cycle (default: "+sleepTime+"ms)"); |
131 | | - System.out.println(" -t - timestamp to start from (if status is missing default: "+timestamp+")"); |
| 134 | + System.out.println(" -t - timestamp to start from"); |
| 135 | + System.out.println(" -dt - default timestamp (default: "+defaultTimestamp+")"); |
132 | 136 | System.out.println(" -f - dblist file, one dbname per line"); |
133 | 137 | System.out.println(" -n - wait for notification of flush after done updating one db (default: "+notification+")"); |
134 | 138 | System.out.println(" -e - exclude dbname from incremental updates (overrides -f)"); |
— | — | @@ -171,7 +175,7 @@ |
172 | 176 | if(firstPass.contains(dbname) && timestamp!=null) |
173 | 177 | from = timestamp; |
174 | 178 | else |
175 | | - from = status.getProperty("timestamp","2001-01-01"); |
| 179 | + from = status.getProperty("timestamp",defaultTimestamp); |
176 | 180 | log.info("Resuming update of "+iid+" from "+from); |
177 | 181 | ArrayList<IndexUpdateRecord> records = harvester.getRecords(from); |
178 | 182 | if(records.size() == 0) |