org.apache.droids.solr
Class AdvancedSolrHandler

java.lang.Object
  extended by org.apache.droids.solr.AdvancedSolrHandler
All Implemented Interfaces:
Handler

public class AdvancedSolrHandler
extends java.lang.Object
implements Handler

A Droids Handler which allows to specify selectors to store documents' parts in a Solr index. A selector is an Entry made of a key which matches the solr fiel and of a value which correspond to a path selector. Path selectors are always absolute and supports indexes. Here are some examples: - /html[0]/div[0] - /html[0]/div[0]/p[0] - /html[0]/div[1]/p[2]


Constructor Summary
AdvancedSolrHandler()
           
 
Method Summary
 java.util.HashMap<java.lang.String,java.lang.String> getSelectors()
           
 org.apache.solr.client.solrj.SolrServer getServer()
           
 void handle(java.net.URI uri, ContentEntity entity)
           
 void setSelectors(java.util.HashMap<java.lang.String,java.lang.String> selectors)
           
 void setServer(org.apache.solr.client.solrj.SolrServer solr)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdvancedSolrHandler

public AdvancedSolrHandler()
Method Detail

getServer

public org.apache.solr.client.solrj.SolrServer getServer()
Returns:
the current solr server

setServer

public void setServer(org.apache.solr.client.solrj.SolrServer solr)
Parameters:
solr - a solr server

getSelectors

public java.util.HashMap<java.lang.String,java.lang.String> getSelectors()
Returns:
the current path selectors

setSelectors

public void setSelectors(java.util.HashMap<java.lang.String,java.lang.String> selectors)
Parameters:
selectors - an hash map containing path selectors

handle

public void handle(java.net.URI uri,
                   ContentEntity entity)
            throws java.io.IOException,
                   DroidsException
Specified by:
handle in interface Handler
Throws:
java.io.IOException
DroidsException


Copyright © 2007-2009. All Rights Reserved.