Examples of IndexPathProperty


Examples of org.ytreza.app.noterex.application.properties.index.IndexPathProperty

  public List<Property> getPropertiesList() {
    List<Property> list = new ArrayList<Property>();
    list.add(new DriverProperty());
    list.add(new LanguageProperty());
    list.add(new IndexPathProperty());
   
    return list;
  }
View Full Code Here

Examples of org.ytreza.app.noterex.application.properties.index.IndexPathProperty

  public Indexer(String type) throws IOException {
    this.type = type;
  }
 
  public void index(T item) throws CorruptIndexException, IOException, ItemException {
    IndexPathProperty pathIndex = new IndexPathProperty();
    FSDirectory directory = FSDirectory.open(new File(pathIndex.getValue()));
    IndexWriter writer = new IndexWriter(directory, new StandardAnalyzer(Version.LUCENE_30), IndexWriter.MaxFieldLength.LIMITED);

    writer.updateDocument(new Term(type + "_id", item.getId().toString()), item.getDocument());
    writer.optimize();
    writer.close();
View Full Code Here

Examples of org.ytreza.app.noterex.application.properties.index.IndexPathProperty

    writer.close();
    directory.close();
  }
 
  public void delete(T item) throws CorruptIndexException, IOException, ItemException {
    IndexPathProperty pathIndex = new IndexPathProperty();
    FSDirectory directory = FSDirectory.open(new File(pathIndex.getValue()));
    IndexWriter writer = new IndexWriter(directory, new StandardAnalyzer(Version.LUCENE_30), IndexWriter.MaxFieldLength.LIMITED);
    writer.deleteDocuments(new Term(type + "_id", item.getId().toString()));
    writer.optimize();
    writer.close();
    directory.close();
View Full Code Here

Examples of org.ytreza.app.noterex.application.properties.index.IndexPathProperty

    writer.close();
    directory.close();
  }

  public static void reset() throws CorruptIndexException, LockObtainFailedException, IOException {
    IndexPathProperty pathIndex = new IndexPathProperty();
    FSDirectory directory = FSDirectory.open(new File(pathIndex.getValue()));
    IndexWriter writer = new IndexWriter(directory, new StandardAnalyzer(Version.LUCENE_30), true, IndexWriter.MaxFieldLength.LIMITED);
    writer.optimize();
    writer.close();
    directory.close();
  }
View Full Code Here

Examples of org.ytreza.app.noterex.application.properties.index.IndexPathProperty

   
    return result;
  }
 
  public static List<Tag> extractAllTag() throws CorruptIndexException, LockObtainFailedException, IOException, ItemException {
    IndexPathProperty pathIndex = new IndexPathProperty();
    FSDirectory directory = FSDirectory.open(new File(pathIndex.getValue()));
   
    IndexReader reader = IndexReader.open(directory);
    List<Tag> result = extractTag(reader);
   
    reader.close();
View Full Code Here

Examples of org.ytreza.app.noterex.application.properties.index.IndexPathProperty

  public Searcher(String prefix, Reader<T> reader) throws IOException {
   
    this.prefix = prefix;
    this.reader = reader;
    IndexPathProperty pathIndex = new IndexPathProperty();
    directory = FSDirectory.open(new File(pathIndex.getValue()));
  }
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.