Categories not changing????

Post Reply
KMandalia
Posts: 301
Joined: Fri Jul 09, 2004 3:50 pm

Categories not changing????

Post by KMandalia »

I recently changed patterns in one of the category.

I have an option to remove all listings of a site from the search results if the user clicks on a link called 'exclude this site'.

Now, I am displaying 3 results from my site (replicating collectlocalresults and showresults with different category no.) and then show all other results from other sites(which includes my site as well)

The problem comes up when I want to exclude my site from the main results (which should also get rid of the top 3 results). Not only it shows one result every time i do that, that result has title "untitled" (even though the actual page has title) but also the page does not match the pattern for the category. I did have that pattern but then i took it out. I want to see what are the patterns in the category and how can i change that. Apperantly the dowalk didn't do it.
User avatar
John
Site Admin
Posts: 2622
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

Categories not changing????

Post by John »

Does the status show the recategorization after changing the categories?

The settings page will show the current defined categories.

You can use the "recat" entry point to force all the URLs to be recategorized.
John Turnbull
Thunderstone Software
KMandalia
Posts: 301
Joined: Fri Jul 09, 2004 3:50 pm

Categories not changing????

Post by KMandalia »

1) Yes
2) I know
3) how to check if the recat is the real issue, can i just go in the category table to look it up?
KMandalia
Posts: 301
Joined: Fri Jul 09, 2004 3:50 pm

Categories not changing????

Post by KMandalia »

PLEASE HELP

go to search.creditunions.com, type in 'indirect lending' and then exclude the first site (www.creditunions.com) from the main results by clicking on the exclude this site link next to it.

questions:

1) the top section should just go away as per the function below (i think):

<a name=collectlocalcuresults>
<!-- Performs local SQL query.
== Sets $loop, $next (for next-page raw SKIP),
-->
<$ignore2=0><!-- starting precisely, ignore nothing -->
<!--<bbsetup>-->
<!-- may need to do this part of sql twice, so put in variable instead
of coding it redundantly -->
<$sql="from html
where " $SSc_searchfields " " $liketype " $$sq
and Title like $$stq
and Url matches $$suq
and Depth <= $$sdq
and Catno matches '2'
">
<!-- determine what fields to retrieve (are available)
-->
<SQL "select Category from categories where Catno matches '2'"></SQL>
<$fields="Url,Depth,Title,Description,Body,Size,Visited,id,$$$$rank rawrank ">
<SQL MAX=1 "select NAME from SYSCOLUMNS where TBNAME = 'html' and NAME = 'Charset'">
<$fields="Url,Depth,Title,Description,Body,Size,Modified Visited,id,Charset,$$$$rank rawrank ">
</SQL>
<!-- perform query on database -->
<sql skip=$jump2 max=2
"select " $fields $sql $sqlorder>
</sql>
<IF $count eq 1><!-- need to count rows to get precise hit count -->
<if $loop ge 2><!-- page is full -->
<local ic2 sl2=$loop sn2=$next2>
<SQL "select count(*) ic2 " $sql></SQL>
<$indexcount=$ic2><!-- reset texis's indexcount to actual count -->
<$loop = $sl2><$next2 = $sn2>
<else><!-- page not full: reached end of results -->
<$indexcount = $next2>
</if>
</if>
</a>

The category 2 pattern is:
http://www.creditunions.com/events/* http:/www.creditunions.com/store/*

Let's assume that something is wrong with the sql statement above... but then why does it display 'Untitled' and no description even though it should?

The function that excludes is as follows, the idea is to just get the base url and append it with - at the end of the query.

<A NAME=excludesite public export>
<if $isexclude neq 1>
<$query2=$query>
<$isexclude=1>
</if>
<top>
<$order="r"><!-- force rank order -->
<$liketype=likep><!-- force rank search -->
<$sqlorder=>
<sql max=1 "select Url from html where id=$id"></sql>
<rex ">>=\alpha+://=[^/]+" $Url>
<sandr "http://" "" $ret>
<sum "%s" $query " -" $ret>
<$query=$ret>
<$morefromthis=0>
<$keepurl=0>
<search>
<bottom>
</A>
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

Categories not changing????

Post by mark »

Use list/edit urls or manual SQL to see the current categories for a given url in the database. That will tell you if the categorization when as expected. If that's all right turn on tracesql with sqlcp to see if your sql statements are as expected. If still in doubt print out imporatant variables at critical points to see their values and if they're what you'd expect.
KMandalia
Posts: 301
Joined: Fri Jul 09, 2004 3:50 pm

Categories not changing????

Post by KMandalia »

OK. I know what is happening. Everything is right but since the top result section is pulling from www.creditunions.com and the query when hitting exclude site becomes query -www.creditunions.com when excluding the creditunions.com, it shows up.

Now, why can't I change the search fields to Title\Body for the top section. If I do that then it is not showing any results. If I can just do that then it will solve all my problems.
User avatar
John
Site Admin
Posts: 2622
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

Categories not changing????

Post by John »

Make sure you have an index on the fields you are searching (exact match).
John Turnbull
Thunderstone Software
KMandalia
Posts: 301
Joined: Fri Jul 09, 2004 3:50 pm

Categories not changing????

Post by KMandalia »

can I name that index anything?
User avatar
John
Site Admin
Posts: 2622
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

Categories not changing????

Post by John »

The name of the index doesn't matter. It can't be the same name as another index, and must follow the general rules for index names.
John Turnbull
Thunderstone Software
Post Reply