From: Dennis Schafroth Date: Tue, 15 May 2012 10:46:59 +0000 (+0200) Subject: Merge branch 'master' into protocol-version2 X-Git-Tag: v1.6.13~9 X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=commitdiff_plain;h=dac67c622493911bcbce62c84243de3d458c4984;hp=67805878ccf5f7bbb7b29035fb16f682857252d9;p=pazpar2-moved-to-github.git Merge branch 'master' into protocol-version2 --- diff --git a/etc/server.xml b/etc/server.xml index d47a663..b97875f 100644 --- a/etc/server.xml +++ b/etc/server.xml @@ -27,6 +27,7 @@ + [[:WhiteSpace:][,.-]]* } [$] > ; diff --git a/nmen.stat b/nmen.stat new file mode 100644 index 0000000..6b19c38 --- /dev/null +++ b/nmen.stat @@ -0,0 +1,14 @@ +4K +user 0m5.296s +sys 0m0.788s + +user 0m5.484s +sys 0m0.732s + +100000 +user 0m5.272s +sys 0m0.648s + +128K +user 0m5.400s +sys 0m0.768s \ No newline at end of file diff --git a/src/client.c b/src/client.c index 9e52b0a..59e06cd 100644 --- a/src/client.c +++ b/src/client.c @@ -1092,7 +1092,7 @@ static int apply_limit(struct session_database *sdb, for (i = 0; (name = facet_limits_get(facet_limits, i, &value)); i++) { struct setting *s = 0; - + nmem_reset(nmem_tmp); for (s = sdb->settings[PZ_LIMITMAP]; s; s = s->next) { const char *p = strchr(s->name + 3, ':'); @@ -1148,7 +1148,6 @@ static int apply_limit(struct session_database *sdb, break; } } - nmem_reset(nmem_tmp); if (!s) { yaz_log(YLOG_WARN, "Target %s: limit %s used, but no limitmap defined", diff --git a/src/session.c b/src/session.c index b5a3d8f..0e1eea7 100644 --- a/src/session.c +++ b/src/session.c @@ -692,6 +692,8 @@ enum pazpar2_error_code session_search(struct session *se, se->reclist = 0; se->settings_modified = 0; relevance_destroy(&se->relevance); + if (nmem_total(se->nmem)) + session_log(se, YLOG_DEBUG, "NMEN operation usage %zd", nmem_total(se->nmem)); nmem_reset(se->nmem); se->total_records = se->total_merged = 0; se->num_termlists = 0; @@ -888,6 +890,10 @@ void session_destroy(struct session *se) normalize_cache_destroy(se->normalize_cache); relevance_destroy(&se->relevance); reclist_destroy(se->reclist); + if (nmem_total(se->nmem)) + session_log(se, YLOG_DEBUG, "NMEN operation usage %zd", nmem_total(se->nmem)); + if (nmem_total(se->session_nmem)) + session_log(se, YLOG_DEBUG, "NMEN session usage %zd", nmem_total(se->session_nmem)); nmem_destroy(se->nmem); service_destroy(se->service); yaz_mutex_destroy(&se->session_mutex); diff --git a/src/termlists.c b/src/termlists.c index e7b6e68..ea93130 100644 --- a/src/termlists.c +++ b/src/termlists.c @@ -118,9 +118,10 @@ void termlist_insert(struct termlist *tl, const char *display_term, return; strcpy(buf, norm_term); /* chop right */ + /* for (cp = buf + strlen(buf); cp != buf && strchr(",. -", cp[-1]); cp--) cp[-1] = '\0'; - + */ bucket = jenkins_hash((unsigned char *)buf) % tl->hash_size; for (p = &tl->hashtable[bucket]; *p; p = &(*p)->next) { diff --git a/test/test_icu.cfg b/test/test_icu.cfg index 75e8842..fcab6fa 100644 --- a/test/test_icu.cfg +++ b/test/test_icu.cfg @@ -30,14 +30,23 @@ - + [[:WhiteSpace:][,.!;]]* } [$] > ; - + - + + + + + [,]* } [$] > ; + + + @@ -47,7 +56,7 @@ + merge="longest" rank="2" facetrule="facet-author"/> diff --git a/test/test_icu_8.res b/test/test_icu_8.res index ed8bdcf..7380b62 100644 --- a/test/test_icu_8.res +++ b/test/test_icu_8.res @@ -7,18 +7,18 @@ Wood, Helen M.1 -bible1 -bible. o.t1 -cartography1 -community colleges1 -computers1 -imaging systems in medicine1 -optical pattern recognition1 -puget sound region (wash.)1 -radioisotope scanning1 -railroads1 -scintillation cameras1 -tomography1 -universities and colleges1 +Bible1 +Bible. O.T1 +Cartography1 +Community colleges1 +Computers1 +Imaging systems in medicine1 +Optical pattern recognition1 +Puget Sound region (Wash.)1 +Radioisotope scanning1 +Railroads1 +Scintillation cameras1 +Tomography1 +Universities and colleges1 \ No newline at end of file