2월, 2016의 게시물 표시

검색 엔진 기초 정리자료!

https://docs.google.com/presentation/d/1Y722S9eYL3IhuyIaixIONdSn5LcO_SfjhvCjr3YRrY8/edit?usp=sharing

CentOS에서 node-gyp 에러 발생시 참고

http://superuser.com/questions/381160/how-to-install-gcc-4-7-x-4-8-x-on-centos
# mongo-connector 관련 ## 기본 동작 과정 OplogThread 생성 main Connector thread 에서 MongoDB node의 type을 isdbgrid 명령으로 확인 isdbgrid 메서드 없으면 mongod (replica set), 있으면 mongos node (shard cluster) 이 정보를 기반으로 Connector thread 가 OplogThread 생성 replica set -> replica set의 primary를 위한 OplogThread 생성 shard cluster -> 각 shard의 primary node를 위한 OplogThread 생성 각 replication endpoint 마다 하나 이상의 DocManager 초기화한 후 OplogThread에 전달 mongod Cursor 생성 OplogThread 는 mongod 에서 oplog.rs collection 의 tailable cursor 를 생성 OplogThread 에서 "collection dump" OplogThread 는 DocManagers 의 namespace에 있는 collection 의 모든 doc을 "collection dump" 처음 mongo-connector 시작할 때만 "collection dump". 이후에는 mongo-connector last oplog timestamp를 이용 OplogThread 동작 OplogThread는 loop 돌면서 oplog에 새로운 doc이 생길 때마다 가져와서 확인 oplog operation 정보를 확인해서 각 DocManager에 적혀있는 적절한 메서드 호출 insert: doc 을 MongoDB에서 가져와서 DocManager의 upsert method 호출 update: DocManager가 remote system(ex)solr)의 doc 버전을 확인 후 u

Solr 5.4.1설치 및 한글 분석기 설정

Solr-5.4.1 설치 및 한글 분석기 설정 mecab-ko 설치 mecab-0.996-ko-0.9.2.tar.gz 다운로드 설치 $ tar -zxvf mecab-0.996-ko-0.9.2.tar.gz $ cd mecab-0.996-ko-0.9.2 $ ./configure $ make $ make check $ sudo make install mecab-ko-dic 설치 mecab-ko-dic-2.0.1-20150920.tar.gz 다운로드 설치 $ tar -zxvf mecab-ko-dic-2.0.1-20150920.tar.gz $ cd mecab-ko-dic-2.0.1-20150920 $ ./configure $ make $ sudo make install mecab 테스트 mecab 테스트 $ mecab -d /usr/local/lib/mecab/dic/mecab-ko-dic mecab 동작 테스트 mecab-java 설치 mecab-java-0.996.tar.gz 다운로드 설치 $ tar -zxvf mecab-java-0.996.tar.gz $ cd mecab-java-0.996 $ vi Makefile Makefile 수정 (MAC)   INCLUDE=/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/include   all:   $(CXX) -shared  $(TARGET)_wrap.o -o lib$(TARGET).dylib $(LIBS)   $(JAVAC) -cp . test.java   test:   env DYLD_LIBRARY_PATH=. $(JAVA) test   clean:   rm -fr *.jar *.o *.dylib *.so *.class $(PACKAGE)/*.class $ vi Makefile Makefile 수정 (Linux)   INCLUDE=/ (자신의 j

API 문서화. API Documentation Generator 관련

#  Compare API Documentation Generator  1. 고려할 사항 1) RESTful API를 문서화하기 편해야 한다. 2) 문서를 위한 파일을 따로 만들 필요가 없어야 한다. 3) 주석으로 작성한 내용을 문서로 만들어주는 형태이어야 한다. 4) Parameter가 보기 편해야 한다. 5) Example을 작성할 수 있어야 한다. 6) npm module 형태로 설치 가능해야 한다. 7) 학습 비용이 적어야 한다. 2. 후보군 1) JSDoc - RESTful API 문서화하기 불편 -  https://github.com/jsdoc3/jsdoc 2) Swagger  - 문서를 위한 파일을 따로 만들어야 함 - 작성하는 스타일 학습 필요 - 작성해야 할 내용 많음 -  http://editor.swagger.io/#/ 3) API Blueprint - 별도의 md 파일 작성해야 함 -  https://github.com/apiaryio/api-blueprint/blob/master/Tutorial.md 4) apiDoc - 독자적인 문법 체계 쓰므로 학습 필요 - Parameter 보기 편함 -  http://apidocjs.com/#examples 5) groc - 기존 JSDoc 스타일 그대로 사용 가능 - Parameter 알아보기 불편함 -  http://nevir.github.io/groc/