'2021/09/15'에 해당되는 글 2건

  1. 2021.09.15 [Gradle] 6.x 에서 7.x 로 넘어 오면서 runtime, compile.
  2. 2021.09.15 [Elasticsearch] _analyze API 예제 영단어 처리.

[Gradle] 6.x 에서 7.x 로 넘어 오면서 runtime, compile.

ITWeb/개발일반 2021. 9. 15. 17:51

아래와 같이 변경 해서 사용 하면 됩니다.

- Gradle 6.x 에서 Gradle 7.x 로 넘어 오면서 runtime, compile.
[6.x]
task copyDependencies(type: Copy) {
  into "$buildDir/libs/deps"
  from configurations.runtime
}

[7.x]
task copyDependencies(type: Copy) {
  into "$buildDir/libs/deps"
  from configurations.runtimeClasspath
}

[6.x]
jar {
  manifest {
    attributes 'Main-Class': 'Main.class',
        'Class-Path': configurations.compile.files.collect { "deps/$it.name" }.join(' ')
  }

  archiveName 'dictionary.jar'
  from {
    configurations.runtime.collect { it.isDirectory() ? it : zipTree(it) }
  }
}

[7.x]
jar {
  manifest {
    attributes 'Main-Class': 'Main.class',
        'Class-Path': configurations.compileClasspath.files.collect { "deps/$it.name" }.join(' ')
  }

  archiveName 'dictionary.jar'
}

 

:

[Elasticsearch] _analyze API 예제 영단어 처리.

Elastic/Elasticsearch 2021. 9. 15. 11:44

아리랑을 이용한 영단어 처리와 특수문자 제거 예제 입니다.

_analyze API 예제 이고 index 에는 settings 에 선언 하시면 됩니다.

{
    "tokenizer" : "arirang_tokenizer",
    "filter": [        
        "arirang_filter",
        {
            "type": "stemmer",
            "language": "possessive_english"
        },
        "lowercase",
        "classic",
        {
            "type": "stemmer",
            "language": "english"
        }
    ],
    "char_filter": {
        "type": "pattern_replace",
        "pattern": "\\p{Punct}",
        "replacement": ""
    },
    "text": ""
}

text 부분에 분석할 문자열을 넣으세요.

: