com.atlassian.bamboo.index
Class IndexUtils

java.lang.Object
  extended by com.atlassian.bamboo.index.IndexUtils

public class IndexUtils
extends java.lang.Object

Helper class to help deal with indexing / lucene stuff


Method Summary
static void addField(java.lang.String fieldId, java.util.Date fieldValue, org.apache.lucene.document.Document document)
           
static void addField(java.lang.String fieldId, java.lang.Number fieldValue, org.apache.lucene.document.Document document)
           
static void addField(java.lang.String fieldId, java.lang.String fieldValue, org.apache.lucene.document.Document document)
           
static void addFieldId(java.lang.String fieldId, long id, org.apache.lucene.document.Document document)
          Adds the field and value to the passed document.
static org.apache.lucene.search.BooleanQuery buildAndQuery(org.apache.lucene.search.Query... queries)
           
static int getConcurrentPoolSize(com.atlassian.config.db.HibernateConfig hibernateConfig)
          Tries to get the maximum # of connections available in the connection pool and returns the lower of that and the total number of processors available
static java.util.Date getFieldAsDate(org.apache.lucene.document.Document document, java.lang.String fieldId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addFieldId

public static void addFieldId(@NotNull
                              java.lang.String fieldId,
                              long id,
                              @NotNull
                              org.apache.lucene.document.Document document)
Adds the field and value to the passed document. The id field can only be used as an exact match

Parameters:
fieldId -
id -
documentToAddFieldTo -

addField

public static void addField(@NotNull
                            java.lang.String fieldId,
                            @Nullable
                            java.lang.String fieldValue,
                            @NotNull
                            org.apache.lucene.document.Document document)

addField

public static void addField(@NotNull
                            java.lang.String fieldId,
                            @Nullable
                            java.lang.Number fieldValue,
                            @NotNull
                            org.apache.lucene.document.Document document)

addField

public static void addField(@NotNull
                            java.lang.String fieldId,
                            @Nullable
                            java.util.Date fieldValue,
                            @NotNull
                            org.apache.lucene.document.Document document)

getFieldAsDate

@Nullable
public static java.util.Date getFieldAsDate(@NotNull
                                                     org.apache.lucene.document.Document document,
                                                     @NotNull
                                                     java.lang.String fieldId)

buildAndQuery

@NotNull
public static org.apache.lucene.search.BooleanQuery buildAndQuery(@NotNull
                                                                          org.apache.lucene.search.Query... queries)

getConcurrentPoolSize

public static int getConcurrentPoolSize(@NotNull
                                        com.atlassian.config.db.HibernateConfig hibernateConfig)
Tries to get the maximum # of connections available in the connection pool and returns the lower of that and the total number of processors available

Parameters:
hibernateConfig -
Returns:


Copyright © 2010 Atlassian. All Rights Reserved.