public static ArrayList<XMLFile> imdbPointQueryText(String ... text) {
        try {
            dbs.setup(dbName);
        } catch (DatabaseException e){
           System.err.println("Caught Exception creating datatbase :");
           e.printStackTrace();
        }
		ArrayList<XMLFile> foundEntries = new ArrayList<XMLFile>();
        Set<String> uniq = null;
        Set<String> searchTerms = new HashSet<String>(FileData.uniqTerms(text));
        ArrayList<String> searchArr = new ArrayList<String>(searchTerms);
        XMLFileBinding binding = new XMLFileBinding();
        try {
            secCursor = dbs.getTextDb().openSecondaryCursor(null, null);
            DatabaseEntry foundKey = new DatabaseEntry();
            DatabaseEntry foundData = new DatabaseEntry();
            DatabaseEntry textKey = new DatabaseEntry(searchArr.get(0).getBytes());
            ret = secCursor.getSearchKey(textKey, foundKey, foundData, LockMode.DEFAULT);
            DatabaseEntry correctKey = null;
            Set<DatabaseEntry> keysSeen = new HashSet<DatabaseEntry>();

            while (ret == OperationStatus.SUCCESS) {
                keysSeen.add(foundKey);
                xml = (XMLFile) binding.entryToObject(foundData);
                uniq = FileData.uniqTerms(xml.getContent());
                if(uniq.containsAll(searchTerms)) {
                    foundEntries.add(xml);
                }
                ret = secCursor.getNext(textKey, foundKey, foundData, LockMode.DEFAULT);
                if (keysSeen.contains(foundKey) || !uniq.contains(searchArr.get(0))) {
                    break;
                }
            }
        } catch (DatabaseException e) {
            System.err.println("Database Error: " + e.toString());
            e.printStackTrace();
        } catch (NullPointerException npe) {
			System.err.println("Record not found.");
			System.exit(1);
		} finally {
    		dbs.close();
        }
        return foundEntries;
    }