* fix for non-changing offset on new search term

* dht-heap doesn't has to be deleted (5097), we simply write a new one on exit
* do not install YaCy in startup because a Windows-shutdown might corrupt something. Installing YaCy as a service would solve this.

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5099 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
lotus 17 years ago
parent 219b93df6a
commit 3fbfd5a78b

@ -72,10 +72,12 @@ Section "YaCy on the Desktop"
CreateShortCut "$DESKTOP\YaCy.lnk" "$INSTDIR\startYACY.bat" "" "$INSTDIR\addon\YaCy.ico" "" SW_SHOWMINIMIZED CreateShortCut "$DESKTOP\YaCy.lnk" "$INSTDIR\startYACY.bat" "" "$INSTDIR\addon\YaCy.ico" "" SW_SHOWMINIMIZED
SectionEnd SectionEnd
/*
Section "YaCy in Startup" Section "YaCy in Startup"
SetShellVarContext current SetShellVarContext current
CreateShortCut "$SMSTARTUP\YaCy.lnk" "$INSTDIR\startYACY.bat" "" "$INSTDIR\addon\YaCy.ico" "" SW_SHOWMINIMIZED CreateShortCut "$SMSTARTUP\YaCy.lnk" "$INSTDIR\startYACY.bat" "" "$INSTDIR\addon\YaCy.ico" "" SW_SHOWMINIMIZED
SectionEnd SectionEnd
*/
Section "Uninstall" Section "Uninstall"
IfFileExists "$INSTDIR\DATA\yacy.running" 0 +3 IfFileExists "$INSTDIR\DATA\yacy.running" 0 +3

@ -111,7 +111,7 @@ public class ysearch {
} }
int itemsPerPage = Math.min((authenticated) ? 1000 : 10, post.getInt("maximumRecords", post.getInt("count", 10))); // SRU syntax with old property as alternative int itemsPerPage = Math.min((authenticated) ? 1000 : 10, post.getInt("maximumRecords", post.getInt("count", 10))); // SRU syntax with old property as alternative
int offset = post.getInt("startRecord", post.getInt("offset", 0)); int offset = (post.hasValue("query") && post.hasValue("former") && !post.get("query","").equalsIgnoreCase(post.get("former",""))) ? 0 : post.getInt("startRecord", post.getInt("offset", 0));
boolean global = (post == null) ? true : post.get("resource", "global").equals("global"); boolean global = (post == null) ? true : post.get("resource", "global").equals("global");
final boolean indexof = (post != null && post.get("indexof","").equals("on")); final boolean indexof = (post != null && post.get("indexof","").equals("on"));

@ -125,7 +125,7 @@ public class yacysearch {
} }
int itemsPerPage = Math.min((authenticated) ? 1000 : 10, post.getInt("maximumRecords", post.getInt("count", 10))); // SRU syntax with old property as alternative int itemsPerPage = Math.min((authenticated) ? 1000 : 10, post.getInt("maximumRecords", post.getInt("count", 10))); // SRU syntax with old property as alternative
int offset = post.getInt("startRecord", post.getInt("offset", 0)); int offset = (post.hasValue("query") && post.hasValue("former") && !post.get("query","").equalsIgnoreCase(post.get("former",""))) ? 0 : post.getInt("startRecord", post.getInt("offset", 0));
boolean global = (post == null) ? true : post.get("resource", "global").equals("global"); boolean global = (post == null) ? true : post.get("resource", "global").equals("global");
final boolean indexof = (post != null && post.get("indexof","").equals("on")); final boolean indexof = (post != null && post.get("indexof","").equals("on"));
@ -423,6 +423,9 @@ public class yacysearch {
return prop; return prop;
} }
/**
* generates the page navigation bar
*/
private static String navurla(final int page, final int display, final plasmaSearchQuery theQuery) { private static String navurla(final int page, final int display, final plasmaSearchQuery theQuery) {
return return
"<a href=\"yacysearch.html?display=" + display + "<a href=\"yacysearch.html?display=" + display +

@ -75,11 +75,11 @@ public final class indexRAMRI implements indexRI, indexRIReader {
} }
} catch (final IOException e){ } catch (final IOException e){
log.logSevere("unable to restore cache dump: " + e.getMessage(), e); log.logSevere("unable to restore cache dump: " + e.getMessage(), e);
indexHeapFile.delete(); // get empty dump
heap.initWriteMode(); heap.initWriteMode();
} catch (final NegativeArraySizeException e){ } catch (final NegativeArraySizeException e){
log.logSevere("unable to restore cache dump: " + e.getMessage(), e); log.logSevere("unable to restore cache dump: " + e.getMessage(), e);
indexHeapFile.delete(); // get empty dump
heap.initWriteMode(); heap.initWriteMode();
} }
} else { } else {

@ -264,6 +264,13 @@ public class serverObjects extends HashMap<String, String> implements Cloneable
return dflt; return dflt;
} }
} }
public boolean hasValue(final String key) {
final String s = super.get(key);
if (s == null) return false;
if (s == "") return false;
return true;
}
// returns a set of all values where their key mappes the keyMapper // returns a set of all values where their key mappes the keyMapper
public String[] getAll(final String keyMapper) { public String[] getAll(final String keyMapper) {

Loading…
Cancel
Save