NAME
Search::Circa::Url - provide functions to manage url of Circa
VERSION
$Revision: 1.17 $
SYNOPSIS
use Search::Circa::Indexer;
my $index = new Search::Circa::Indexer;
$index->connect(...);
$index->URL->add($account,%url) ||
print "Can't add $url{url} : $DBI::errstr\n";
$index->URL->del($account,$id_url);
DESCRIPTION
This module is used by Search::Circa::Indexer module to manage Url of Circa
Hash %url
Sometimes I use a hash call url as parameter. (update,add,load method). Here are possible field:
- id
-
Id of url (use only on update)
- url
-
Url use to get content if local_url isn't define
- local_url
-
Url with file:// protocol. In search, url will be displayed, else in indexer, url_local is used.
- browse_categorie
-
0 ou 1. (Apparait ou pas dans la navigation par categorie). Si non present, 0.
- niveau
-
Profondeur de l'indexation pour ce document. Si non present, positionné à 0.
- categorie
-
Categorie de cet url. Si non present, positionné à 0.
- titre
-
Title of document
- description
-
Description of document
- langue
-
Langue of document
- last_check
-
Last check of Indexer
- last_update
-
Last update of document
- valide
-
Is document reachable ?
- parse
-
Does Circa already known this url ?
Public Class Interface
- new($indexer_instance)
-
Create a new Circa::Url object with indexer instance properties
- add($idMan,%url)
-
Add url %url for account $idMan. If error (account undefined, no account, no url) return 0. You can ask $DBI::errstr to know why) or 1 if ok.
- load($compte,$id)
-
Return reference to hash %url for id $id, account $compte. If error (id undefined, no id, no account) return 0. You can ask $DBI::errstr to know why) or 1 if ok.
- update($compte,%url)
-
Update url %url for account $compte. If error (id undefined, no id, no account) return 0. You can ask $DBI::errstr to know why) or 1 if ok. Field url can't be updated.
- delete($compte,$id_url)
-
Delete url with id $id_url on account $compte (clean table links/releation) If error (id undefined, no id, no account) return 0. You can ask $DBI::errstr to know why)
- delete_all_non_valid($id)
-
Delete all non valid url found for account $id
- need_update($id,$xj)
-
Return reference of hash with id/url for url not parsed since $xj days
- need _parser($id)
-
Return reference of hash with id/url for url never parser (column parser=0)
- a_valider($compte)
-
Return reference of hash with id/url of url not valid
- valid_all_non_valid($id)
-
Valid all non valid url found for account $id
- valide($compte,$id_url)
-
Commit link $id_url on table $compte/links
Valide le lien $id_url
- non_valide($compte,$id_url)
-
Set url $id_url as non valide. Ignore link $id_url on search (bad link).
AUTHOR
Alain BARBET alian@alianwebserver.com
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 350:
Non-ASCII character seen before =encoding in 'positionné'. Assuming CP1252