Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## fr.gouv.culture.sdx.search.lucene.query
Class CachingRewrittenQueryWrapper

    java.lang.Object
      org.apache.lucene.search.Query
          fr.gouv.culture.sdx.search.lucene.query.CachingRewrittenQueryWrapper

All Implemented Interfaces:
  java.lang.Cloneable, java.io.Serializable

public class CachingRewrittenQueryWrapper
extends org.apache.lucene.search.Query

Simple wrapper for a Lucene query that collects all queries generated by calling rewrite on the original Lucene query and stores them in a BooleanQuery. A Searcher will call the rewrite() method for each index and hence generate a query containing terms for the respective index. This class collects these queries so that they may be used for highlighting, query expansion, etc. by retrieving the underlying terms.

See Also:
  `rewrite(org.apache.lucene.index.IndexReader)`, `getRewrittenQueries()`, `getOriginalQuery()`, Serialized Form

Field Summary
`protected org.apache.lucene.search.Query` | `originalQuery`
`protected java.util.ArrayList` | `rewrittenQueries`

Constructor Summary
`CachingRewrittenQueryWrapper(org.apache.lucene.search.Query originalQuery)`

Method Summary
`org.apache.lucene.search.Query` | `combine(org.apache.lucene.search.Query[] queries)`
`protected void` | `finalize()`
`org.apache.lucene.search.Query` | `getOriginalQuery()`
`org.apache.lucene.search.BooleanQuery` | `getRewrittenQueries()`
`org.apache.lucene.search.Similarity` | `getSimilarity(org.apache.lucene.search.Searcher searcher)`
`void` | `resetRewrittenQueries()`
`org.apache.lucene.search.Query` | `rewrite(org.apache.lucene.index.IndexReader reader)`
`java.lang.String` | `toString()`
`java.lang.String` | `toString(java.lang.String field)`

Methods inherited from class org.apache.lucene.search.Query
`clone, createWeight, extractTerms, getBoost, mergeBooleanQueries, setBoost, weight`

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

Field Detail

### originalQuery

    protected org.apache.lucene.search.Query originalQuery

### rewrittenQueries

    protected java.util.ArrayList rewrittenQueries

Constructor Detail

### CachingRewrittenQueryWrapper

    public CachingRewrittenQueryWrapper(org.apache.lucene.search.Query originalQuery)

Method Detail

### getRewrittenQueries

    public org.apache.lucene.search.BooleanQuery getRewrittenQueries()

### resetRewrittenQueries

    public void resetRewrittenQueries()

### getOriginalQuery

    public org.apache.lucene.search.Query getOriginalQuery()

### rewrite

    public org.apache.lucene.search.Query rewrite(org.apache.lucene.index.IndexReader reader)
                                           throws java.io.IOException

  Throws:
    `java.io.IOException`

### combine

    public org.apache.lucene.search.Query combine(org.apache.lucene.search.Query[] queries)

### getSimilarity

    public org.apache.lucene.search.Similarity getSimilarity(org.apache.lucene.search.Searcher searcher)

### finalize

    protected void finalize()
                     throws java.lang.Throwable

  Throws:
    `java.lang.Throwable`

### toString

    public java.lang.String toString()

### toString

    public java.lang.String toString(java.lang.String field)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2007 Ministere de la culture et de la communication / AJLSM. All Rights Reserved.