Package org.apache.lucene.store

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


  @Transactional(readOnly = true)
  public List<Content> searchList(String path, String queryString,
      Integer siteId, Integer channelId, Date startDate, Date endDate,
      int first, int max) throws CorruptIndexException, IOException,
      ParseException {
    Directory dir = new SimpleFSDirectory(new File(path));
    return searchList(dir, queryString, siteId, channelId, startDate,
        endDate, first, max);
  }
View Full Code Here


    @Override
    public void setUp() throws Exception {
       super.setUp();
       File file = createTempDir("testIndex");
       // 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(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

TOP

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

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.