PHP Classes

PHP ElasticSearch Custom Search: Create a custom search function for ElasticSearch

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 107 All time: 9,683 This week: 68Up
Version License PHP version Categories
elasticsearchwithnlp 1.0.0The PHP License5PHP 5, Searching
Description 

Author

This class can create a custom search function for ElasticSearch.

It extends the SearchAbstract class with a custom implementation of the search function.

The class configures the search cut off frequency, the type of search and the type of index.

Innovation Award
PHP Programming Innovation award nominee
November 2021
Number 6
ElasticSearch is a well-known application for implementing the efficient content searching solution.

This package demonstrates how to implement a search solution customizing several different aspects of the search function.

Manuel Lemos
Picture of Ahmed Khan
Name: Ahmed Khan <contact>
Classes: 10 packages by
Country: Pakistan Pakistan
Age: ???
All time rank: 244133 in Pakistan Pakistan
Week rank: 192 Up2 in Pakistan Pakistan Up
Innovation award
Innovation award
Nominee: 3x

Example

<?php
require "vendor/autoload.php";
require
"customsearch.php";

$search = new CustomSearch();
$search->setIndex("knowledgebase");
$search->setType("storm");
$search->setSearchColumn("question");
$result = $search->search("I want to know the parentage of jon snow");
echo
'<pre>';
print_r($result);
echo
'</pre>';
?>


Details

elasticsearchwithnlp


  Files folder image Files (6)  
File Role Description
Accessible without login Plain text file composer.json Data Auxiliary data
Plain text file customsearch.php Class Class source
Accessible without login Plain text file data.json Data Auxiliary data
Accessible without login Plain text file index.php Example Example script
Accessible without login Plain text file mapping.json Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:107
This week:0
All time:9,683
This week:68Up