[Namazu-cvs 737] r206 - Search-Namazu/trunk

cvsd @ vaj.namazu.org cvsd @ vaj.namazu.org
2006年 3月 14日 (火) 18:20:34 JST


Author: knok
Date: 2006-03-14 18:20:34 +0900 (Tue, 14 Mar 2006)
New Revision: 206

Modified:
   Search-Namazu/trunk/ChangeLog
   Search-Namazu/trunk/Namazu.pm
   Search-Namazu/trunk/Namazu.xs
Log:
Added maxhit parameter.


Modified: Search-Namazu/trunk/ChangeLog
===================================================================
--- Search-Namazu/trunk/ChangeLog	2006-03-14 08:31:18 UTC (rev 205)
+++ Search-Namazu/trunk/ChangeLog	2006-03-14 09:20:34 UTC (rev 206)
@@ -1,6 +1,7 @@
 2006-03-14  NOKUBI Takatsugu  <knok @ daionet.gr.jp>
 
 	* Namazu.{xs,pm} : Added size attribute.
+	  Added maxhit paramater.
 
 	* Namazu.pm: Added more error status.
 

Modified: Search-Namazu/trunk/Namazu.pm
===================================================================
--- Search-Namazu/trunk/Namazu.pm	2006-03-14 08:31:18 UTC (rev 205)
+++ Search-Namazu/trunk/Namazu.pm	2006-03-14 09:20:34 UTC (rev 206)
@@ -121,6 +121,10 @@
 
 Specify language.
 
+=head4 maxhit
+
+Speciry maximum numbers of hits. Same as MaxHit directive in namazurc.
+
 =head2 Search::Namazu::Result
 
 Search::Namazu::Result object is for keeping result information.
@@ -215,6 +219,7 @@
     my $sortord = $args{'sortOrder'};
     my $lang = $args{'lang'};
     my $query = $args{'query'};
+    my $maxhit = $args{'maxhit'};
 
 # initialize
 
@@ -262,6 +267,7 @@
     if (defined $lang) {
 	nmz_setlang($lang);
     }
+    nmz_setmaxhit($maxhit) if defined $maxhit;
 
 # query and get hlist
 

Modified: Search-Namazu/trunk/Namazu.xs
===================================================================
--- Search-Namazu/trunk/Namazu.xs	2006-03-14 08:31:18 UTC (rev 205)
+++ Search-Namazu/trunk/Namazu.xs	2006-03-14 09:20:34 UTC (rev 206)
@@ -165,3 +165,8 @@
 
 	OUTPUT:
 		RETVAL
+
+void
+nmz_setmaxhit(int max)
+	CODE:
+		nmz_set_maxhit(max);




Namazu-cvs メーリングリストの案内