All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ironcorelabs.sdk.BlindIndexSearch Maven / Gradle / Ivy

There is a newer version: 0.16.0
Show newest version
// Automatically generated by rust_swig
package com.ironcorelabs.sdk;


public final class BlindIndexSearch {

    private BlindIndexSearch() {}
    /**
     * Generate the list of tokens to use to find entries that match the search query, given the specified partitionId.
     * 
     * @param query        the string you want to tokenize and hash
     * @param partitionId  an extra string to include in every hash, allowing 2 queries with different partitionIds to produce a different set of tokens for the same query
     */
    public final int [] tokenizeQuery(String query, String partitionId) throws Exception {
        int [] ret = do_tokenizeQuery(mNativeObj, query, partitionId);

        return ret;
    }
    private static native int [] do_tokenizeQuery(long self, String query, String partitionId) throws Exception;
    /**
     * Generate the list of tokens to use to find entries that match the search query, given the specified partitionId.
     * 
     * @param query        the string you want to tokenize and hash
     * @param partitionId  an extra string to include in every hash, allowing 2 queries with different partitionIds to produce a different set of tokens for the same query
     */
    public final int [] tokenizeData(String query, String partitionId) throws Exception {
        int [] ret = do_tokenizeData(mNativeObj, query, partitionId);

        return ret;
    }
    private static native int [] do_tokenizeData(long self, String query, String partitionId) throws Exception;

    public synchronized void delete() {
        if (mNativeObj != 0) {
            do_delete(mNativeObj);
            mNativeObj = 0;
       }
    }
    @Override
    protected void finalize() throws Throwable {
        try {
            delete();
        }
        finally {
             super.finalize();
        }
    }
    private static native void do_delete(long me);
    /*package*/ BlindIndexSearch(InternalPointerMarker marker, long ptr) {
        assert marker == InternalPointerMarker.RAW_PTR;
        this.mNativeObj = ptr;
    }
    /*package*/ long mNativeObj;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy