Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework the way that indexable entity types are configured and how properties from this is selected on search query rules #8

Open
soen opened this issue Nov 28, 2016 · 0 comments
Milestone

Comments

@soen
Copy link
Owner

soen commented Nov 28, 2016

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.

@soen soen added this to the v1.0 milestone Dec 8, 2016
@soen soen modified the milestones: v1.3, v1.0 Jan 22, 2017
@soen soen modified the milestones: v1.1, v1.2 Feb 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant