5 users online. Create an account or sign in to join them.Users

Search

Hey guys, I found one old mention of Sphider search, so it doesn’t seem like I’m the first one to find this project. I installed it over the weekend and even was able to create an XML results page that I was thinking I could pull in as a datasource or through a jQuery AJAX call something like this.

I thought it might be a cool way to go, but I ran into one issue when I figured out that it doesn’t use UTF-8. I also have no idea how to create a custom datasource, so I would have to go with the jQuery approach. Has anyone else experimented around with Sphider or other similar programs? Did you get them working with Symphony?

I guess I was just looking to see if there were other options other than the standard Google and Yahoo ones that people have already mentioned.

Looking at the search.php that comes with Sphider it looks pretty easy to get the results from the get_search_results function, so it would definitely be possible to write this into a custom DS.

I ran into one issue when I figured out that it doesn’t use UTF-8

What was the specific problem where UTF-8 wasn’t output?

Yeah, the search mechanism seemed pretty simple. I was thinking I could somehow just write XSL variables into the javascript where it required a URL, but a datasource would probably be the better way to go.

Ummm, I’m not 100% sure about the UTF-8 thing, I’m only a little familiar with encoding and how it affects pages. I guess I assumed that since Sphider uses ISO-8859-1 and Symphony uses UTF-8, that I might get goofy characters. You can see the results that I’ve got right now by going here.

Overall, I thought the functionality was pretty close to what you could achieve through Google Custom Search.

I used Sphider in tandem with Symphony for a project a year or two back. It worked alright, but was a pretty messy mish-mash of code (the Sphider codebase is terrible). To get it to work I changed all the Sphider templates to return the results as XML rather than HTML pages and simply queried them with a Dynamic DS.

Any chance you might be able to share that datasource? Did you have to change anything about encoding? Or did that work itself out?

This would make a great extension, even if it is a bit messy.

a little off topic, but how is the search done on this site?

I had a look in the forum ensemble and it’s… Complicated. I couldn’t see a way of pulling that out into it’s own extension, which is too bad as a text field for searching is something I really wish Symphony could do more easily.

As I mentioned, it’s really just a standard Dynamic DS combined with some tweaks to the Sphier output—I’ll see if I can dig up the setup I used, though I have a few other Symphony-related things on my todo list first so no promises.

Well if you do Makenosound, I’ll owe you a beer!

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.2 or above
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.0 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details