Changeset 13570
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/java/org/nzdl/gsdl/LuceneWrap/GS2LuceneQuery.java
r13557 r13570 157 157 } 158 158 } 159 159 160 160 // do the query 161 161 // Simple case for getting all the matching documents … … 202 202 exception.printStackTrace(); 203 203 } 204 204 catch (Exception exception) { 205 lucene_query_result.setError(LuceneQueryResult.OTHER_ERROR); 206 exception.printStackTrace(); 207 } 205 208 return lucene_query_result; 206 209 } … … 253 256 public void setSortField(String sort_field) { 254 257 this.sort_field = sort_field; 255 this.sorter = new Sort(sort_field); 258 if (sort_field == null) { 259 this.sorter = new Sort(); 260 } else { 261 this.sorter = new Sort(sort_field); 262 } 256 263 } 257 264 public String getSortField() { … … 260 267 261 268 public void setStartResults(int start_results) { 269 if (start_results < 1) { 270 start_results = 1; 271 } 262 272 this.start_results = start_results; 263 273 } -
trunk/indexers/lucene-gs/src/org/greenstone/LuceneWrapper/GS2LuceneQuery.java
r13557 r13570 157 157 } 158 158 } 159 159 160 160 // do the query 161 161 // Simple case for getting all the matching documents … … 202 202 exception.printStackTrace(); 203 203 } 204 204 catch (Exception exception) { 205 lucene_query_result.setError(LuceneQueryResult.OTHER_ERROR); 206 exception.printStackTrace(); 207 } 205 208 return lucene_query_result; 206 209 } … … 253 256 public void setSortField(String sort_field) { 254 257 this.sort_field = sort_field; 255 this.sorter = new Sort(sort_field); 258 if (sort_field == null) { 259 this.sorter = new Sort(); 260 } else { 261 this.sorter = new Sort(sort_field); 262 } 256 263 } 257 264 public String getSortField() { … … 260 267 261 268 public void setStartResults(int start_results) { 269 if (start_results < 1) { 270 start_results = 1; 271 } 262 272 this.start_results = start_results; 263 273 }
Note:
See TracChangeset
for help on using the changeset viewer.