[Lecene 6회차] Welcome to New face & Analyze about Index.

2012. 9. 20. 19:34OpenSource/Lucene

반응형



2012/09/13 - [OpenSource/Lucene] - [Lucene 5] - Talk and Analyze about Index with goodtac!

1. 새로운 멤버 영입 : er1ca, 아도니우스
   총 멤버 : 4명(4ceT, 굿택,  er1ca, 아도니우스)

2. 색인 분석(index analyze)
    색인 주요 클래스는 처음 스터디를 할 때 정리를 했었다.
    더욱 Detail하게 알아보자!^0^good~
  
    1. IndexWriter : 색인 과정 전체를 총괄하는 클래스. 새로운 색인을 만들 수 있으며,
                          색인에 문서를 추가하는 작업도 IndexWriter를 통해야만 한다.
        ※ 단, 버전이 바뀌어서 사용법이 1.x 하고는 다르다.

       사용법
       IndexWriterConfig <--이녀석이 새로 생김.
       - 새롭게 변경 된 내용이며, 
         call the setters to set your configuration, then pass it to IndexWriter이다.
         설정을 불러서 IndexWriter에 넘긴다는 것이다.^-^good~

       IndexWriterConfig conf = new IndexWriterConfig(Version.LUCENE_35, new KeywordAnalyzer() );
       => 위의 코드를 보면 루씬버전과 형태소분석이 들어가는 것을 볼 수 있다.
        
       IndexWriter writer = new IndexWriter(idxDir, conf);
       IndexWriter은 위에서 설명한 것과 같이 색인관련 클래스이다.
       레퍼런스에는 An IndexWriter creates and maintains an index. 라고 정의 되어져있다.

       // Directory => 색인 저장, 색인저장소 - 1) FSDirectory, RAMDirectory
       Directory idxDir = FSDirectory.open(new File(idxPath));
   
       - to be continue..
반응형