Closed Sogl closed 1 year ago
as far as i now instant search can only search 1 index at a time.
you could create a custom search class that searches pages and then flex objects and stores them in one index. I've not attempted this though, and don't have any example code.
Tried with Crawl class without success because I use access.site.login: true
on most pages.
So I created my class based on PageSearch: https://gist.github.com/Sogl/78dce78b254b39a6678f759b3ff981b7#file-gravflexpagesearch-php
It works fine.
I have two indexes:
pages
for default pagesflex
for my Flex objects (https://github.com/getgrav/grav-premium-issues/issues/339)How do I simultaneously work with them in
instantsearch
? Or how can I put both into one index? They have the same structure.