#Format index
$index = join('\',\'', @zone_index);
$index = '[\''.$index.'\']';
$affine = 1;
}
if($affine == 0){ #Search in _all
$result = $es->searchqs(
index => undef,
q => $keyword
);
}
elsif($affine == 0 || !defined(@zone_type)){ #Search in multi
index and all type
$result = $es->searchqs(
index => $index,
q => $keyword
);
}
else{ search in multi index and multi type #Format type
$types = join('','', @zone_type);
$types = '[''.$types.'']';
$result = $es->searchqs(
index => $index,
type => $types,
q => $keyword
);
}
#Format index
$index = join('\',\'', @zone_index);
$index = '[\''.$index.'\']';
$affine = 1;
}
if($affine == 0){ #Search in _all
$result = $es->searchqs(
index => undef,
q => $keyword
);
}
elsif($affine == 0 || !defined(@zone_type)){ #Search in multi
index and all type
$result = $es->searchqs(
index => $index,
q => $keyword
);
}
else{ search in multi index and multi type #Format type
$types = join('','', @zone_type);
$types = '[''.$types.'']';
$result = $es->searchqs(
index => $index,
type => $types,
q => $keyword
);
}
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.