Package org.apache.lucene.index

Examples of org.apache.lucene.index.IndexFileNameFilter


   * @throws IOException
   */
  public static void copy(Directory src, Directory dest, boolean closeDirSrc) throws IOException {
    final String[] files = src.listAll();

    IndexFileNameFilter filter = IndexFileNameFilter.getFilter();

    byte[] buf = new byte[BufferedIndexOutput.BUFFER_SIZE];
    for (int i = 0; i < files.length; i++) {

      if (!filter.accept(null, files[i]))
        continue;

      IndexOutput os = null;
      IndexInput is = null;
      try {
View Full Code Here


  }
 
  private RAMDirectory(Directory dir, boolean closeDir) throws IOException {
    this();

    IndexFileNameFilter filter = IndexFileNameFilter.getFilter();
    for (String file : dir.listAll()) {
      if (filter.accept(null, file)) {
        dir.copy(this, file, file);
      }
    }
    if (closeDir) {
      dir.close();
View Full Code Here

   * }
   * </pre>
   */
  @Deprecated
  public static void copy(Directory src, Directory dest, boolean closeDirSrc) throws IOException {
    IndexFileNameFilter filter = IndexFileNameFilter.getFilter();
    for (String file : src.listAll()) {
      if (filter.accept(null, file)) {
        src.copy(dest, file, file);
      }
    }
    if (closeDirSrc) {
      src.close();
View Full Code Here

  }

  public RefCntRamDirectory(Directory dir) throws IOException {
    this();

    IndexFileNameFilter filter = IndexFileNameFilter.getFilter();
    for (String file : dir.listAll()) {
      if (filter.accept(null, file)) {
        dir.copy(this, file, file);
      }
    }
  }
View Full Code Here

  }
 
  private RAMDirectory(Directory dir, boolean closeDir) throws IOException {
    this();

    IndexFileNameFilter filter = IndexFileNameFilter.getFilter();
    for (String file : dir.listAll()) {
      if (filter.accept(null, file)) {
        dir.copy(this, file, file);
      }
    }
    if (closeDir) {
      dir.close();
View Full Code Here

   * }
   * </pre>
   */
  @Deprecated
  public static void copy(Directory src, Directory dest, boolean closeDirSrc) throws IOException {
    IndexFileNameFilter filter = IndexFileNameFilter.getFilter();
    for (String file : src.listAll()) {
      if (filter.accept(null, file)) {
        src.copy(dest, file, file);
      }
    }
    if (closeDirSrc) {
      src.close();
View Full Code Here

        {
            String[] names = indexDirectory.listAll();

            if ( names != null )
            {
                IndexFileNameFilter filter = IndexFileNameFilter.getFilter();

                for ( int i = 0; i < names.length; i++ )
                {
                    if ( filter.accept( null, names[i] ) )
                    {
                        indexDirectory.deleteFile( names[i] );
                    }
                }
            }
View Full Code Here

   * @throws IOException
   */
  public static void copy(Directory src, Directory dest, boolean closeDirSrc) throws IOException {
    final String[] files = src.listAll();

    IndexFileNameFilter filter = IndexFileNameFilter.getFilter();

    byte[] buf = new byte[BufferedIndexOutput.BUFFER_SIZE];
    for (int i = 0; i < files.length; i++) {

      if (!filter.accept(null, files[i]))
        continue;

      IndexOutput os = null;
      IndexInput is = null;
      try {
View Full Code Here

   * @throws IOException
   */
  public static void copy(Directory src, Directory dest, boolean closeDirSrc) throws IOException {
    final String[] files = src.listAll();

    IndexFileNameFilter filter = IndexFileNameFilter.getFilter();

    byte[] buf = new byte[BufferedIndexOutput.BUFFER_SIZE];
    for (int i = 0; i < files.length; i++) {

      if (!filter.accept(null, files[i]))
        continue;

      IndexOutput os = null;
      IndexInput is = null;
      try {
View Full Code Here

   * }
   * </pre>
   */
  @Deprecated
  public static void copy(Directory src, Directory dest, boolean closeDirSrc) throws IOException {
    IndexFileNameFilter filter = IndexFileNameFilter.getFilter();
    for (String file : src.listAll()) {
      if (filter.accept(null, file)) {
        src.copy(dest, file, file);
      }
    }
    if (closeDirSrc) {
      src.close();
View Full Code Here

TOP

Related Classes of org.apache.lucene.index.IndexFileNameFilter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.