public static ArrayList<InveList> queryEvaluation (ArrayList<Node> queryTree, int queryID, String IsRanked) throws IOException {
		ArrayList<InveList> result = new ArrayList<InveList>();


		if (currentNode.getIsOperator() == 0) {
			//use recursive method
			//if current node is not an operator
			//return its inverted list
			return retrieval(currentNode.getName());
		}
		else if (currentNode.getIsOperator() == 1) {
			//if current node is an operator
			//traverse all its son node and do corresponding operation
			for (Node childNode : currentNode.getSonNode()) {
				ArrayList<InveList> ret = new ArrayList<InveList>();

				Node tmp = currentNode;
				currentNode = childNode;
				ret = queryEvaluation(queryTree, queryID,IsRanked);
				currentNode = tmp;

				if (result.size() == 0)
					//for the initial situation,
					//copy the first son node's inverted list to the temp result
					result = (ArrayList<InveList>) ret.clone();

				//do operation according to the operator type
				if (currentNode.getName().equals("#OR"))
					result = orOperate(result ,ret);
				else if (currentNode.getName().equals("#AND"))
					result = andOperate(result ,ret);
				else if (currentNode.getName().substring(0, 6).equals("#NEAR/"))
					result = nearOperate(result ,ret);
			}
		}
		//the final result save in this ArrayList
		finalResult = (ArrayList<InveList>) result.clone();
		return result;
	}