[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Webglimpse Home]
Re: matches displayed per page
Hi Jonathan - actually there is a module that limits exactly this and also caches the search results, but its part of the commercial version. Its the ResultCache.pm module. You could hack something directly but its a bit of work - if you're willing to do that much work I'll give you something much easier and swap for the ResultCache module ;-) Even some docs for version 2.X - I've been quite a bit behind writing up nice docs, since I like to work on the code better - if you'd write some install instructions I'll be happy to give you the commercial modules in exchange. (And that offer goes for anyone else on the list too!)
If you're determined to do your own caching module I can give you some pointers, you have to write glines to a temp file and then pass extra information to access the Nth set of hits. But its not a 1-line hack...
Regards,
--G
>
> Dear All
>
> I have recently installed webglimpse and am trying to customise the output to fit in with our
> website. One of things i would like to do is to limit the number of matches displayed on any one
> page (as opposed to the number of matches returned). I have webglimpse 1.7.11 with Glimpse
> 4.12.5. I have, i think, a non-commercial version as we are a non profit.
>
> I have looked for a place where i can find the number of matches ( that is the number fo files in
> which there is a match) and use this combined with the number_of_
> matches_to_be_displayed_per_page to give the user either the next or previous set of matches.
>
> I believe (though i please tell me if i am wrong) that i could use the array @glines to accomplish
> this.
>
> I would like to understand the structure of each line ( i have added a line to webglimpse which
> goes through the array and prints it in set of comments;)
>
> To save you reading through it if you do not want to, my version is given at the end of this email.
> But has anyone else done limited the matches displayed per page and if os what methods how
> has it been done?
>
> Regards
>
> Jonny
>
> My idea on structure of an @glines element. I think that every match in a file is listed as a
> separate element in the array, giving of course lots of repeats in terms of file names though the
> macthing line for each element will be different.
>
> I think it is this:
>
> [Filename][SPACE][Url][SPACE][Title][SPACE][Date][SPACE][Matching_Line][Line -
> Break][$gline[0]]
>
> where $gline[0] is the first element of the array for example we get:
>
> /home/nacvs/www/networking/documents/learningnet/arc0201.txt
> http://www.nacvs.org.uk/networking/documents/learningnet/arc0201.txt: Mar 5 2001: trainer
> director for the North, which may be helpfull. I've passed on your
> /home/nacvs/www/networking/documents/learningnet/arc0201.txt
> http://www.nacvs.org.uk/networking/documents/learningnet/arc0201.txt: Mar 5 2001: trainer
> director for the North, which may be helpfull. I've passed on your
>
> as the first element and
>
>
> /home/nacvs/www/events/index.shtm http://www.nacvs.org.uk/events/index.shtm Events: Feb 26
> 2001: <META NAME="keywords" CONTENT="calendar, events, nacvs, council, for, voluntary,
> service, action, organisations, organisation, organization, organizations, councils, national,
> association, charity, charities, community, trainer, trainers, training, funding, advice, information,
> services, gay, lesbian, bisexual, black,network, networking, compact, compacts">
> /home/nacvs/www/networking/documents/learningnet/arc0201.txt
> http://www.nacvs.org.uk/networking/documents/learningnet/arc0201.txt: Mar 5 2001: trainer
> director for the North, which may be helpfull. I've passed on your
>
> as the second
>
>
>
>
>
>
> ___________________
> Jonathan Feldman
> IT Officer
> NACVS
> Floor 3, 177 Arundel Street
> Sheffield, S1 2NU
>
> Tel 0114 278 6636
> Fax 0114 278 7004
>