Fix tabella backend
Aggiornate note di installazione Signed-off-by: Riccardo Di Dato <r.didato@asdynamics.it>
This commit is contained in:
+12
-1
@@ -8,11 +8,22 @@ db.runCommand({
|
||||
textSearchEnabled: 1
|
||||
});
|
||||
|
||||
Oppure nel file di configurazione di mongo aggiungere la riga
|
||||
|
||||
setParameter=textSearchEnabled=true
|
||||
|
||||
|
||||
INDEX DA CREARE
|
||||
db.notizia.ensureIndex({"about.author":"text",titolo:"text",sottotitolo:"text",testo:"text"},{default_language: "italian"})
|
||||
///// SBAGLIATO db.notizia.ensureIndex({"about.author":"text",titolo:"text",sottotitolo:"text",testo:"text"},{default_language: "italian"})
|
||||
db.notizia.ensureIndex({"about.author": "text",sottotitolo: "text",testo: "text",titolo: "text"},{weights: {"about.author": 1,sottotitolo: 7,testo: 5,titolo: 10},name: "notiziaDetails"})
|
||||
db.administrators.ensureIndex({nome:"text",cognome:"text",email:"text"},{default_language: "italian"})
|
||||
db.mail.ensureIndex({recipient:"text",subject:"text",body:"text"},{default_language: "italian"})
|
||||
db.users.ensureIndex({nome:"text",cognome:"text",email:"text"},{default_language: "italian"})
|
||||
db.banner.ensureIndex({customer:"text",link:"text"},{default_language: "italian"})
|
||||
db.commenti.ensureIndex({titolo:"text",testo:"text"},{default_language: "italian"})
|
||||
|
||||
db.notizia.createIndex({"shortenedUrl": 1})
|
||||
db.notizia.createIndex({"about.data": 1, "status":1, "isAnsa":1})
|
||||
db.statistics.createIndex({statType:1,deleted:1,date:1})
|
||||
db.statistics.createIndex({"user.id":1})
|
||||
db.statistics.createIndex({"stat.type":1,"content.position":1})
|
||||
|
||||
@@ -17,19 +17,22 @@ $exposedFields = array(
|
||||
return "Sconosciuta";
|
||||
}
|
||||
},
|
||||
"titolo"=>function($data){
|
||||
$rval = $data;
|
||||
if (strlen($rval)>80){
|
||||
$rval = substr($rval, 0, 80)."...";
|
||||
}
|
||||
return $rval;
|
||||
"titolo"=>function($data, $obj){
|
||||
return $obj->cutTextHtmlSafe("titolo",80);
|
||||
// $rval = $data;
|
||||
// if (strlen($rval)>80){
|
||||
// $rval = substr($rval, 0, 80)."...";
|
||||
// }
|
||||
// return $rval;
|
||||
},
|
||||
"sottotitolo"=>function($data){
|
||||
$rval = $data;
|
||||
if (strlen($rval)>80){
|
||||
$rval = substr($rval, 0, 80)."...";
|
||||
}
|
||||
return $rval;
|
||||
"sottotitolo"=>function($data, $obj){
|
||||
return $obj->cutTextHtmlSafe("sottotitolo",80);
|
||||
|
||||
// $rval = $data;
|
||||
// if (strlen($rval)>80){
|
||||
// $rval = substr($rval, 0, 80)."...";
|
||||
// }
|
||||
// return $rval;
|
||||
},
|
||||
"about"=>array("data"=>null,"author"=>null),
|
||||
"id"=>null
|
||||
|
||||
Reference in New Issue
Block a user