Home | History | Annotate | Download | only in query

Lines Matching refs:query

17 package com.android.settings.intelligence.search.query;
89 * Base ranks defines the best possible rank based on what the query matches.
90 * If the query matches the prefix of the first word in the title, the best rank it can be
92 * If the query matches the prefix of the other words in the title, the best rank it can be
94 * If the query only matches the summary, the best rank it can be is 7
95 * If the query only matches keywords or entries, the best rank it can be is 9
100 String query) {
101 return new SearchQueryTask(new DatabaseResultTask(context, siteMapManager, query));
124 protected List<? extends SearchResult> query() {
161 // TODO (b/33577327) Retrieve all search results with a single query.
164 * Creates and executes the query which matches prefixes of the first word of the given
173 final String query = mQuery + "%";
174 final String[] selection = buildSingleWordSelection(query, matchColumns.length);
176 return query(whereClause, selection, baseRank);
180 * Creates and executes the query which matches prefixes of the non-first words of the
189 final String query = "% " + mQuery + "%";
190 final String[] selection = buildSingleWordSelection(query, matchColumns.length);
192 return query(whereClause, selection, baseRank);
196 * Creates and executes the query which matches prefixes of the any word of the given
207 return query(whereClause, selection, baseRank);
211 * Generic method used by all of the query methods above to execute a query.
213 * @param whereClause Where clause for the SQL query which uses bindings.
214 * @param selection List of the transformed query to match each bind in the whereClause
218 private Set<SearchResult> query(String whereClause, String[] selection, int baseRank) {
221 try (Cursor resultCursor = database.query(TABLE_PREFS_INDEX, SELECT_COLUMNS,
229 * Builds the SQLite WHERE clause that matches all matchColumns for a single query.
271 * Fills out the selection array to match the query as the prefix of a single word.
275 private String[] buildSingleWordSelection(String query, int size) {
279 selection[i] = query;
285 * Fills out the selection array to match the query as the prefix of a word.
294 final String query = mQuery + "%";
298 selection[i] = query;