Use the “match all docs” query in a delete by query command: <delete><query>*:*</query></delete>
All posts by Pramod T P
What is .vm file?
VM file is a Velocity Macro File. Apache Velocity is a Java-based template engine that provides a simple yet powerful template language to reference objects defined in Java code.
Velocity macro files (VM) are Velocity`s templates, they are html files with variables that are substituted by Velocity.
Features Apache Lucene
Ranked Searching
Flexible Queries
Field-specific Queries
Sorting
Apache Lucene
Apache Lucene is a high-performance, fullfeatured text search engine library written entirely in Java
Apache Lucene is a free/open source information retrieval software library, originally created in Java by Doug Cutting. It is supported by the Apache Software Foundation and is released under the Apache Software License.
Lucene has been ported to other programming languages including PHP.
In Lucene, everything is a Document. A Lucene Document need notrefer to an actual file on a disk, it could also resemble a row in a
relational database.
Each developer is responsible for turning their own data sets intoLucene Documents. Lucene comes with a number of 3rd party
contributions, including examples for parsing structured data files suchas XML documents and Word files.
Installing GIMP in Ubuntu
From Ubuntu Terminal
1.Open terminal(Press CTRL+ALT+T or Applications->Accessories->Terminal)
2 Type the command sudo apt-get install gimp3.Wait for downloading and installation to complete.It may take few minutes.
From Ubuntu Software Center or Synaptic Package Manager(SPM)
1.Go to Ubuntu software Center or SPM and search for gimp.
2.Then click to install.
Command to start apache solr
Run the below given command
java -jar start.jar
This can be used for restarting Apache solr as well .
How to get data from apache solr – PHP
<?php
$output = file_get_contents(‘http://localhost:8983/solr/select?q=video&wt=php’);
eval(“$resultArray = ” . $output . “;”);
echo “<pre>”;print_r($resultArray);
?>
Delete data from apache solr
java -Ddata=args -Dcommit=no -jar post.jar “<delete><id>SP2514N</id></delete>”
Add data to apache solr
You can add data using the below given command
java -jar post.jar data.xml
Make sure that you have changed the directory where post.jar and xml files are available from the shell.
Command to install curl – ubuntu linux
sudo apt-get install curl libcurl3 libcurl3-dev php5-curl
After installing cURL you have to restart Apache using the below given command
sudo /etc/init.d/apache2 restart