com.hp.hpl.jena.query.larq
Class IndexLARQ

java.lang.Object
  extended by com.hp.hpl.jena.query.larq.IndexLARQ

public class IndexLARQ
extends java.lang.Object

ARQ wrapper for a Lucene index.


Constructor Summary
IndexLARQ(org.apache.lucene.index.IndexReader r)
           
IndexLARQ(org.apache.lucene.index.IndexReader r, org.apache.lucene.analysis.Analyzer a)
           
IndexLARQ(org.apache.lucene.index.IndexReader r, org.apache.lucene.queryParser.QueryParser qp)
          Deprecated. 
 
Method Summary
 void close()
           
 HitLARQ contains(com.hp.hpl.jena.graph.Node node, java.lang.String queryString)
          Check whether an index recognizes a node.
 org.apache.lucene.queryParser.QueryParser getLuceneQueryParser()
          Return the Lucene QueryParser for this LARQ index
 org.apache.lucene.index.IndexReader getLuceneReader()
          Return the Lucene IndexReader for this LARQ index
 boolean hasMatch(java.lang.String queryString)
          test whether the index matches for the given Lucene query string
 java.util.Iterator<HitLARQ> search(java.lang.String queryString)
          Perform a free text Lucene search and returns an iterator of graph Nodes.
 com.hp.hpl.jena.rdf.model.NodeIterator searchModelByIndex(com.hp.hpl.jena.rdf.model.Model model, java.lang.String queryString)
          Perform a free text Lucene search and return a NodeIterator.
 com.hp.hpl.jena.rdf.model.NodeIterator searchModelByIndex(com.hp.hpl.jena.rdf.model.Model model, java.lang.String queryString, float scoreLimit)
          Perform a free text Lucene search and return a NodeIterator.
 com.hp.hpl.jena.rdf.model.NodeIterator searchModelByIndex(java.lang.String queryString)
          Perform a free text Lucene search and return a NodeIterator.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexLARQ

public IndexLARQ(org.apache.lucene.index.IndexReader r)

IndexLARQ

public IndexLARQ(org.apache.lucene.index.IndexReader r,
                 org.apache.lucene.analysis.Analyzer a)

IndexLARQ

@Deprecated
public IndexLARQ(org.apache.lucene.index.IndexReader r,
                            org.apache.lucene.queryParser.QueryParser qp)
Deprecated. 

Method Detail

searchModelByIndex

public com.hp.hpl.jena.rdf.model.NodeIterator searchModelByIndex(java.lang.String queryString)
Perform a free text Lucene search and return a NodeIterator.

Parameters:
queryString -
Returns:
NodeIterator

searchModelByIndex

public com.hp.hpl.jena.rdf.model.NodeIterator searchModelByIndex(com.hp.hpl.jena.rdf.model.Model model,
                                                                 java.lang.String queryString)
Perform a free text Lucene search and return a NodeIterator. The RDFNodes in the iterator are associated with the model supplied.

Parameters:
model -
queryString -
Returns:
NodeIterator

searchModelByIndex

public com.hp.hpl.jena.rdf.model.NodeIterator searchModelByIndex(com.hp.hpl.jena.rdf.model.Model model,
                                                                 java.lang.String queryString,
                                                                 float scoreLimit)
Perform a free text Lucene search and return a NodeIterator. The RDFNodes in the iterator are associated with the model supplied.

Parameters:
model -
queryString -
scoreLimit - Minimum Lucene score
Returns:
NodeIterator

hasMatch

public boolean hasMatch(java.lang.String queryString)
test whether the index matches for the given Lucene query string


search

public java.util.Iterator<HitLARQ> search(java.lang.String queryString)
Perform a free text Lucene search and returns an iterator of graph Nodes. Applications normally call searchModelByIndex.

Parameters:
queryString -
Returns:
Iterator of hits (Graph node and score)

contains

public HitLARQ contains(com.hp.hpl.jena.graph.Node node,
                        java.lang.String queryString)
Check whether an index recognizes a node.

Parameters:
node -
queryString -
Returns:
boolean

close

public void close()

getLuceneReader

public final org.apache.lucene.index.IndexReader getLuceneReader()
Return the Lucene IndexReader for this LARQ index


getLuceneQueryParser

public final org.apache.lucene.queryParser.QueryParser getLuceneQueryParser()
Return the Lucene QueryParser for this LARQ index



Copyright ? 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP Copyright ? 2010 Talis Systems Ltd. Copyright ? 2010, 2011 Epimorphics Ltd.