}
public GQuery asGquery() {
GQuery newQuery = new GQuery();
newQuery.setTitle(originalQuery.getTitle());
newQuery.setText(originalQuery.getText());
FeatureVector finalVector = new FeatureVector(stopper);
ScorableComparator comparator = new ScorableComparator(true);
Collections.sort(features, comparator);
Iterator<KeyValuePair> it = features.iterator();
int i=0;
while(it.hasNext() && i++ < fbTermCount) {
KeyValuePair tuple = it.next();
finalVector.addTerm(tuple.getKey(), tuple.getScore());
}
newQuery.setFeatureVector(finalVector);
return newQuery;
}