Search Index
This is an open discussion with 405 replies, filed under Extensions.
Search
Hi all,
Hopefully someone can help me with a problem passing the get parameters when using this extension with the datasource for multiple sections.
It's working perfectly if I use a URL such as "/search/?keywords=test§ions=section1,section2"
But, when I use a form with checkboxes to get "/search/?keywords=test§ions[]=section1§ions[]=section2", I'm getting this PHP error from the datasource:
explode() expects parameter 2 to be string, array given
Caused by line 94:
foreach(array_map('trim', explode(',', $param_sections)) as $handle)
However, as far as I can see, line 85 should make sure the array is turned into a string:
if(is_array($param_sections)) implode(',', $param_sections);
So, any ideas why it's still getting an array and giving an error? (The curse of a little knowledge - I can read the datasource and it looks like this shouldn't happen, but I can't fix it :) )
Any help appreciated.
Fish
@cotiunix: It's some time ago you asked but I'll send a solution now anyway. The datasource of search index only gives you an excerpt and an id, no title or anything. The trick is to create a new ds (e.g. named posts-search) that is filtered to the entries found by search index. Filter to the id and as filter criterion insert {$ds-search.id}
. Add this ds to your search page. Now you can build xml that the title; for adding the except as well, your xml will look similar to this:
<xsl:apply-templates select="/data/posts-search/entry"/> <xsl:template match="/data/posts-search/entry"> <li> <xsl:value-of select="title"/> <xsl:copy-of select="/data/search/entry[@id = current()/@id]"/> </li> </xsl:template>
I love this extension! Thanks for making it and thanks for the update that allows to run it with 2.3.3.
I am building a German website and pages have characters like ä, ö and ü. The extension's search datasource looses these characters and replaces them against ä and others. The show up like this already in the xml output (I checked with debug). With my own datasources I don't have this problem. Can anyone help how to get the right output?
@mprofitl, thank you for the answer; also you might find this useful for the issue you have
https://github.com/symphonists/search_index/issues/44
@cotiunix: Thank you very much for the link, it perfectly solved my problem!
Has anyone tried using Search Index
with 2.4RC1
?
You mean Search Index? It says:
WARNING: this extension is compatible with Symphony 2.2 only!
:-)
AFAIK, it has been deprecated long time ago in favour of using Elasticsearch.
I think it's pretty much up to date,
I think i used it on a 2.3.6 install and worked without any problems, but i am having trouble locating symphony's version number anywhere, where can i find it?
With Symphony 2.3.x, the version number is at the bottom left on the extensions page.
Still, the extension has been deprecated, so I think you might be on your own.
Thanks, found it, got a working search index extension (0.9.2) on a symphony 2.3.4 install.
Are you sure it's deprecated? Looks like it's been revived by the symphony comunity...
Looks like it's been revived by the symphony comunity…
’tis :)
And it’s listed as compatible up to 2.3.6
on the Symphony Extensions site. Still I’m a bit hesitant about 2.4
.
I will be using this myself, and have already started updating it for 2.4
Keeps your eyes peeled, I will report back here.
peel
@John Any progress on this?
Ugh, it got pulled from the project.
I will try and find some time this week though.
No hurry, I’m just curious.
As long as there is no SSM-replacement for 2.4
, I will be stuck with 2.3.x
with most of my projects anyway :/
Hello designermonkey,
do you think you might find some time to make it compatible with 2.4? I am using the search index extension on a project soon to be finished, and after I updated to 2.4 I can still search but I cannot change any settings what to index. If you can't, I will take a headache tablet and try to get elastic search running (it looks quite tricky).
Thanks for letting me know Moritz
Hi all,
I see rumours above of depreciation; I hope not. Both Search Index and Elastic Search seem 'active' on Github (2 years ago)...?
I have this issue on a 2.3.4 Symphony installation at the moment:
Cant handle "&" when indexing (open issue on Github). To elaborate, only if an ampersand is pulled as an excerpt, an XSLT processing error occurs: loadXML(): xmlParseEntityRef: no name in Entity, line: 310. /var/www/.../symphony/lib/toolkit/class.xsltprocess.php:135. If Search Index has been abandoned, has anyone got any pointers as to how I might go about a dirty fix for this? I have basic PHP skills.
Thanks
do you think you might find some time to make it compatible with 2.4? I am using the search index extension on a project soon to be finished, and after I updated to 2.4 I can still search but I cannot change any settings what to index. If you can't, I will take a headache tablet and try to get elastic search running (it looks quite tricky).
You're fortunate, if attempting to install on a fresh 2.4 I just get Symphony Fatal Error: Call to undefined method Administration::saveConfig()
:(
Create an account or sign in to comment.
is it possible to include both title and excerpt not just id and the excerpt ?
like:
thank you