Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set the query default to be *:* instead of * #59

Merged
merged 1 commit into from
Jul 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/datasource/datasource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,8 @@ export class OpenSearchDatasource extends DataSourceApi<OpenSearchQuery, OpenSea
}

private interpolateLuceneQuery(queryString: string, scopedVars: ScopedVars) {
// Lucene Lucene queryString should always be '*' if empty string
return getTemplateSrv().replace(queryString, scopedVars, 'lucene') || '*';
// Lucene Lucene queryString should always be '*:*' if empty string
return getTemplateSrv().replace(queryString, scopedVars, 'lucene') || '*:*';
}

private interpolatePPLQuery(queryString: string, scopedVars: ScopedVars) {
Expand Down Expand Up @@ -568,9 +568,9 @@ export class OpenSearchDatasource extends DataSourceApi<OpenSearchQuery, OpenSea
// @ts-ignore
// add global adhoc filters to timeFilter
const adhocFilters = getTemplateSrv().getAdhocFilters(this.name);
// Lucene queryString should always be '*' if empty string
// Lucene queryString should always be '*:*' if empty string
if (!queryString || queryString === '') {
queryString = '*';
queryString = '*:*';
}

let queryObj;
Expand Down
Loading