0

In the Field Annotation the indexAnalyzer not found, Is this any version problem.

Error:- The attribute indexAnalyzer is undefined for the annotation type Field

My Gradle:-

dependencies {
    compile('org.springframework.boot:spring-boot-starter-web')
    compile group: 'commons-validator', name: 'commons-validator', version: '1.6'
    //compile group: 'org.springframework.boot', name: 'spring-boot-starter-data-elasticsearch', version: '1.2.5.RELEASE'
    //compile group: 'org.springframework.boot', name: 'spring-boot-starter-data-elasticsearch', version: '1.5.6.RELEASE'
    compile('org.springframework.boot:spring-boot-starter-data-elasticsearch:1.3.2.RELEASE')
    compile group: 'net.java.dev.jna', name: 'platform', version: '3.5.0'
    testCompile('org.springframework.boot:spring-boot-starter-test')
}
6
  • 2
    indexAnalyzer has been removed in 2.0, analyzer is the one you should be using. elastic.co/guide/en/elasticsearch/reference/2.0/… Commented Aug 24, 2017 at 3:21
  • Ok, so how can I define my custom analyzer. @Field(type = FieldType.String, index = FieldIndex.analyzed, analyzer = "autocomplete") the above one is showing the error at build time, the error is :- Caused by: MapperParsingException[analyzer [autocomplete] not found for field [contentTitle]] Commented Aug 24, 2017 at 5:35
  • That's something you need to set up when you create your index. Commented Aug 24, 2017 at 5:47
  • Hi, Yes, I have @Setting(settingPath = "/home/deepeshk/Desktop/Learning_Project/LMS-BackEnd/kp-lms-microservices/elastic-services/build/libs/elasticsearch-settings.json") and json file also available, but its not working , can you pls give me some example. Commented Aug 24, 2017 at 7:07
  • 1
    This answer might help: stackoverflow.com/questions/31992274/… Commented Aug 24, 2017 at 7:19

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.