Is it possible for you to code another replaced string into the GET requests of custom search engines?

Many engines can search different indexes based on an additional parameter passed via GET URL. On the admin page, a user could enter index names and variable values which could be collected into a drop down menu in the resulting block's Drupal form.

So, it would be great if Extesea could turn something like this custom engine URL:
http://mybookstore.com/?index={index}&search={extesea}

Into:
http://mybookstore.com/?index=subject&search=open+source+software
or
http://mybookstore.com/?index=author&search=Smith+John

Thanks for your consideration. Great module.

Comments

xano’s picture

I will definitely look into this! Great suggestion :D

xano’s picture

Assigned: Unassigned » xano

I have just added technical support for extra tokens. Several predefined engines have been given such tokens. While this is purely technical, users will this feature as an extra select list displayed in search forms if the engine in question uses an extra token in the URL. This way users may, depending on the engine, decide to search in a certain language only or to search through a subset of a website's content.

In the near future site administrators will be able to decide which of those options are indeed available to users and they will be able to add tokens to custom search engines.

xano’s picture

Since the previous commit some predefined engines come with so called fields users can use to add extra parameters to search queries; the language they would like to search in, for instance. Site administrators now are able to configure which field values are accessible to users on a per field basis.

xano’s picture

Site administrators may now also define a default value for all fields.

endupok’s picture

Hi Xano.

I was really excited to see that you had worked on this, but I can't get a custom engine to display an extra select list when I add an additional token to its URL.

For example, when I add a custom engine with the URL http://library.med.nyu.edu/library/eresources/php/search.php?type=[index... I get a "Please enter a valid URL" error.

Am I doing something wrong?

Thanks for your time.

xano’s picture

Yes, you didn't read this issue properly enough ;-)

endupok’s picture

I've read it very carefully. So, you can not add a "Type" drop down menu to any Custom Engine. Is that correct?

xano’s picture

Not yet. As I said the code for applying and rendering fields for engines is there, but there is no interface yet to actually add new fields to engines. Since predefined engines have predefined fields, they can function without that interface.

endupok’s picture

I understand now. Thank you.

xano’s picture

Assigned: xano » Unassigned
gaurav.kapoor’s picture

Issue summary: View changes
Status: Active » Closed (outdated)