public PriorityQueue<SearchResult> search(List<String> words, List<Integer> weights) {
		PriorityQueue<SearchResult> res = new PriorityQueue<>(docs.size(), Collections.reverseOrder());
		Vector searchV = new Vector(dic.getWordCount());

		// init vector
		for (int i = 0; i < words.size(); i++) {
			String w = words.get(i);
			Integer pos = wordToIndex.get(w);
			double idf = dic.getIDF(w);

			// check if word does exist
			if (pos != null)
				// calculate idf
				searchV.setPos(pos, (Math.log(weights.get(i)) / Math.log(2) + 1) * idf);

		}
		searchV.convetToUnitVector();

		// search
		for (int i = 0; i < this.docs.size(); i++) {
			double d = searchV.dotProduct(this.docVectors.get(i));
			res.add(new SearchResult(this.docs.get(i), d));
		}

		return res;
	}