Skip to content

Commit ca25d85

Browse files
committed
facet clean, remove commented out content
1 parent 3b96c3d commit ca25d85

File tree

1 file changed

+0
-36
lines changed

1 file changed

+0
-36
lines changed

articles/search/search-faceted-navigation.md

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -180,42 +180,6 @@ To guarantee accuracy, you can artificially inflate the count:\<number> to a lar
180180

181181
The tradeoff with this workaround is increased query latency, so use it only when necessary.
182182

183-
<!--
184-
## Presentation layer
185-
186-
In application code, the pattern is to use facet query parameters to return the faceted navigation structure along with facet results, plus a `$filter` expression. The filter expression handles the click event and further narrows the search result based on the facet selection.
187-
188-
### Facet and filter combination
189-
190-
The following code snippet from the `JobsSearch.cs` file in the [NYCJobs demo](/samples/azure-samples/search-dotnet-asp-net-mvc-jobs/search-dotnet-asp-net-mvc-jobs/) adds the selected Business Title to the filter if you select a value from the Business Title facet.
191-
192-
```cs
193-
if (businessTitleFacet != "")
194-
filter = "business_title eq '" + businessTitleFacet + "'";
195-
```
196-
197-
Here's another example from the hotels sample. The following code snippet adds `categoryFacet` to the filter if a user selects a value from the category facet.
198-
199-
```csharp
200-
if (!String.IsNullOrEmpty(categoryFacet))
201-
filter = $"category eq '{categoryFacet}'";
202-
```
203-
204-
### Build HTML dynamically
205-
206-
The following code snippet from the `index.cshtml` (also from NYCJobs demo) dynamically builds the HTML to display the first facet, Business Title. Similar functions dynamically build the HTML for the other facets. Each facet has a label and a count, which displays the number of items found for that facet result.
207-
208-
```js
209-
function UpdateBusinessTitleFacets(data) {
210-
var facetResultsHTML = '';
211-
for (var i = 0; i < data.length; i++) {
212-
facetResultsHTML += '<li><a href="javascript:void(0)" onclick="ChooseBusinessTitleFacet(\'' + data[i].Value + '\');">' + data[i].Value + ' (' + data[i].Count + ')</span></a></li>';
213-
}
214-
215-
$("#business_title_facets").html(facetResultsHTML);
216-
}
217-
``` -->
218-
219183
## Tips for working with facets
220184

221185
This section is a collection of tips and workarounds that might be helpful.

0 commit comments

Comments
 (0)