Skip to main content.
home | support | download

Back to List Archive

Re: [SWISH-E:22] Meta Tags, commas, and IGNORELASTCHAR

From: Giulia Hill <ghill(at)not-real.library.berkeley.EDU>
Date: Mon Sep 22 1997 - 16:23:04 GMT
John,

The problem with commas and Meta tags is fixed, and following is a patch 
for the index.c file. Alternatively, you could download again the files 
from the ftp site since I have updatated the directory with the corrected 
files.

Giulia
----------------------------------------------
sunsite% diff -c oldIndex.c newIndex.c   ../../swish/bin/src/index.c
*** oldIndex.c     Tue Jul 29 14:10:59 1997
--- newIndex.c Thu Sep  4 14:36:18 1997
***************
*** 608,614 ****
  printf("s: %d\n", structure);
  #endif
                                        if ((tag[0]=='!') &&
!                                           (lstrstr(tag,"META")) ) {
                                          if (lstrstr(tag, "START")) {
                                            metaName=getMeta(tag);
                                            /* If there is not a legal 
metaName
--- 608,616 ----
  printf("s: %d\n", structure);
  #endif
                                        if ((tag[0]=='!') &&
!                                           lstrstr(tag,"META") &&
!                                            (lstrstr(tag,"START") ||
!                                             lstrstr(tag,"END") ) ) {
                                          if (lstrstr(tag, "START")) {
                                            metaName=getMeta(tag);
                                            /* If there is not a legal 
metaName
***************
*** 1218,1223 ****
--- 1220,1226 ----
       int structure;
  {
    int metaName, j, i, inword, wordcount, emphasized, jstart;
+   int k, q;
    char* temp;
    char c, word[MAXWORDLEN];
 
***************
*** 1270,1275 ****
--- 1273,1290 ----
            if (isokword(word))
              strcpy(word, (char *)
                     convertentities(word));
+           /* Get rid of specified last char's */
+           if (IGNORELAST) {
+             for (k=0; word[k] != '\0'; k++)
+               ;
+             /* Move back one to find the last char */
+             k--;
+             for (q=0; IGNORELASTCHAR[q] != '\0'; q++)
+               if (word[k] == IGNORELASTCHAR[q]){
+                 word[k] = '\0';
+                 break;
+               }
+           }
            if (hasokchars(word) && isokword(word))
              entrylist = (struct entry *)
                addentry(entrylist, word,


On Sat, 20 Sep 1997, John Coleman wrote:

> I'm wondering if the IGNORELASTCHAR should apply to Meta tag searches?
> 
> I get inconsistent results if commas are used to seperate meta names.
> 
> A search for "animals" as a meta word does not return a page with
> "animals," in the meta tag. Vice-versa is also true
> 
> http://www.library.yale.edu/~coleman/swish/searchtemplate.htm
> 
> Also, on the page with commas, the other 2 meta tags cannot be searched at
> all:
> <HTML><HEAD><TITLE>THIS IS A META TAG TEST WITH COMMAS IN THE META
> TAG</TITLE>
> <META NAME="DC.subject" CONTENT="mickey mouse"> <META NAME="keywords"
> CONTENT="fishing, yale, animals,">
> 
> Is the answer to leave out the commas?  Convention seems to be to put them
> in, or am I missing something?
> 
> **********
> John Coleman
> Yale University Library Systems
> 203-432-1847
> 
> 
Received on Mon Sep 22 09:27:53 1997