Hi, my apologies for the repost - the last one was posted only half
written and I cannot work out how to delete it
In my elasticsearch.yml file am trying to implement some mapping where one
field belonging to one type is indexed using a different analyzer to the
rest.
At present I have the following structure in my elasticsearch.yml file:
Index Settings
index:
bookshelf:
types:
book:
mappings:
title: {analyzer: customAnalyzer}
analysis:
analyzer:
# set standard analyzer with no stop words as the default for both
indexing and searching
default:
type: standard
stopwords: none
# set custom analyser to provide a more detailed search result
customAnalyzer:
type: custom
tokenizer: nGramTokenizer
filter: [lowercase,stopWordsFilter,asciifolding]
tokenizer:
nGramTokenizer:
type: nGram
min_gram: 1
max_gram: 2
filter:
nGramFilter:
type: nGram
min_gram: 1
max_gram: 2
stopWordsFilter:
type: stop
stopwords: none
This does not apply the custom analyzer to the title field, so I was hoping
someone may be able to point me in the right direction for applying custom
analyzers to individual fields?
Hi, my apologies for the repost - the last one was posted only half written
and I cannot work out how to delete it
In my elasticsearch.yml file am trying to implement some mapping where one
field belonging to one type is indexed using a different analyzer to the rest.
At present I have the following structure in my elasticsearch.yml file:
Index Settings
index :
bookshelf :
types :
book :
mappings :
title : { analyzer : customAnalyzer }
analysis :
analyzer :
# set standard analyzer with no stop words as the default for both
indexing and searching
default :
type : standard
stopwords : none
# set custom analyser to provide a more detailed search result
customAnalyzer :
type : custom
tokenizer : nGramTokenizer
filter : [ lowercase , stopWordsFilter , asciifolding ]
tokenizer :
nGramTokenizer :
type : nGram
min_gram : 1
max_gram : 2
filter :
nGramFilter :
type : nGram
min_gram : 1
max_gram : 2
stopWordsFilter :
type : stop
stopwords : none
This does not apply the custom analyzer to the title field, so I was hoping
someone may be able to point me in the right direction for applying custom
analyzers to individual fields?
Le 4 octobre 2012 à 14:16, My Head Hurts <mathi...@gmail.com <javascript:>>
a écrit :
Hi, my apologies for the repost - the last one was posted only half
written and I cannot work out how to delete it
In my elasticsearch.yml file am trying to implement some mapping where one
field belonging to one type is indexed using a different analyzer to the
rest.
At present I have the following structure in my elasticsearch.yml file:
Index Settings
index :
bookshelf :
types :
book :
mappings :
title : { analyzer : customAnalyzer }
analysis :
analyzer :
# set standard analyzer with no stop words as the default for both
indexing and searching
default :
type : standard
stopwords : none
# set custom analyser to provide a more detailed search result
customAnalyzer :
type : custom
tokenizer : nGramTokenizer
filter : [ lowercase , stopWordsFilter , asciifolding ]
tokenizer :
nGramTokenizer :
type : nGram
min_gram : 1
max_gram : 2
filter :
nGramFilter :
type : nGram
min_gram : 1
max_gram : 2
stopWordsFilter :
type : stop
stopwords : none
This does not apply the custom analyzer to the title field, so I was
hoping someone may be able to point me in the right direction for applying
custom analyzers to individual fields?
Thanks David, I am not using spring so I shall look into your code a little more if you do not mind.
I am sure I will find the information very helpful, so thank you.
On Thursday, 4 October 2012 15:01:55 UTC+2, David Pilato wrote:
If you are using Java you don't have to use an yml file. You can, but you don't have to.
Hi, my apologies for the repost - the last one was posted only half written and I cannot work out how to delete it
In my elasticsearch.yml file am trying to implement some mapping where one field belonging to one type is indexed using a different analyzer to the rest.
At present I have the following structure in my elasticsearch.yml file:
Index Settings
index :
bookshelf :
types :
book :
mappings :
title : { analyzer : customAnalyzer }
analysis :
analyzer :
# set standard analyzer with no stop words as the default for both indexing and searching
default :
type : standard
stopwords : none
# set custom analyser to provide a more detailed search result
customAnalyzer :
type : custom
tokenizer : nGramTokenizer
filter : [ lowercase , stopWordsFilter , asciifolding ]
tokenizer :
nGramTokenizer :
type : nGram
min_gram : 1
max_gram : 2
filter :
nGramFilter :
type : nGram
min_gram : 1
max_gram : 2
stopWordsFilter :
type : stop
stopwords : none
This does not apply the custom analyzer to the title field, so I was hoping someone may be able to point me in the right direction for applying custom analyzers to individual fields?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.