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

WSFields not showing up in Search Index #21

Open
LordBarnhill opened this issue Feb 2, 2018 · 3 comments
Open

WSFields not showing up in Search Index #21

LordBarnhill opened this issue Feb 2, 2018 · 3 comments

Comments

@LordBarnhill
Copy link

When I attempt to create a search index for my content type none of the WSFields in that content type appear in the list of fields available for that index.

@morinluc0
Copy link
Collaborator

After doing some research it looks like this will require a data source plugin.
Similar to what was done in this issue.

https://www.drupal.org/project/search_api/issues/2826685

@morinluc0
Copy link
Collaborator

So implementing a custom data source would be like adding a new index-able element, not a field on a index element.

Search API excludes all computed properties, so we may need to rethink how to do this.
https://cgit.drupalcode.org/search_api/tree/src/Plugin/search_api/datasource/ContentEntity.php#n369

@spotzero thoughts ?

@morinluc0
Copy link
Collaborator

commenting out that code "fixes" the issue meaning the fields show up and can be indexed.

https://gist.github.com/morinluc0/eac89d7a62d369089d1cfef0e0fd8262

manage fields for search index test content drupal 8
example index index test content drupal 8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants