Xindice API
version 1.2m1

org.apache.xindice.core.query.ftsearch
Class Searcher

java.lang.Object
  extended byorg.apache.xindice.core.query.ftsearch.Searcher

public class Searcher
extends Object

Searcher executes full text queries against list of nodes and returns nodes that match the query in the order of relevance (score) - most relevant results will be return first.

Query syntax is the same as syntax of Lucene query, except it does not use field names.

Version:
$Revision: 584476 $, $Date: 2007-10-13 22:41:50 -0400 (Sat, 13 Oct 2007) $

Constructor Summary
Searcher(org.w3c.dom.NodeList nodes, org.apache.lucene.analysis.Analyzer analyzer)
          Builds new Searcher based on list of nodes and analyzer.
 
Method Summary
 NodeSet search(String query)
          Executes query against list of nodes and returns matches in the order of relevance (score).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Searcher

public Searcher(org.w3c.dom.NodeList nodes,
                org.apache.lucene.analysis.Analyzer analyzer)
Builds new Searcher based on list of nodes and analyzer.

Parameters:
nodes - List of nodes to search
analyzer - Analyzer that will be used to tokenize text of the nodes. Choice of analyzer affects query results.
See Also:
Analyzer
Method Detail

search

public NodeSet search(String query)
               throws org.apache.lucene.queryParser.ParseException
Executes query against list of nodes and returns matches in the order of relevance (score).

Parameters:
query - Full text query
Returns:
NodeSet that contains matching nodes
Throws:
org.apache.lucene.queryParser.ParseException - Query failed to be parsed

Xindice API
version 1.2m1

Copyright (c) 1999-2007 The Apache Software Foundation. All Rights Reserved.