bing
Flat 10% & upto 50% off + Free additional Courses. Hurry up!

Indexing And Querying

Indexing

Indexing is the process of pushing the XML files into SOLR index, this process is also known as feeding. The other methods to get the data into SOLR are as below.

  • Data import handler (DIH): it is a powerful language permits you to read from a SQL database, XML files, CSV, etc. the full- imports and the data imports will be handled by DIH. DIH is more convenient if a small amount of data were added, modernized and removed.
  • HTTP interface: this method will be used for indexing the XML files. HTTP interface taken from the post tool.
  • Client libraries: the client libraries have existed in different languages. For example: Java or python.

pic2

 

Querying

It is efficient to use the HTTP interface for debugging, with any browser to query in SOLR and get back XML. The default query parser of the SOLR is known as Lucene parser.

The standard query parser parameters

Along with the Faceting parameters, common query parameters, highlighting parameters the standard query parser also supports parameters as described in the below table.

Parameters Description
q This parameter is mandatory, helps in defining the query using standard query syntax
q.op These parameters specify the default operator for query expressions, overrides the default operator as present in the schema. AND and OR are the possible values.
df This recognizes the default field, overriding the default field in the schema.

Example for responses from the Standard Query Parser

The below given URL will submit a simple query and send requests to the XML response writer to use indentation to create the XML response more readable.

http://localhost:8983/solr/softproducts/select?q=id:SP2514N

Results:

<?xml version=”1.0″ encoding=”UTF-8″?>

<response>

<responseHeader><status>0</status><QTime>1</QTime></responseHeader>

<result numFound=”1″ start=”0″>

 <doc>

  <arr name=”cat”><str>Industry</str><str>Software </str></arr>

  <arr name=”characteristics”><str>coded in Java</str>

    <str>Microsoft products, Snake-ladder gaming </str></arr>

  <str name=”id”>Int456</str>

  <bool name=”inStock”>true</bool>

  <str name=”manu”>Intellipaat software Solutions </str>

  <int name=”popularity”>6</int>

  <float name=”price”>100.00</float>

  <str name=”sku”>Int789</str>

 </doc>

</result>

</response>

Example for query with the limited field lists

http://localhost:8983/solr/softproducts/select?q=id:SP2514N&fl=id

Results:

<?xml version=”1.0″ encoding=”UTF-8″?>

<response>

<responseHeader><status>0</status><QTime>2</QTime></responseHeader>

<result numFound=”1″ start=”0″>

 <doc>

  <str name=”id”>Int456</str>

   </doc>

</result>

</response>

This blog will help you get a better understanding of Solr + Hadoop = Big Data Love

"0 Responses on Indexing And Querying"

Leave a Message

Your email address will not be published.

Training in Cities

Bangalore, Hyderabad, Chennai, Delhi, Kolkata, UK, London, Chicago, San Francisco, Dallas, Washington, New York, Orlando, Boston

100% Secure Payments. All major credit & debit cards accepted Or Pay by Paypal.

top

Sales Offer

  • To avail this offer, enroll before 05th December 2016.
  • This offer cannot be combined with any other offer.
  • This offer is valid on selected courses only.
  • Please use coupon codes mentioned below to avail the offer
offer-june

Sign Up or Login to view the Free Indexing And Querying.