Skip to content

Commit

Permalink
Set the query default to be *:* instead of * (#59)
Browse files Browse the repository at this point in the history
Set the query default to be *:* instead of *
  • Loading branch information
kyle-sammons authored Jul 12, 2024
1 parent cf5670c commit df990a5
Showing 1 changed file with 4 additions and 4 deletions.
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

0 comments on commit df990a5

Please sign in to comment.