Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Improving the indexed search options...

Quote Reply
Improving the indexed search options...
Right,

being a bit of a Perl hacker, I really fancy getting some more options into that indexed search, basically so I can do -

+"men behaving badly" -Gary +Martin Brit*

Which will get all documents containing "men behaving badly" with "Martin", but exclude those which have the word "Gary" in them. Also get any words which have Brit at the start of them (only 3/4 letters more mind you)

Anyway, I'll have to start out small, so I'd like to get +keyword, -keyword and keyword* working firstly.

What I need is a bit of assistance in hacking this into search.pm. Apart from a complete rewrite which is just a little out of my league, it could be a pretty cool hack. I'm thinking the best way to approach this is to return some extra data from sub _tokenize. This information would be all the words which we don't want and those which have a star after them. It would mean parsing the string a little differently to categorise those words with "-" in front and a * at the end of them. In the appropriate subs (currently) _get_by_intersection and _get_by_union we then parse those terms a little further.

For the "-" operator we need to add, - NOT LIKE % $variable % - and if it has a * on the end, it gets - NOT LIKE % $variable % % - obviously the appropriate negation if it is exact matching we're going for.


So anyway, there are some initial ideas, I'll have a hack away to see if I get it, and it would be great if others could take a look and maybe make comment on the above.


cheers,


tom

Quote Reply
Re: Improving the indexed search options... In reply to
Hi,

If you grab 2.0, these features are already all supported. =)

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: Improving the indexed search options... In reply to
Haha, but then it's no fun and I don't improve my Perl skills.

So if people are interested in this mod, come forward and say !

Quote Reply
Re: Improving the indexed search options... In reply to
Edit: My mind was wandering.

Mods:http://wiredon.net/gt/download.shtml
Installs:http://wiredon.net/gt/


Quote Reply
Re: Improving the indexed search options... In reply to
Possibly the $450 cost and the fact they already use 1.x and don't wish to upgrade... "lol"


Paul, just like the modifications you sell, which involves adding your code into the code Gossamer has already written, I'm hoping it won't involve "overwriting" anything. Simply, like yours, adding only.

tom

Quote Reply
Re: Improving the indexed search options... In reply to
People who don't have Links SQL won't need the extra search options and people who do can upgrade for free so the $450 cost is irrelevant.

Fair enough for those who don't wish to upgrade...go for it.


Mods:http://wiredon.net/gt/download.shtml
Installs:http://wiredon.net/gt/


Quote Reply
Re: Improving the indexed search options... In reply to
You could download a copy of v2.0 and try to port the code over to Links SQL 1.1

Mods:http://wiredon.net/gt/download.shtml
Installs:http://wiredon.net/gt/


Quote Reply
Re: Improving the indexed search options... In reply to
Also, the Search.pm is really a mess in Links SQL 1, it got a well needed overhaul in 2. I'll warn you now, that trying to mod the indexer and search system in 1 will be _very_ difficult. Definately not an easy task.

Cheers,

Alex

--
Gossamer Threads Inc.