Package org.apache.lucene.store

Examples of org.apache.lucene.store.SimpleFSDirectory$SimpleFSIndexInput


    public void setUp() throws Exception {
       super.setUp();
       File file = new File(TEMP_DIR, "testIndex");
       _TestUtil.rmDir(file);
       // use a simple FSDir here, to be sure to have SimpleFSInputs
       dir = new SimpleFSDirectory(file,null);
    }
View Full Code Here


    public void setUp() throws Exception {
       super.setUp();
       File file = new File(System.getProperty("tempDir"), "testIndex");
       _TestUtil.rmDir(file);
       // use a simple FSDir here, to be sure to have SimpleFSInputs
       dir = new SimpleFSDirectory(file,null);
    }
View Full Code Here

                Date start = new Date();
                IndexWriter writer = null;

                log.info("Starting Lucene reindexing, this can take a couple of minutes...");

                Directory luceneDir = new SimpleFSDirectory(dir, null);
               
                try
                {
                    writer = getIndexWriter( luceneDir );
                    Collection allPages = m_engine.getPageManager().getAllPages();
View Full Code Here

        try
        {
            pageRemoved( page );

            // Now add back the new version.
            luceneDir = new SimpleFSDirectory(new File(m_luceneDirectory), null);
            writer = getIndexWriter( luceneDir );
           
            luceneIndexPage( page, text, writer );
        }
        catch ( IOException e )
View Full Code Here

    public void pageRemoved( WikiPage page )
    {
        IndexWriter writer = null;
        try
        {
            Directory luceneDir = new SimpleFSDirectory(new File(m_luceneDirectory), null);
            writer = getIndexWriter( luceneDir );
            Query query = new TermQuery( new Term( LUCENE_ID, page.getName() ) );
            writer.deleteDocuments( query );
        }
        catch ( Exception e )
View Full Code Here

            }

            try
            {
                File dir = new File(m_luceneDirectory);
                Directory luceneDir = new SimpleFSDirectory(dir, null);
                IndexReader reader = DirectoryReader.open(luceneDir);
                searcher = new IndexSearcher(reader);
            }
            catch( Exception ex )
            {
View Full Code Here

  }

  @Test
  public void sequenceFileDictionary() throws IOException {

    Directory index = new SimpleFSDirectory(indexDir);
    Analyzer analyzer = new StandardAnalyzer(Version.LUCENE_46);
    IndexWriterConfig config = new IndexWriterConfig(Version.LUCENE_46, analyzer);
    final IndexWriter writer = new IndexWriter(index, config);

    try {
View Full Code Here

    if (directory == null) {

      final File file = new File(folder);

      directory = new SimpleFSDirectory(file);

    }

    return directory;
View Full Code Here

    final String[] ruleIds = args[0].split(",");
    final String languageCode = args[1];
    final Language language = Language.getLanguageForShortName(languageCode);
    final File indexDir = new File(args[2]);
    final boolean limitSearch = args.length > 3 && "--no_limit".equals(args[3]);
    final Searcher searcher = new Searcher(new SimpleFSDirectory(indexDir));
    if (!limitSearch) {
      searcher.setMaxHits(100_000);
    }
    searcher.limitSearch = limitSearch;
    final ContextTools contextTools = getContextTools(140);
View Full Code Here

    if (directory == null) {

      final File file = new File(folder);

      directory = new SimpleFSDirectory(file);

    }

    return directory;
View Full Code Here

TOP

Related Classes of org.apache.lucene.store.SimpleFSDirectory$SimpleFSIndexInput

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.