# $Id: spanish.cf,v 1.0 2002/11/28 by Harald Weinreich and Javi Masa # # Definitions for '{nph-}search.cgi' configuration. # # A hash (#) in the first column denotes a comment and is not processed # even inside a definition. Hashes not in the first column are left as-is. # # Variable substitution occurs on these definitions. If you want # a dollar-sign ($) to occur in the output, escape it with backslash (\). # Other metacharacters (quotes, asterisks, etc) probably don't need to be # escaped. Printf-like special characters are allowed: \n \t \r etc. # # The ending newline is chopped off from each definiton. So # # # abcxyz # # # becomes "abcxyz". You may have blank lines in between the beginning # and ending tags, or use the newline character \n. # # # CGI defaults. charset : ISO-8859-1 ############################################################################## # RESULT SECTION # # The output of '{nph-}search.cgi' consists of the following tags: # # ResultHeader # CreateNavBars # ResultSetBegin # ( Errors from 'broker' ) # foreach object { # PrintObject # } # ResultSetEnd # EndBrokerResults # ( TruncateWarning ) # ResultTrailer # # ############################################################################## # First output for the HTML containing the results. Should probably include # tag and the user query. # <ResultHeader> <HEAD> <TITLE>Resultados de la búsqueda de: $html_query

Resultados de la búsqueda: $html_query

$filterhint # Calculations to obtain $navigationBar # Original code by Javi Masa # if ($totalPages > 0) { # elements before and after current page in navigation bar local($navPart) = 5; $prevPage = ""; $prevPage = "\n\n<= Anterior ·" if ($page > 1); $nextPage = ""; $nextPage = "· Siguiente =>" if ($page < $totalPages); $pageList = ""; local($startP) = ($page <= $navPart) ? 1 : $page - $navPart; for ($i = $startP; $i < $page; $i++) { $pageList .= "$i\n"; } $pageList .= "$page\n"; local($endP) = ($page + $navPart >= $totalPages) ? $totalPages : $page + $navPart; for ($i = $page+1; $i <= $endP; $i++) { $pageList .= "\n$i\n"; } $navigationBar = "\n$prevPage\n $pageList\n $nextPage" if ($totalPages > 1); } # Output just before beginning the loop over objects returned by the broker. #
\n
$totnumber resultados $navigationBar Paje: $page/$totalPages
# # # # # Búsqueda:
\n # output just after ending the loop over objects returned by the broker #
# # # # # Búsqueda: $navigationBar Powered by Harvest
# PER-OBJECT DEFINITIONS # ====================== # # VARIABLES: # # $url Object url: http://www.cia.gov:3333/Spies/KGB/secret.html # $A URL Access: http # $H URL Host : www.cia.gov:3333 # $P URL Path : /Spies/KGB/secret.html # $D URL Dir : /Spies/KGB/ # $F URL File : secret.html # $cs_url URL to the SOIF object in the broker databse # $cs_[ahp] elements of $cs_url as above with $url # $desc Description attribute of the matched object # $opaque A matched line (or all matched lines in obj-at-a-time mode) # $usermsg A user message # $attributes Requested attributes # $objectType Type of object if not HTML # $objectSize Size of object # $objectDate Last modification date of object #
$objectnum $description   $objectType   $objectSize  $objectWeight
$attributes
$opaque
Datos del índice: formateado · plano
$url  $objectUpdate

# PerObjectFunction is eval'd before every object is printed out. # # init output variables $objectType=""; $objectSize=""; $objectUpdate=""; $objectWeight = ""; $opaquePerObjectCount = 1; $lastOpaqueObject = ""; # create description $description = "Fichero:  $F"; $description = $desc if (length($desc) > 5); # highlight search words. for ($i=0; $i<=$#searchwords; $i++) { s/(\b$searchwords[$i]\b)/$1<\/b>/ig; } # Create the HTML code to print the weight balls if ($maxWeight > 0 && $weightflag) { $nWeight = int($weight * 5 / $maxWeight); for ($idxWeight = 1; $idxWeight <= $nWeight; $idxWeight++) { $objectWeight .= "\"*\""; } # $objectWeight = "".int($weight * 100 / $maxWeight)."%"; } # format matched lines if ($opaque ne '') { $opaque = "coincidencias: $opaque..." } # PerAttributeFunction is eval'd before the Attributes are printed out. # # Remove all empty lines $val =~ s/^(\s*)//mg; # Now prepare the object's type and size to display at the description. if ($att eq "type") { ## show file type $objectType = "[".$val."]" if !($val =~ /HTML|HTTP-Query/); $att=""; # avoid } elsif ($att eq "file-size") { ## calculate file size $val = int($val/1024); $objectSize = $val." KByte" if ($val > 150); # more than 150 KByte $val = int($val/10.24); $objectSize = ($val/100)." MByte" if ($val > 100); # more than one meg $att=""; } elsif ($att eq "last-modification-time") { ## calculate last modification date local(@date,@months,$month,$minute,$year); @date = localtime($val); @months = ('Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic'); $month = $months[$date[4]]; $minute = $date[1]; $minute = "0$minute" if $minute < 10; $year = $date[5]+1900; $objectUpdate = "$date[3]-$month-$year"; # $date[2]:$minute"; $att=""; } else { ## other attributes # insert commas to separate headings $val =~ s/\n(.)/, $1/mg; # If more than 120 Characters, display only the first 120 plus "..." $val =~ s/^((.|\n){120})(.|\n)*/$1.../; #highlight search words. for ($i=0; $i<=$#searchwords; $i++) { $val =~ s/(\b$searchwords[$i]\b)/$1<\/font>/ig; } $att =~ s/headings/títulos/; } # ====================================================================== # ERROR, STATUS and WARNING functions # ====================================================================== # The message printed to the browser and logged to the HTTP server log # when the processes is killed. If the Timeout time is reached, the # process dies from SIGALRM. The short name of the offending signal # is placed in $sig. # Matado por SIG$sig...\n # A warning message printed only when the broker might have truncated # the result set. Only printed if the number of matched lines equals # the 'maxresultflag' or the number of returned objects equals the # 'maxobjflag' value of the query.html form. #

AVISO: Los resultados han sido cortados ya que se han sobrepasado las $nopaquelines líneas de coincidencia. Se encontraron $nreturned objetos.

\n # A warning message printed only when the broker returned 0 results. #

No se encontró nada que coincidiese con la consulta $html_query

Debe especificar una consulta que esté soportada por el sistema de búsquedas de Harvest.

Sugerencias:

  • Asegurese de que las palabras están escritas correctamente
  • Intente otras palabras más específicas o genéricas sobre la materia que desee buscar
  • Seleccione el tipo de coincidencia subcadena para obtener más resultados

Por favor revise la ayuda para conocer cómo realizar consultas.

\n # Error Message returned if there is no query string sent. #

No se introdujo ninguna palabra.

No hay información que buscar. Por favor, introduzca una o varias palabras de búsqueda.

\n # Message returned if the broker sends back a # 111 - Broker is too heavily loaded # reply. #

Lo sentimos, el indexador $host:$port está actualmente demasiado cargado para procesar su consulta. Por favor, intentelo más tarde.

# Error message if broker is not available. #

El motor de búsqueda está temporalmente no disponible

Lo sentimos pero el Broker de $host, puerto $port está fuera de servicio Por favor, inténtelo más tarde.

\n # Message returned if the broker sends back a # 111 - PARSE ERROR # reply. #

Lo sentimos pero su consulta $html_query no sigue la sintaxis correcta.

Por favor, consulte la ayuda para la realización de consultas para obtener detalles de la sintaxis apropiada.

Fallos sintácticos más habituales:

  • Listado de dos términos sin los conectores AND u OR.
    Por ejemplo, directorio ldap debería ser directorio AND ldap

  • Signos de puntuación en preguntas estructuradas.
    Las preguntas estructuradas necesitan paréntesis y :
    Por ejemplo, (DC.Author : Antonio Marin)

  • No está usando comillas para delimitar frases o expresiones regulares.
    Por ejemplo, si desea buscar la frase: descripción de recursos debería escribir: "descripción de recursos"
    La expresión regular: descr* de rec* debería escribirse como: "descr* de rec*"
    Cuando la expresión de consulta lleva un punto . hay que incluir comillas.
    Por ejemplo "3.1".

  • Signos de puntuación olvidados.
    Las preguntas estructuradas necesitan de : y algunas veces paréntesis. Por ejemplo Type:PostScript o (Type : PostScript)
\n