-
Notifications
You must be signed in to change notification settings - Fork 31
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
Replace "Linked Agent By Role" - new Plugin for filtering Typed Relations in search API #89
Conversation
Can be tested, feedback welcome. I'm going to try to move these fields out of search api's "General" section, and into the individual sections for "Content", "Media", etc. |
With the last commit, the fields no longer show in "General" but in the appropriate "datasource" (i.e. Content, Taxonomy Term, etc... they show up with their partner fields.) If you already had started testing before this commit, you need to remove existing fields of this type, and clear the index and "rebuild tracking information". I had trouble because it had cached the old (invalid) field definition. |
->filterForPropertyPath($search_api_fields, $item->getDatasourceId(), $property_path); | ||
foreach ($search_api_fields as $search_api_field) { | ||
// Load entity's field values. | ||
$vals = $content_entity->$field_name->getValue(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be able to use referencedEntities
here without the need to load up things I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need the rel_type
, i'm not sure that would be in the referenced entities list.
@rosiel
And the facet for this new field is not displaying/working as intended after I do a search. |
Thank you so much! I think I've fixed that now. |
Configuration schema changes here are the same as in Islandora/islandora#913 (comment). I think we may be able to re-work how these are constructed. I may give this a go and update this further. |
@jordandukart, were you able to re-work the configuration schema changes as mentioned in #89 (comment), or should we move forward with testing and merging? |
I will add "review this" PR to my to-do list for this week sometime. |
I must have something in my local "bd-isle" project that is interfering with seeing these. Would I be able to see the "Linked Agent (filtered by type) [islandora] typed_relation_filter__node__islandora_object_field_linked_agent" on the Solr index | Fields page https://islandora.traefik.me/admin/config/search/search-api/index/default_solr_index/fields? |
You might have to enable it first, under the "Processors" tab. |
Linked Agent by Type "adds the item's linked agent separately by type" was checked. This is probably conflicting with something in the bd-isle flavor site I pulled this feature branch of controlled access terms into. How do I spin up a vanilla islandora site? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once the processor has been added, the new form shows up where it should. Tested with Contributor, and an arbitrary new field.
REPLACES Replace "Linked Agent By Role" - new Plugin for filtering Typed Relations in search API #88* (my apologies for git silliness)
Other Relevant Links:
discussed recently with @seth-shaw-asu and Chris Day (no @?)
What does this Pull Request do?
Creates new "fields" (in search api) for your Typed Relation fields. You can filter what relation types get included.
This does the same thing as the Linked Agent By Role plugin on the Islandora Install Profile Demo, except without the hard-coding and without cluttering the Search API field with 271 different fields.
What's new?
New Search API Processor plugin!
(i.e. Regeneration activity, etc.)? nah.
How should this be tested?
A description of what steps someone could take to:
Additional Notes:
Any additional information that you think would be helpful when reviewing this
PR.
Interested parties
Tag (@ mention) interested parties or, if unsure, @Islandora/committers