Query Extensions

Query extensions are methods added to standard WireBootstrap select queries that make faceted search queries easier to create.

To create a search query, use the standard convention for specifying the fields to return. Use the extension methods search and facet to specify the search keyword(s) and facets to return.

const query = wire.data.select("number","street","city","region","countryCode")
     .search("*")
     .facet("type")
     .facet("status"); 

Once the query is created, execute it against the search service. The results will be returned in a standard WireBootstrap DataTable.

...
const table = await source.execAsync(query);

Suggestions

Use suggestion queries to return search results for type-ahead or auto-complete user interface components. These queries use suggestion requests in Azure Search.

To create suggestion queries, use the suggest extension method.

const query = wire.data.select().suggest("chicago");
const table = await source.execAsync(query);

Last updated