Changeset 26360
- Timestamp:
- 2012-10-19T18:50:46+13:00 (10 years ago)
- Location:
- other-projects/gs3-webservices-java-client/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/gs3-webservices-java-client/trunk/src/GS3Fedora/org/greenstone/fedora/services/FedoraGS3Connection.java
r26309 r26360 2189 2189 // Params to search() method below: string of fielded query terms; 2190 2190 // hitpageStart, hitpageEnd, snippetsMax (leave that 0) 2191 query = query + " " + "PID" + COLON + GREENSTONE;2191 query = GSearchConnection.ALL_INDEXED_FIELDS + COLON + query + " " + "PID" + COLON + GREENSTONE; 2192 2192 2193 2193 String searchResult = this.fedoraGSearch.search(query, 1, maxDocs, 0); -
other-projects/gs3-webservices-java-client/trunk/src/GS3Fedora/org/greenstone/fedora/services/GSearchConnection.java
r26309 r26360 74 74 protected static final String DC_TITLE_FIELD = "dc.title"; 75 75 protected static final String FULLTEXT_FIELD = "ds.fulltext"; 76 public static final String ALL_INDEXED_FIELDS = "foxml.all.text"; 76 77 77 78 /** separator used internally to separate values of a search field */ … … 291 292 // and put quotes around phrases, then combine all the terms 292 293 // together again with spaces to separate them. 293 allfields = formatSearchTermsInField(allfields, ALL_FIELDS); // search foxml.all.text294 allfields = formatSearchTermsInField(allfields, ALL_FIELDS); // searches foxml.all.text 294 295 // ALL_FIELDS has no field name 295 296 titles = formatSearchTermsInField(titles, DC_TITLE_FIELD); … … 349 350 if(!fieldName.equals(ALL_FIELDS)) { 350 351 field = fieldName + ":" + field; 352 } 353 // in older versions of GSearch (version 2.2), searching over all fields 354 // meant not specifying an index to search in. From GSearch version 2.4/2.5 355 // need to search in field "foxml.all.text" to search all indexed fields. 356 else { 357 field = ALL_INDEXED_FIELDS + ":" + field; //searches in foxml.all.text 351 358 } 352 359
Note:
See TracChangeset
for help on using the changeset viewer.