Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

RE: [mv] Site Search (HTML) Using Glimpse



******    message to minivend-users from "Cameron B. Prince" <cbp@InternetExpertsLLC.com>     ******

Thanks for your reply...

My original index command line was:

glimpseindex -H . -X *.html

This is as Mike H. suggests in:

http://www.minivend.com/minivend/minivend-list/1997/0065.html

I then switched to:

glimpseindex -b -H . *.html

as you suggested after doing a search from the prompt (glimpse -H . keyword)
and not finding anything with my original index command.

I did discover from my original post of this message that my form was
screwed. I fixed this and added a new submit button, but this wasn't the
problem.

I now have this for the search form:

<FORM ACTION="[process-target]" METHOD=POST>
<INPUT TYPE=text NAME="mv_searchspec" SIZE=20>
<INPUT TYPE="hidden" NAME="mv_doit" VALUE="search">
<INPUT TYPE="hidden" NAME="mv_searchtype" VALUE="glimpse">
<INPUT TYPE="hidden" NAME="mv_base_directory" VALUE="pages">
<INPUT TYPE="hidden" NAME="mv_return_file_name" VALUE="yes">
<INPUT TYPE="hidden" NAME="mv_record_delim" VALUE="NeVAiRbE">
<INPUT TYPE="hidden" NAME="mv_index_delim" VALUE="&#10;&#10;">
<INPUT TYPE="submit" Value="Search">
</FORM>


and this for the results page:

[[perl]
my $search = <<'EndOfSearch';
[search-list][item-code]

[/search-list]
EndOfSearch

my @records = split /\n+/, $search;

$out = '';
foreach $hit (@records) {
$hit =~ s/^(\S+)\s+(.*):?\s*\n//;
$filename = $1;
$title = $2;
$filename =~ s/\.html$//;
$out .= "[page " . $filename . "] <B>$title</B> </A><BR>";
}
$out;
[/perl]]


and the errors are the same:

Runtime error: Can't use string ("
> cgi.html:
> NeVAiRbE<HTML>
> <HEAD>") as an ARRAY ref while "strict refs" in use at
/usr/local/minivend/lib/Vend/Interpolate.pm line 3172.



I am just a beginner with perl and I am not sure what is going on here. The
patch the Mike suggested in the post I mentioned previously was not included
with future versions of Minivend that I can tell, and it's become
deprecated.

What's on my mind is how are others handling site searches if not using an
external script?


I would like to get this going so that all my pages will be Minivend pages.

I hope maybe one of the more advanced perl programmers here will help me
look into this and get it working.


Thanks again for your comments,


Cameron



-----Original Message-----
From: owner-minivend-users@minivend.com
[mailto:owner-minivend-users@minivend.com]On Behalf Of Russ Smith
Sent: Friday, June 02, 2000 4:43 PM
To: minivend-users@minivend.com
Subject: Re: [mv] Site Search (HTML) Using Glimpse


******    message to minivend-users from Russ Smith <goldstats@yahoo.com>
******

Funny,

I think you are missing a space in your Glimpse
command. Just last night I was able to enable
Glimpse with the command

glimpseindex -b -H . products.txt

This was entered exactly as the DOCS stated @
http://www.minivend.com/minivend/docindex/12.02.Glimpse.html

My problem now though, I want to break the data
down via the

split -100 file file
glimpseindex -b -H . products.txt


But I get permission denied....mmmm

But, my search on 17K products is at 2-3 seconds,
so oh well, enjoy what I got.



--- Internet Experts LLC
<iellc@http.InternetExpertsLLC.com> wrote:
> ******    message to minivend-users from
> Internet Experts LLC
> <iellc@http.InternetExpertsLLC.com>     ******
>
> Hi list,
>
> I have now fully converted all of my external
> CGI scripts to Minivend functions, with the
> exception of the site search.
>
> I have searched the list exhaustively and the
> best thing I have found is:
>
>
http://www.minivend.com/minivend/minivend-list/1997/0065.html
>
> Mike H. provides info here for using Glimpse to
> search the pages directory. I have followed
> this to the best of my ability as well as other
> threads about Glimpse, but as the message is
> from '97, I fear that it's no longer completely
> valid.
>
> Here's what I have done so far:
>
>
> Installed Glimpse
>
> ran glimpseindex -H . -X *.html in the pages
> directory.
>
> Index-directory:
> "/var/lib/minivend/iellc/pages"
> Glimpse-files created here:
> -rw-------   1 minivend users        1080 Jun
> 2 10:43 .glimpse_filenames
> -rw-------   1 minivend users         292 Jun
> 2 10:43 .glimpse_filenames_index
> -rw-------   1 minivend users           0 Jun
> 2 10:42 .glimpse_filetimes
> -rw-------   1 minivend users       34492 Jun
> 2 10:43 .glimpse_index
> -rw-------   1 minivend users         116 Jun
> 2 10:43 .glimpse_messages
> -rw-------   1 minivend users      108314 Jun
> 2 10:43 .glimpse_partitions
> -rw-------   1 minivend users        3618 Jun
> 2 10:43 .glimpse_statistics
> -rw-------   1 minivend users      262144 Jun
> 2 10:43 .glimpse_turbo
>
> When I search using glimpse -H . keyword, I
> find nothing.
>
> I changed to glimpseindex -b -H . *.html
>
> When I search using glimpse -H . keyword, I get
> results.
>
>
> Added this to the catalog.cfg and restarted:
>
> glimpse   /usr/local/bin/glimpse -H
> /var/lib/minivend/iellc/pages
>
>
>
> Made a test page with these contents:
>
>
>
> <FORM ACTION="[process-target main]"
> METHOD=POST>
> <INPUT TYPE=text NAME="mv_searchspec" SIZE=20>
> <INPUT TYPE="hidden" NAME="mv_doit"
> VALUE="search">
> <INPUT TYPE="hidden" NAME="mv_searchtype"
> VALUE="glimpse">
> <INPUT TYPE="hidden" NAME="mv_base_directory"
> VALUE="pages">
> <INPUT TYPE="hidden" NAME="mv_return_file_name"
> VALUE="yes">
> <INPUT TYPE="submit" NAME="mv_index_delim"
> VALUE="

">
> <INPUT TYPE="hidden" NAME="mv_record_delim"
> VALUE="NeVAiRbE">
> </FORM>
>
>
>
> Commented out the contents of the results page
> and added this:
>
>
> [[perl]
> my $search = <<'EndOfSearch';
> [search-list][item-code]
>
>
> [/search-list]
> EndOfSearch
>
>
> my @records = split /\n+/, $search;
>
>
> $out = '';
> foreach $hit (@records) {
> $hit =~ s/^(\S+)\s+(.*):?\s*\n//;
> $filename = $1;
> $title = $2;
> $filename =~ s/\.html$//;
> $out .= "[page " . $filename . "] <B>$title</B>
> </A><BR>";
> }
> $out;
> [/perl]]
>
>
> Why is perl inside another set of []?
>
>
> When I looked at Vend/Glimpse.pm I can't find
> the line that Mike says should be modified.
>
>
> I went ahead and tried the search and here's
> what I get:
>
>
> Search results -- keyword
> [] perl
> ] perl
> ]
>
>
> And in error log:
>
>
> [02/June/2000:11:00:05 -0500] iprocess.html
> Runtime error: Can't use string ("
> > cgi.html:
> > NeVAiRbE<HTML>
> > <HEAD>") as an ARRAY ref while "strict refs"
> in use at
> /usr/local/minivend/lib/Vend/Interpolate.pm
> line 3172.
> >
>
>
> Can anyone provide hints to get this working?
>
>
> Thanks,
>
> Cameron
>
> -
> To unsubscribe from the list, DO NOT REPLY to
> this message.  Instead, send
> email with 'UNSUBSCRIBE minivend-users' in the
> body to Majordomo@minivend.com.
> Archive of past messages:
> http://www.minivend.com/minivend/minivend-list
>
>
>


=====
===========================================================
Our Own Web Sites Please Visit
http://www.goldstats.com            http://www.goldget.com
http://www.goldposition.com      http://www.goldsubmit.com
http://www.ms-links.com            http://www.zforcast.com
http://www.ms-links.com        http://www.mediaservices.net
===========================================================

__________________________________________________
Do You Yahoo!?
Yahoo! Photos -- now, 100 FREE prints!
http://photos.yahoo.com
-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to
Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list

-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: