@ -96,7 +96,8 @@ public final class plasmaSearchQuery {
// values that are set after a search:
// values that are set after a search:
public int resultcount ; // number of found results
public int resultcount ; // number of found results
public long searchtime , urlretrievaltime , snippetcomputationtime ; // time to perform the search, to get all the urls, and to compute the snippets
public long searchtime , urlretrievaltime , snippetcomputationtime ; // time to perform the search, to get all the urls, and to compute the snippets
public boolean specialRights ; // is true if the user has a special authorization and my use more database-extensive options
public plasmaSearchQuery ( String queryString ,
public plasmaSearchQuery ( String queryString ,
int lines ,
int lines ,
plasmaSearchRankingProfile ranking ,
plasmaSearchRankingProfile ranking ,
@ -128,10 +129,12 @@ public final class plasmaSearchQuery {
this . host = null ;
this . host = null ;
this . remotepeer = null ;
this . remotepeer = null ;
this . handle = new Long ( System . currentTimeMillis ( ) ) ;
this . handle = new Long ( System . currentTimeMillis ( ) ) ;
this . specialRights = false ;
}
}
public plasmaSearchQuery (
public plasmaSearchQuery (
String queryString , TreeSet < String > queryHashes , TreeSet < String > excludeHashes ,
String queryString , TreeSet < String > queryHashes ,
TreeSet < String > excludeHashes ,
plasmaSearchRankingProfile ranking ,
plasmaSearchRankingProfile ranking ,
int maxDistance , String prefer , int contentdom ,
int maxDistance , String prefer , int contentdom ,
boolean onlineSnippetFetch ,
boolean onlineSnippetFetch ,
@ -139,7 +142,8 @@ public final class plasmaSearchQuery {
int domType , String domGroupName , int domMaxTargets ,
int domType , String domGroupName , int domMaxTargets ,
kelondroBitfield constraint , boolean allofconstraint ,
kelondroBitfield constraint , boolean allofconstraint ,
int domainzone ,
int domainzone ,
String host ) {
String host ,
boolean specialRights ) {
this . queryString = queryString ;
this . queryString = queryString ;
this . queryHashes = queryHashes ;
this . queryHashes = queryHashes ;
this . excludeHashes = excludeHashes ;
this . excludeHashes = excludeHashes ;
@ -147,8 +151,8 @@ public final class plasmaSearchQuery {
this . maxDistance = maxDistance ;
this . maxDistance = maxDistance ;
this . prefer = prefer ;
this . prefer = prefer ;
this . contentdom = contentdom ;
this . contentdom = contentdom ;
this . linesPerPage = Math . min ( 10 0, lines ) ;
this . linesPerPage = Math . min ( ( specialRights ) ? 10 00 : 1 0, lines ) ;
this . offset = Math . min ( 100 , offset ) ;
this . offset = Math . min ( ( specialRights ) ? 10000 : 100 , offset ) ;
this . urlMask = urlMask ;
this . urlMask = urlMask ;
this . domType = domType ;
this . domType = domType ;
this . zonecode = domainzone ;
this . zonecode = domainzone ;
@ -159,6 +163,7 @@ public final class plasmaSearchQuery {
this . host = host ;
this . host = host ;
this . remotepeer = null ;
this . remotepeer = null ;
this . handle = new Long ( System . currentTimeMillis ( ) ) ;
this . handle = new Long ( System . currentTimeMillis ( ) ) ;
this . specialRights = specialRights ;
}
}
public int neededResults ( ) {
public int neededResults ( ) {