From 6db8921a0f6b3c519e88c5cfcfd7172c99b04619 Mon Sep 17 00:00:00 2001 From: orbiter Date: Thu, 1 Sep 2011 10:23:22 +0000 Subject: [PATCH] enhanced termlist git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7914 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/api/termlist_p.java | 14 ++++++++++++++ htroot/api/termlist_p.xml | 21 +++++++++++++-------- 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/htroot/api/termlist_p.java b/htroot/api/termlist_p.java index 31b069d81..78f84fd55 100644 --- a/htroot/api/termlist_p.java +++ b/htroot/api/termlist_p.java @@ -59,10 +59,17 @@ public class termlist_p { final Row referenceRow = segment.termIndex().referenceRow(); final int rowsize = referenceRow.objectsize; final ArrayList deleteterms = new ArrayList(); + long over1000 = 0, over10000 = 0, over100000 = 0, over1000000 = 0, over10000000 = 0, over100000000 = 0; while (i.hasNext()) { e = i.next(); termnumber++; count = e.getScore(); + if (count > 1000) over1000++; + if (count > 10000) over10000++; + if (count > 100000) over100000++; + if (count > 1000000) over1000000++; + if (count > 10000000) over10000000++; + if (count > 100000000) over100000000++; if (count > maxcount) { maxcount = count; maxterm = e.getObject(); @@ -92,8 +99,15 @@ public class termlist_p { prop.put("terms", c); prop.put("maxterm", maxterm == null ? "" : ASCII.String(maxterm)); prop.put("maxcount", maxcount); + prop.put("maxcountmemory", 20 + maxcount * rowsize); prop.put("termnumber", termnumber); prop.put("totalmemory", totalmemory); + prop.put("over1000", over1000); + prop.put("over10000", over10000); + prop.put("over100000", over100000); + prop.put("over1000000", over1000000); + prop.put("over10000000", over10000000); + prop.put("over100000000", over100000000); log.logWarning("finished termlist_p -> terms: " + c); log.logWarning("maxterm: "+ (maxterm == null ? "" : ASCII.String(maxterm))); diff --git a/htroot/api/termlist_p.xml b/htroot/api/termlist_p.xml index 57c202ed2..dafa22f3d 100644 --- a/htroot/api/termlist_p.xml +++ b/htroot/api/termlist_p.xml @@ -1,12 +1,17 @@ - - - #[maxcount]# - + + #{terms}# - - #[count]# - #[memory]# - + #{/terms}# \ No newline at end of file