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,
It should be able to find the abcd, I've not seen that being a problem...
well that problem (the html) happens with regular content pages as well, so it’s not an elemental issue, rather solr needs some more information on how to index that content.
not sure what field type you using, there are ways how you can use solr filters and analyzers to get rid of html or other stuff etc.. how you index and/or query these fields etc. there’s quite a lot to it
FTP works with Solr 5 & 6, at least there was a PR towards that and those changes worked fine, we used it on a project with Solr 6 a couple years back and the tweaks were minimal.
With Firesphere’s module there might be lots of moving parts other people don’t understand, you’re relying on one or two people to address all your issues at the moment, which is not the case with FTS. You weigh the pros and cons. To be precise, definitely give both a go and decide for yourself, just giving you another point of view.
That is elemental.. it indexes rendered elements (I know, don’t get me started)
And it can’t find the ‘abcd’
so after getting it to index html, it still seems a bit flakey - like solr now has the field as a htmltext, but it appears to be indexing it like text. as in this bit of text:
- \n \n\t <div class=\"element dnadesign__elemental__models__elementcontent\" id=\"e39\">\n\t<div class=\"content-element__content\">\n\t\n <p><span style=\"color: var(--text-color);\">abcd</span></p><p><span style=\"color: var(--text-color);\">efgh</span></p><p> </p><p><span style=\"color: var(--text-color);\"> qwert </span></p><p> </p>\n</div>\n\n</div>\n\n \n\t <div class=\"element dnadesign__elemental__models__elementcontent\" id=\"e38\">\n\t<div class=\"content-element__content\">\n\t\n <p>Testing content here</p><p>Home GHome Home!</p><p> </p><p>Peanut</p><p> </p><p>Maybe not at the end?</p>\n</div>\n\n</div>\n\n \n\n
@MichalKleiner I did, hmm, trying to think of how we got here. Basically I came into this channel asking questions where @firesphere directed me to his new version. The issue that I was having trying to perform the search, as I didn’t know very much about solr, pretty new to silverstripe and concerned that fts only supported solr4.
@Marcus Collier did you try the fulltext-search module that SilverStripe supports? It might be easier to get answers around that as that’s the “standard” of sorts nowadays… Firesphere is doing some development on his search module, which is great and will benefit the community, but it’s not a widely adopted solution yet.
Yeah, hmmm, I forgot I added the casting check! 🤣
I’ve got another workaround to the html issue - I managed to look to see how it determined the ‘type’ the field was, and found that I could inject a $casting property into my sitetree extension.
- private static $casting = [
- 'ElementsForSearch' => 'HTMLFragment',
it now sees it as a htmlfragment and configures the solr schema accordingly! This is possibly a cleaner solution, as you can tailor the type to the method.