You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, you have to define the indexable entity type by fully qualified namespace on the search query root item. In addition, for each search query rule, you have to specify the property name of the given indexable entity type that you want to perform the rule on. Although this works, this approach is prone to error, since both inputs are defined using a textbox without any kind of validation - the UI should handle this a bit more elegantly.
A solution to this could be to have a dropdown for selecting indexable types enumerate all assemblies in the Sitecore solution, and list all types that inherit from the IndexableEntity type. Then for search query rules, we could also use a dropdown, whereas the source of the property names must come from the configured indexable entity type set on the search query root item.
In terms of getting the correct elements displayed in the dropdown menus, one way would be to override the Sitecore.Pipelines.GetLookupSourceItems pipeline, and implement a specific pipeline for retrieving the types of indexable entity types as well as getting the fields of the selected indexable entity type using reflection. This blog post provides a good starting point for doing this: http://blog.rauljimenez.co.uk/getting-to-the-source/. The other alternative would be to create custom field types for each of the two, but that seems a bit over the top to do.
The text was updated successfully, but these errors were encountered:
Currently, you have to define the indexable entity type by fully qualified namespace on the search query root item. In addition, for each search query rule, you have to specify the property name of the given indexable entity type that you want to perform the rule on. Although this works, this approach is prone to error, since both inputs are defined using a textbox without any kind of validation - the UI should handle this a bit more elegantly.
A solution to this could be to have a dropdown for selecting indexable types enumerate all assemblies in the Sitecore solution, and list all types that inherit from the IndexableEntity type. Then for search query rules, we could also use a dropdown, whereas the source of the property names must come from the configured indexable entity type set on the search query root item.
In terms of getting the correct elements displayed in the dropdown menus, one way would be to override the
Sitecore.Pipelines.GetLookupSourceItems
pipeline, and implement a specific pipeline for retrieving the types of indexable entity types as well as getting the fields of the selected indexable entity type using reflection. This blog post provides a good starting point for doing this: http://blog.rauljimenez.co.uk/getting-to-the-source/. The other alternative would be to create custom field types for each of the two, but that seems a bit over the top to do.The text was updated successfully, but these errors were encountered: