org.infinispan.lucenedemo
Class DemoActions

java.lang.Object
  extended by org.infinispan.lucenedemo.DemoActions

public class DemoActions
extends Object

DemoActions does some basic operations on the Lucene index, to be used by DemoDriver to show base operations on Lucene.

Since:
4.0
Author:
Sanne Grinovero

Constructor Summary
DemoActions()
           
DemoActions(InfinispanDirectory index)
           
 
Method Summary
 void addNewDocument(String line)
          Creates a new document having just one field containing a string
 List<String> listAllDocuments()
          Returns a list of the values of all stored fields
 List<Address> listAllMembers()
          Returns a list of Addresses of all members in the cluster
 List<String> listStoredValuesMatchingQuery(org.apache.lucene.search.Query query)
          Runs a Query and returns the stored field for each matching document
 org.apache.lucene.search.Query parseQuery(String queryLine)
          Parses a query using the single field as default
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DemoActions

public DemoActions()

DemoActions

public DemoActions(InfinispanDirectory index)
Method Detail

listStoredValuesMatchingQuery

public List<String> listStoredValuesMatchingQuery(org.apache.lucene.search.Query query)
Runs a Query and returns the stored field for each matching document

Throws:
IOException

listAllDocuments

public List<String> listAllDocuments()
Returns a list of the values of all stored fields

Throws:
IOException

addNewDocument

public void addNewDocument(String line)
                    throws IOException
Creates a new document having just one field containing a string

Parameters:
line - The text snippet to add
Throws:
IOException

parseQuery

public org.apache.lucene.search.Query parseQuery(String queryLine)
                                          throws org.apache.lucene.queryParser.ParseException
Parses a query using the single field as default

Throws:
org.apache.lucene.queryParser.ParseException

listAllMembers

public List<Address> listAllMembers()
Returns a list of Addresses of all members in the cluster


Google Analytics

Copyright © 2010 JBoss, a division of Red Hat. All Rights Reserved.