fr.gouv.culture.sdx.search.lucene.query
Class SDXTermQuery

java.lang.Object
  extended by org.apache.lucene.search.Query
      extended by org.apache.lucene.search.TermQuery
          extended by fr.gouv.culture.sdx.search.lucene.query.SDXTermQuery
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class SDXTermQuery
extends org.apache.lucene.search.TermQuery

SDXTermQuery extends org.apache.lucene.search.TermQuery. Here, we just want to re-write the method toString(String) to get a @luceneQuery suitable for SimpleQuery ; the query term is escaped by pipes "|", recognized by the QueryParser to escape the word analyzer. SDXTermQuery is used by fr.gouv.culture.sdx.search.lucene.query.FieldQuery.

See Also:
RangeQuery, FieldQuery, Serialized Form

Constructor Summary
SDXTermQuery(org.apache.lucene.index.Term t)
          Construct a org.apache.lucene.index.Term
 
Method Summary
 java.lang.String toString(java.lang.String field)
          Prints a user-readable version of this query.
 
Methods inherited from class org.apache.lucene.search.TermQuery
createWeight, equals, extractTerms, getTerm, hashCode
 
Methods inherited from class org.apache.lucene.search.Query
clone, combine, getBoost, getSimilarity, mergeBooleanQueries, rewrite, setBoost, toString, weight
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SDXTermQuery

public SDXTermQuery(org.apache.lucene.index.Term t)
Construct a org.apache.lucene.index.Term

Method Detail

toString

public java.lang.String toString(java.lang.String field)
Prints a user-readable version of this query. Here, we want to encapsulate the query term by pipes "|".

Overrides:
toString in class org.apache.lucene.search.TermQuery


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