Smart Search
Smart-Search
예측 검색 API는 데이터베이스의 수백만 항목을 쉽게 검색 할 수있는 자유를 제공합니다. SQLITE3을 사용하여 Android 애플리케이션/애플리케이션에 가장 적합한 출력을 제공하기 위해 전문 검색, 순위 및 스템 사용의 조합.
앱 링크
예측 검색이란 무엇입니까?
예측이하는 일이 일치하는 하위 문자열이있는 빠른 검색 외에도 검색어를 검색하십시오. 루트를 가져온 다음 FTS 테이블에서 검색하여 일치 목록을 얻은 다음 일치 확률에 따라 목록을 정렬하고 정렬 된 목록을 반환합니다.
사용 방법
빌드 파일에 다음을 추가하십시오.
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
compile 'com.github.gauravat16:Smart-Search:1.2'
}
예
PredictiveSearch search = new PredictiveSearch(getApplicationContext());
ArrayList<String> columns = new ArrayList<>();
columns.add("<column-name>");
columns.add("<column-name>");
try {
search.createFTS4Table("<db-name.db>", "<table-name>", columns);
search.ftsRebuilder(); //Use it to rebulid after any change
ArrayList<String> resp1 = search.getSearchList("potatoes"); //Get result w/o stemming
ArrayList<String> resp2 = search.getPredictedList("try"); //Get result with stemming - predictive
} catch (Exception ex) {
ex.printStackTrace();
} finally {
search.close();
}
1. CreateFts4table (String dbtobesearched, String tableofdata, arraylist columnnames)
Creates/Builds the Full Text Search Virtual Table.
String dbtobesearch 스마트 검색하려는 테이블이있는 데이터베이스 이름을 검색했습니다.
String tableofdata 데이터가 포함 된 테이블 이름입니다.
ArrayList 열 이름 위의 모든 열 목록.
2. ftsrebuilder ()
Rebulids the FTS Virtual Table. Run this each time you make changes to your main database.
3. GetMatchesWostemming (String Partword)
returns the list of the words that match with your query. This is without stemming search.
4. String getMatchesWstemming (문자열 Word)
Performs everything that getSearchList() does but with stemming. Use it for prediction.