## org.apache.lucene.search
Class RemoteSearchable

    java.lang.Object
      java.rmi.server.RemoteObject
          java.rmi.server.RemoteServer
              java.rmi.server.UnicastRemoteObject
                  org.apache.lucene.search.RemoteSearchable

All Implemented Interfaces:
  java.io.Serializable, java.rmi.Remote, RMIRemoteSearchable, org.apache.lucene.search.Searchable

    public class RemoteSearchable

extends java.rmi.server.UnicastRemoteObject
implements RMIRemoteSearchable

A remote searchable implementation.

Version:
  $Id: RemoteSearchable.java 803339 2009-08-12 01:22:30Z markrmiller $
See Also:
  Serialized Form

Field Summary

Fields inherited from class java.rmi.server.RemoteObject
`ref`

Constructor Summary
`RemoteSearchable(org.apache.lucene.search.Searchable local)` Constructs and exports a remote searcher.

Method Summary
`void` `close()`
`org.apache.lucene.document.Document` `doc(int i)`
`org.apache.lucene.document.Document` `doc(int i, org.apache.lucene.document.FieldSelector fieldSelector)`
`int` `docFreq(org.apache.lucene.index.Term term)`
`int[]` `docFreqs(org.apache.lucene.index.Term[] terms)`
`org.apache.lucene.search.Explanation` `explain(org.apache.lucene.search.Weight weight, int doc)`
`static void` `main(java.lang.String[] args)` Exports a searcher for the index in args[0] named "//localhost/Searchable".
`int` `maxDoc()`
`org.apache.lucene.search.Query` `rewrite(org.apache.lucene.search.Query original)`
`void` `search(org.apache.lucene.search.Weight weight, org.apache.lucene.search.Filter filter, org.apache.lucene.search.Collector results)`
`void` `search(org.apache.lucene.search.Weight weight, org.apache.lucene.search.Filter filter, org.apache.lucene.search.HitCollector results)` Deprecated. use `search(Weight, Filter, Collector)` instead.
`org.apache.lucene.search.TopDocs` `search(org.apache.lucene.search.Weight weight, org.apache.lucene.search.Filter filter, int n)`
`org.apache.lucene.search.TopFieldDocs` `search(org.apache.lucene.search.Weight weight, org.apache.lucene.search.Filter filter, int n, org.apache.lucene.search.Sort sort)`

Methods inherited from class java.rmi.server.UnicastRemoteObject
`clone, exportObject, exportObject, exportObject, unexportObject`

Methods inherited from class java.rmi.server.RemoteServer
`getClientHost, getLog, setLog`

Methods inherited from class java.rmi.server.RemoteObject
`equals, getRef, hashCode, toString, toStub`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### RemoteSearchable

    public RemoteSearchable(org.apache.lucene.search.Searchable local)
                     throws java.rmi.RemoteException

  Constructs and exports a remote searcher.

  Throws:
    `java.rmi.RemoteException`

Method Detail

### search

    public void search(org.apache.lucene.search.Weight weight,
                       org.apache.lucene.search.Filter filter,
                       org.apache.lucene.search.HitCollector results)
                throws java.io.IOException

  Deprecated. use `search(Weight, Filter, Collector)` instead.

  Specified by:
    `search` in interface `org.apache.lucene.search.Searchable`
  Throws:
    `java.io.IOException`

### search

    public void search(org.apache.lucene.search.Weight weight,
                       org.apache.lucene.search.Filter filter,
                       org.apache.lucene.search.Collector results)
                throws java.io.IOException

  Specified by:
    `search` in interface `org.apache.lucene.search.Searchable`
  Throws:
    `java.io.IOException`

### close

    public void close()
               throws java.io.IOException

  Specified by:
    `close` in interface `org.apache.lucene.search.Searchable`
  Throws:
    `java.io.IOException`

### docFreq

    public int docFreq(org.apache.lucene.index.Term term)
                throws java.io.IOException

  Specified by:
    `docFreq` in interface `org.apache.lucene.search.Searchable`
  Throws:
    `java.io.IOException`

### docFreqs

    public int[] docFreqs(org.apache.lucene.index.Term[] terms)
                   throws java.io.IOException

  Specified by:
    `docFreqs` in interface `org.apache.lucene.search.Searchable`
  Throws:
    `java.io.IOException`

### maxDoc

    public int maxDoc()
               throws java.io.IOException

  Specified by:
    `maxDoc` in interface `org.apache.lucene.search.Searchable`
  Throws:
    `java.io.IOException`

### search

    public org.apache.lucene.search.TopDocs search(org.apache.lucene.search.Weight weight,
                                                   org.apache.lucene.search.Filter filter,
                                                   int n)
                                            throws java.io.IOException

  Specified by:
    `search` in interface `org.apache.lucene.search.Searchable`
  Throws:
    `java.io.IOException`

### search

    public org.apache.lucene.search.TopFieldDocs search(org.apache.lucene.search.Weight weight,
                                                        org.apache.lucene.search.Filter filter,
                                                        int n,
                                                        org.apache.lucene.search.Sort sort)
                                                 throws java.io.IOException

  Specified by:
    `search` in interface `org.apache.lucene.search.Searchable`
  Throws:
    `java.io.IOException`

### doc

    public org.apache.lucene.document.Document doc(int i)
                                            throws org.apache.lucene.index.CorruptIndexException,
                                                   java.io.IOException

  Specified by:
    `doc` in interface `org.apache.lucene.search.Searchable`
  Throws:
    `org.apache.lucene.index.CorruptIndexException`
    `java.io.IOException`

### doc

    public org.apache.lucene.document.Document doc(int i,
                                                   org.apache.lucene.document.FieldSelector fieldSelector)
                                            throws org.apache.lucene.index.CorruptIndexException,
                                                   java.io.IOException

  Specified by:
    `doc` in interface `org.apache.lucene.search.Searchable`
  Throws:
    `org.apache.lucene.index.CorruptIndexException`
    `java.io.IOException`

### rewrite

    public org.apache.lucene.search.Query rewrite(org.apache.lucene.search.Query original)
                                           throws java.io.IOException

  Specified by:
    `rewrite` in interface `org.apache.lucene.search.Searchable`
  Throws:
    `java.io.IOException`

### explain

    public org.apache.lucene.search.Explanation explain(org.apache.lucene.search.Weight weight,
                                                        int doc)
                                                 throws java.io.IOException

  Specified by:
    `explain` in interface `org.apache.lucene.search.Searchable`
  Throws:
    `java.io.IOException`

### main

    public static void main(java.lang.String[] args)
                     throws java.lang.Exception

  Exports a searcher for the index in args[0] named "//localhost/Searchable".

  Throws:
    `java.lang.Exception`

Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.