public ArrayList<Integer> searchOR(String str){
        int lg = str.length();
        int indexOfAnd = str.indexOf(" OR ");
        String firstElement = str.substring(0 , indexOfAnd);
        String secondElement = str.substring(indexOfAnd+4,lg);

        ArrayList<Integer> rs1 = search(firstElement);
        ArrayList<Integer> rs2 = search(secondElement);
        ArrayList<Integer> rst = new ArrayList<Integer>();
        int index1 = 0;
        int index2 = 0;

        while(index1<rs1.size() && index2<rs2.size()){
            if(rs1.get(index1) < rs2.get(index2)){
                rst.add(rs1.get(index1));
                index1++;
            }else if(rs1.get(index1) > rs2.get(index2)){
                rst.add(rs2.get(index2));
                index2++;
            }else {
                rst.add(rs2.get(index2));
                index1++;
                index2++;
            }
        }

        if(index1<rs1.size()){
            for(int x = index1; x<rs1.size(); x++){
                rst.add(rs1.get(x));
            }
        }
        if(index2<rs2.size()){
            for(int x = index2; x<rs2.size(); x++){
                rst.add(rs2.get(x));
            }
        }

        return rst;
        
    }