Package net.sf.clairv.index.document

Examples of net.sf.clairv.index.document.Document.addField()


  protected void visitFileRecursively(File file, DocumentHolder holder, DocumentFactory docFactory) {
    if (file.isFile()) {
      if (isIncluded(file) && !isExcluded(file)) {
        Document doc = processFile(file, docFactory);
        if (doc != null) {
          doc.addField("fileName", file.getName(), StoreOption.YES,
              IndexOption.TOKENIZED);
          doc.addField("filePath", file.getAbsolutePath(),
              StoreOption.YES, IndexOption.NO);
          doc.addField("fileSize", file.length() / 1024 + "KB",
              StoreOption.YES, IndexOption.NO);
View Full Code Here


      if (isIncluded(file) && !isExcluded(file)) {
        Document doc = processFile(file, docFactory);
        if (doc != null) {
          doc.addField("fileName", file.getName(), StoreOption.YES,
              IndexOption.TOKENIZED);
          doc.addField("filePath", file.getAbsolutePath(),
              StoreOption.YES, IndexOption.NO);
          doc.addField("fileSize", file.length() / 1024 + "KB",
              StoreOption.YES, IndexOption.NO);
          doc.addField("modificationTime", DateTools.dateToString(
              (new Date(file.lastModified())),
View Full Code Here

        if (doc != null) {
          doc.addField("fileName", file.getName(), StoreOption.YES,
              IndexOption.TOKENIZED);
          doc.addField("filePath", file.getAbsolutePath(),
              StoreOption.YES, IndexOption.NO);
          doc.addField("fileSize", file.length() / 1024 + "KB",
              StoreOption.YES, IndexOption.NO);
          doc.addField("modificationTime", DateTools.dateToString(
              (new Date(file.lastModified())),
              DateTools.Resolution.SECOND), StoreOption.YES,
              IndexOption.NO);
View Full Code Here

              IndexOption.TOKENIZED);
          doc.addField("filePath", file.getAbsolutePath(),
              StoreOption.YES, IndexOption.NO);
          doc.addField("fileSize", file.length() / 1024 + "KB",
              StoreOption.YES, IndexOption.NO);
          doc.addField("modificationTime", DateTools.dateToString(
              (new Date(file.lastModified())),
              DateTools.Resolution.SECOND), StoreOption.YES,
              IndexOption.NO);
          fileCount++;
          holder.addDocument(doc);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.