Message of the day:
For questions about Solr and the fulltextsearch module, or any general search-related topics. Complaints and feature requests also welcome! https://github.com/silverstripe/silverstripe-fulltextsearch,
For questions about Solr and the fulltextsearch module, how to configure it to do common (or not so common) things, or any general search-related topics. https://github.com/silverstripe/silverstripe-fulltextsearch,
Anyone had issues getting basic SilverStripe search (
FulltextSearchable::enable([SiteTree::class]);) returning results with
silverstripe/fluent installed? I've got the error below. Fluent is hooking into the
augmentSQL extend and altering the where clause to use a table that doesn't exist. I've seen Fluent create table names but call a table
AS the localised table name and not just calling the localised table name. Thought maybe I'm missing some configuration or something. All I've done is enable FulltextSearchable on SiteTree, and added
$SearchForm to the front-end.
TractorCow\Fluent\Extension\FluentExtension hooks into augmentSQL extend provided by SilverStripe\ORM\DataQuery->getFinalisedQuery::335 and alters table to include locale in table name: https://github.com/tractorcow-farm/silverstripe-fluent/blob/master/src/Extension/FluentExtension.php#L346
- Exception has occurred.
- SilverStripe\ORM\Connect\DatabaseException: Couldn't run query:
- SELECT DISTINCT count(*)
- FROM "SiteTree_Live"
- WHERE (
- MATCH (Title, MenuTitle, Content, MetaDescription) AGAINST ('query*' IN BOOLEAN MODE)
- + MATCH (Title, MenuTitle, Content, MetaDescription) AGAINST ('query*' IN BOOLEAN MODE)
- AND ShowInSearch <> 0)
- AND (("SiteTree_Localised_en_US"."ID" IS NOT NULL))
ah, you’re not using the solr based module
FulltextSearchable::enable([SiteTree::class]); seems to do it
add a filter condition to your query or remove the File class from the index
is there a way to exclude files from search results, to give the CMS editors time to go and set permissions on assets?
ah, found that it's returning files from assets
I believe fulltextsearch already does that - each result checks the canView method
is it possible for search to only show results that the current user has access to?
Ok cool thanks, just needed a sanity check 😂 Ill just let it keep running for a bit longer
The first reindex will spawn others if it needs to