Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Fuzzy Search

Quote Reply
Fuzzy Search
Hi,

Im sure someone has come up with this solution...

When I search say for "house" "houses" doesnt come up. Im only talking about the plural "s" option... Or can we take it further?
In my searches, partial matches dont come up.
When I search for "house" something like "house-for-sale" does not come up.

How can I fix it? Is there a way?

Thanks,

JC
Quote Reply
Re: [Gorospe] Fuzzy Search In reply to
Hi,

Have you tried substring=1 on trhe URLs?

This is the code in search.html:

<div class="searchoption">
<input id="substring-1" name="substring" value="1" class="radio" type="radio"><label for="substring-1">Find similar words</label>
<input id="substring-0" name="substring" value="0" checked="checked" class="radio" type="radio"><label for="substring-0">Find exact words</label>
</div>

..basically, pass in substring=1 and it will do partial pathes (i.e "house" would match "houses") - or substring=0 to require EXACT matches.

Hope that helps.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Fuzzy Search In reply to
Thanks Andy, how about passing it on the normal search and not in the advanced search? Here is my normal search code:

Code:


<form action="<%config.db_cgi_url%>/search.cgi">

<input type="text" id="searchbox" name="query" value="<%if query%><%escape_html query%><%endif%>" class="text" size="39" style="font-family: Verdana; font-size: 12pt" />

<%selected_value_field('Categoria')%>
<select name="Categoria"><option selected value="*">Todas las Categorías</option>
<%loop selected_values%>
<%if checked%>
<option value="<%value%>" selected>
<%name%>
</option>
<%else%>
<option value="<%value%>">
<%name%>
</option>
<%endif%>
<%endloop%>
</select>


<%selected_value_field('Pais')%>
<select name="Pais"><option selected value="*">Todos los Países</option>
<%loop selected_values%>
<%if checked%>
<option value="<%value%>" selected>
<%name%>
</option>
<%else%>
<option value="<%value%>">
<%name%>
</option>
<%endif%>
<%endloop%>
</select>


<input type="image" SRC="/imagenes/buscar.gif" name="Buscar" value="Buscar" class="submit" />
</form>

Last edited by:

Gorospe: Jul 22, 2008, 7:48 AM
Quote Reply
Re: [Gorospe] Fuzzy Search In reply to
Hi,

You could maybe add a "checkbox" on the search:

Code:
<input name="substring" value="1" type="checkbox"> Find similar words

..and if they tick that, then it will add substring=1 to the query - and hopefully do what you want :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Fuzzy Search In reply to
Sorry to bug, but what if I dont want a checkbox? I want to include it automaticly in the search string.

:)

Dont hate me.
Quote Reply
Re: [Gorospe] Fuzzy Search In reply to
Just do it as a hidden field then ;)

<input name="substring" value="1" type="hidden">

Angelic

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Fuzzy Search In reply to
Doesnt matter what other people say Andy, it´s thanks to you that we, little people, are all still here.
Thanks,

Juan Carlos
Quote Reply
Re: [Gorospe] Fuzzy Search In reply to
Thanks Angelic

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Gorospe] Fuzzy Search In reply to
You can also try: Admin > Setup > Search Options > search_substring