Search is often the heartbeat of a Power Pages portal—whether it’s customers hunting for products, partners looking up resources, or employees digging for documents, a good search experience can make or break usability.
Out of the box, Power Pages offers solid search capabilities tied to Dataverse, but to really shine, you need to tweak it to fit your users’ needs. Customizing search isn’t about overhauling the system; it’s about configuring what’s searchable, adding filters to narrow results, and styling the output to feel intuitive.
Now lets see how portal search work and what you can do to improve it!
Understanding How Portal Search Works
Power Pages search leans on Dataverse’s search engine, which indexes data across tables to deliver fast, relevant results. It’s not just a keyword box—it’s a full-text search that combs through configured tables and columns, factoring in metadata and relationships.
When a user types a query, Dataverse ranks results based on relevance, pulling matches from fields you’ve marked as searchable. This is great for portals with lots of structured data—like product catalogs, support tickets, or knowledge bases—but the default setup might not highlight what your users care about most.
By customizing it, you can control what’s included, how results are filtered, and what they look like, turning a basic search bar into a powerful tool.
Configuring Searchable Tables and Columns
The first step in tailoring search is deciding what data users can find. Power Pages lets you pick which Dataverse tables and columns are indexed, so you’re not stuck with everything being searchable—or worse, sensitive data leaking into results.
In the Power Pages Management app, head to the Portal Search settings. You’ll see a list of tables enabled for search—common ones like Contacts, Cases, or custom tables you’ve added.
To add a table, go to the “Site Settings” and create a new record with the name Search/EnabledEntities. Set its value to a comma-separated list of table logical names, like contact,incident,msdyn_knowledgearticle. For a product catalog, you might include a custom table like new_product:
Search/EnabledEntities: contact,new_product,msdyn_knowledgearticle
Next, specify which columns within those tables are searchable. For each table, create a setting like Search/Entity/contact and list the columns, such as fullname,emailaddress1. Example:
Search/Entity/new_product: name,description,price
Keep it focused—indexing every column slows things down and muddies results. Stick to fields users actually query, like names, descriptions, or tags. After updating, rebuild the search index via the Portal Management app’s “Sync Configuration” action to apply changes.
Test it out—if “price” isn’t showing up in results, double-check your column names and permissions.
Setting Up Facets and Filters for Refining Results
A search bar that dumps a wall of results isn’t enough; users need ways to narrow things down. That’s where facets and filters come in. Facets are categories—like “Product Type” or “Status”—that let users slice results without typing more keywords. Filters work similarly, often as dropdowns or checkboxes, to refine what’s shown.
In Power Pages, facets are configured in the Portal Search settings under Search/Facets. For a product catalog, you might add facets for “Category” and “Price Range.” Create a setting like:
Search/Facets/new_product: category,pricerange
Map these to Dataverse columns or option sets. For “Price Range,” you’ll need a calculated field or view in Dataverse to bucket prices (e.g., “Under $50, $50-$100”).
Then, update the search page’s Web Template to display facets. Power Pages uses a default search template, but you can tweak it to show facets as links or checkboxes.
Filters are set up similarly, often tied to a form or list on the search page. For example, add a dropdown to filter products by “In Stock” status. In the Portal Management app, create a list tied to the new_product table, and add a filter condition:
Search/Filters/new_product: statuscode=1
Users can then toggle filters to see only active products. Test this in your portal—type a query, check that facets appear, and ensure filters don’t hide critical results. If facets aren’t showing, verify your column mappings and clear the portal cache.
Customizing Search Results with Liquid
The default search results page in Power Pages is functional but plain—titles, snippets, and links. To make it pop, use Liquid to style and structure the output. Liquid lets you grab the search results ({{ search.results }}) and loop through them to display exactly what you want.
Say you’re building a product search and want to show thumbnails, prices, and categories alongside titles.
In the Power Pages design studio, edit the search page’s Web Template. Replace the default results block with something like this:
{% if search.results %}
<div class="search-results">
{% for result in search.results %}
<div class="result-item">
{% if result.entity.new_product %}
<img src="{{ result.entity.new_product.thumbnail.url | default: '/default.jpg' }}" alt="Product" width="50">
<h3><a href="{{ result.url }}">{{ result.entity.new_product.name }}</a></h3>
<p>{{ result.entity.new_product.description | truncate: 100 }}</p>
<p>Price: ${{ result.entity.new_product.price }}</p>
<p>Category: {{ result.entity.new_product.category }}</p>
{% endif %}
</div>
{% endfor %}
</div>
{% else %}
<p>No results found.</p>
{% endif %}
This pulls fields from the new_product table, adds an image, and trims the description for readability. Style it with CSS in your portal’s theme to match your brand. If you’re showing multiple table types (e.g., products and articles), use conditionals to render different layouts:
{% if result.entity.logicalname == 'new_product' %}
<!-- Product layout -->
{% elsif result.entity.logicalname == 'msdyn_knowledgearticle' %}
<!-- Article layout -->
{% endif %}
Preview the page after saving—search for a term, check that results look right, and tweak spacing or fonts as needed. If fields aren’t showing, ensure they’re indexed and accessible to portal users’ permissions.
Testing and Fine-Tuning
Customizing search is iterative. After configuring tables, facets, and templates, test with real queries—try broad terms, misspellings, or niche phrases to see how results rank. If irrelevant items pop up, adjust indexed columns or boost specific fields in the Search/Boost settings (e.g., prioritize name over description).
Watch performance—over-indexing slows things down, so stick to 5-10 columns per table. Also, check user permissions; if authenticated users see less than expected, their Dataverse security roles might need tweaking.
Summary
A well-tuned search in Power Pages doesn’t just help users find stuff—it builds trust and keeps them engaged. By picking the right tables and columns, adding facets and filters for precision, and styling results with Liquid, you’re crafting an experience that feels effortless.
Test it, tweak it, and watch how it transforms your portal into a go-to resource. It’s not about reinventing search—it’s about making it work so well users don’t even notice it’s there.
If you have any questions, hit me up on linkedin!