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

Difficult to create arrays of items on an index #90

Closed
blueo opened this issue Nov 1, 2023 · 2 comments
Closed

Difficult to create arrays of items on an index #90

blueo opened this issue Nov 1, 2023 · 2 comments

Comments

@blueo
Copy link
Collaborator

blueo commented Nov 1, 2023

Currently it is quite difficult to index an array that is created by a custom function.
You can use the dot notation to index a relation eg Tags.ID and this will result in an array of IDs however you don't seem to be able return an array from a custom property and have it indexed eg

in search config

    App\MyObject:
          fields:
            some_field:
              property: getMyArrayOfThings
public function getMyArrayOfThings(): array
{
   return // do something that returns an array
}

this would be really useful for creating custom indexes and I think quite intuitive - eg returning an array should create an array on the index. Maybe I'm missing something here so open to correction on how this works.

@blueo blueo changed the title Difficult to create arrays of items on an elastic index Difficult to create arrays of items on an index Nov 1, 2023
@lukereative
Copy link
Contributor

I've implemented a change which allows this (at least with Elastic) in #97

@blueo
Copy link
Collaborator Author

blueo commented May 21, 2024

fixed by #97

@blueo blueo closed this as completed May 21, 2024
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