Gossamer Forum
Quote Reply
advanced search features
Hi,

Is anybody has tried to implement some advanced search features like "begins with", "related to", "synonyms" in the search.cgi function?

Thanks for your answers,

Vercyb
Quote Reply
Re: [vercyb] advanced search features In reply to
There are several options already implemented in search:
Quote:
Options:
- paging
mh : max hits
nh : number hit (or page of hits)
sb : column to sort by (default is by score)

- searching
ww : whole word
ma : 1 => OR match, 0 => AND match, undefined => QUERY
substring : search for substrings of words
bool : 'and' => and search, 'or' => or search, '' => regular query
query : the string of things to ask for

- filtering
field_name : value # Find all rows with field_name = value
field_name : ">value" # Find all rows with field_name > value.
field_name : "<value" # Find all rows with field_name < value.
field_name-gt : value # Find all rows with field_name > value.
field_name-lt : value # Find all rows with field_name < value.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [vercyb] advanced search features In reply to
The alpha_bar plugin will allow you to search by beginning of word, and also for 1 or 2 characters, something disabled for the most part in Links.

It's not well named, and it was supposed to be something else, but it works on 2.x sites, not sure if it works with 3.x yet.


PUGDOG´┐Ż Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [webmaster33] advanced search features In reply to
Hello,

I seek a solution and impossible to find on the forum.

I want to obtain the events between two dates.
search.cgi?query=&Day-gt=2005-06-08&Day2-lt=2005-06-12

For :
<input type="text" name="Day-gt">
<input type="text" name="Day2-lt">

But, the result excludes the 2005-06-08 and 2005-06-12.

I obtained a result with this.

search.cgi?query=&Day=>=2005-06-08&Day2=<=2005-06-12
The result includes the dates.

But, how to use => or <= with the form of search (search.html)?
It is possible to filter => or <= ?

Such as for example for this.
field_name-gt : value # Find all rows with field_name > value.
field_name-lt : value # Find all rows with field_name < value.

<input type="text" name="Day-gt">
<input type="text" name="Day2-lt">


I do not see how to use the filter on the page of option of search.


You have an idea?

Thank you for your assistance.

Michel
Quote Reply
Re: [mick31] advanced search features In reply to
Yes,
<input type="text" name="Day-gt">
is the way you should use it.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] advanced search features In reply to
Hello Webmaster,

But, Day-gt excludes the date.

It is possible to filter >= or =< ?

In the example, the result turns over the higher data (>) 2005-06-08. But how to include 2005-06-08 in the result (=) and higher (>) ?

You have an idea ?

Thank you.

Mick
Quote Reply
Re: [mick31] advanced search features In reply to
Well, the following features should be available in LSQL GT::Search module:
field_name-ge : value # Find all rows with field_name > value or equal.
field_name-le : value # Find all rows with field_name < value or equal.
However I think currently it's not available.


search.cgi?query=&Day=>=2005-06-08&Day2=<=2005-06-12
This creates the following condition:
2005-06-08 < Day < 2005-06-12


Currently might be a woraround for this, to include an equal condition:
search.cgi?query=&Day-gt=2005-06-08&Day-lt=2005-06-12&Day=2005-06-08&Day=2005-06-12

This theoritically creates the following condition:
2005-06-08 <= Day <= 2005-06-12


This might do the condition you need.
Correct me if you want something else. I might not understand your words correctly.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...