allow combining selection of different search nav's (facets)

- selecting more than one nav combines the 2 selections (with AND)
- unselecting one nav clears all selected

(e.g. select filetype:pdf and /language/fr shows ~ french pdf's only)
pull/1/head
reger 11 years ago
parent cb71413d19
commit b693ce9759

@ -615,7 +615,8 @@ public final class QueryParams {
* @param theQuery search query
* @param newModifier optional new modifier.
* - if null existing modifier of theQuery is appended
* - if not null this new modifier is appended (overwriting existing modifier)
* - if not null this new modifier is appended in addition to existing modifier
* - if isEmpty overwrites (clears) existing modifier
* @return url to new search result page
*/
public static StringBuilder navurlBase(final String ext, final QueryParams theQuery, final String newModifier) {
@ -629,7 +630,10 @@ public final class QueryParams {
if (newModifier == null) {
if (!theQuery.modifier.isEmpty()) sb.append("+" + theQuery.modifier.toString());
} else {
if(!newModifier.isEmpty()) sb.append("+" + newModifier);
if(!newModifier.isEmpty()) {
if (!theQuery.modifier.isEmpty()) sb.append("+" + theQuery.modifier.toString());
sb.append("+" + newModifier);
}
}
sb.append("&maximumRecords=");

Loading…
Cancel
Save