the server operations of the search algorithm for JXT+ @param stoken sjointoken in JXT+ @param xtoken xjointoken in JXT+ @return the matching results
(byte[][] stoken, byte[][] xtoken)
| 47 | * @return the matching results |
| 48 | */ |
| 49 | public ArrayList<ArrayList<byte[]>> search(byte[][] stoken, byte[][] xtoken){ |
| 50 | ArrayList<ArrayList<byte[]>> res = new ArrayList<>(); |
| 51 | |
| 52 | ArrayList<byte[]> token1_tset = tset.get(stag1); |
| 53 | for (int i = 0; i < token1_tset.size(); i++) { |
| 54 | byte[] xtoken_t = tool.Xor(xtoken[i], token1_tset.get(i)); |
| 55 | long xtoken_long = tool.bytesToLong(xtoken_t); |
| 56 | if (f_2.mayContain(xtoken_long)){ |
| 57 | byte[] stoken_t = tool.Xor(stoken[i], token1_tset.get(i)); |
| 58 | res.add(cset1.get(tool.bytesToLong(stoken_t))); |
| 59 | res.add(cset2.get(xtoken_long)); |
| 60 | } |
| 61 | } |
| 62 | return res; |
| 63 | } |
| 64 | } |