addional replaced string in GET URL for searching different indexes
endupok - December 1, 2008 - 17:07
| Project: | External Search |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Xano |
| Status: | active |
Jump to:
Description
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.

#1
I will definitely look into this! Great suggestion :D
#2
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.
#3
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.
#4
Site administrators may now also define a default value for all fields.
#5
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]&name=[extesea] I get a "Please enter a valid URL" error.
Am I doing something wrong?
Thanks for your time.
#6
Yes, you didn't read this issue properly enough ;-)
#7
I've read it very carefully. So, you can not add a "Type" drop down menu to any Custom Engine. Is that correct?
#8
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.
#9
I understand now. Thank you.