<?php include "core/autoload.php"; use sergseriy\core\Documents; $documents = new Documents(); $answer = $documents->search($_POST['search']); echo json_encode($answer); exit;
$client = new SolrClient($options); $doc = new SolrInputDocument(); $doc->addField('id', 3); $doc->addField('text', $_POST['text']); $updateResponse = $client->addDocument($doc); print_r($updateResponse->getResponse()); $client->commit(); }*/ if (!empty($_POST['type']) && $_POST['type'] == 'raw') { $documents = new Documents(); $rawDcoment = new RawDocument($_POST); var_dump($documents->addDocument($rawDcoment)); } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Searching with SOLR</title> <link rel="stylesheet" href="/css/font-awesome.min.css"> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/bootstrap-theme.min.css" rel="stylesheet">