team4alfanous team mailing list archive
-
team4alfanous team
-
Mailing list archive
-
Message #00304
[Branch ~team4alfanous/alfanous/alfanous-git] Rev 495: give a MAX of 100 to the keywords list aimed to be processed and shown
------------------------------------------------------------
revno: 495
committer: Assem Chelli <assem.ch@xxxxxxxxx>
timestamp: Sat 2013-01-05 21:15:15 +0100
message:
give a MAX of 100 to the keywords list aimed to be processed and shown
modified:
src/alfanous/Outputs.py
--
lp:alfanous
https://code.launchpad.net/~team4alfanous/alfanous/alfanous-git
Your team Alfanous team is subscribed to branch lp:alfanous.
To unsubscribe from this branch go to https://code.launchpad.net/~team4alfanous/alfanous/alfanous-git/+edit-subscription
=== modified file 'src/alfanous/Outputs.py'
--- src/alfanous/Outputs.py 2013-01-05 19:32:19 +0000
+++ src/alfanous/Outputs.py 2013-01-05 20:15:15 +0000
@@ -95,6 +95,7 @@
DEFAULTS = {
"minrange":1,
"maxrange":25,
+ "maxkeywords":100,
"results_limit":6236,
"flags":{
"action":"search",
@@ -497,7 +498,7 @@
#Search
SE = self.FQSE if fuzzy else self.QSE
res, termz = SE.search_all( query , self._defaults["results_limit"], sortedby = sortedby )
- terms = [term[1] for term in list( termz )] # TODO: I dont like this termz structure , must change it
+ terms = [term[1] for term in list( termz )[:self._defaults["maxkeywords"]]]
terms_uthmani = map( STANDARD2UTHMANI, terms )
#pagination
offset = 1 if offset < 1 else offset;