Does the SiteSearch plugin support searching in a multisite tailor model?
I have integrated it as follows:
siteSearch:
providerBadge: null # Display this beside each search result.
pageName: 'camps/camp-details' # Filename of the target CMS page, used to build links.
searchFields: # Fields to search in.
- title
- description
thumbFrom: image # Use the `image` field as thumbnail. Must be a fileupload.
resultFields:
title: title # Use the "title" field as the search result title
text: description # Use the "description" field as the search result text
I would like to return the current site content. If I search in default language content, it is works well, but if I switch to another language and I woult like to search the translated content, does not return anything.
I observed that it search only in default language.
siteSearch:
providerBadge: null # Display this beside each search result.
pageName: 'about-us/child-story' # Filename of the target CMS page, used to build links.
# urlParams: # Given a page URL: /target-cms-page/:slug/:something
# slug: $slug # Use the value of the "slug" field, since it is prefixed with a "$"
# something: else # Use the literal string "else", since there is no $-prefix
# the output is: /target-cms-page/slug-field-value/else
# See "Custom URL Resolver" below
# This is used *instead of* pageName + urlParams
# urlResolver: '\App\Provider::resolveSiteSearchUrl'
searchFields: # Fields to search in.
- title
- description
thumbFrom: image # Use the `image` field as thumbnail. Must be a fileupload.
resultFields:
title: title # Use the "title" field as the search result title
text: description # Use the "description" field as the search result text
I am still facing with this issue, or am I doing something wrong?
@ngyzsolt your blueprint looks okay. I am still unable to reproduce the issue. If I search on my primary site, the primary site content is displayed. If I switch to the secondary site, the secondary content is displayed.
I wonder if your multisite setup is not right? Do you see the right content on other pages if you switch to the seconary site?
Maybe you are able to debug this issue yourself. The query is happening here:
If you add a ->dd() before the ->get() you’ll see the results. You can debug the generated query there.