Okay. In Lucene.Net you add your documents to an index. When searching you load the index and create an analyzer for the fields you want to search on. The analyzer comes into play when searching the index.
The difference in elasticsearch, it seems to me, is the analyzer goes with the field, defined in a PUT command with the mapping.
On on the Index api page, separate out Indexing a document, which is really saving a document to an index that's already defined.
Then show the mapping PUT statement including indexing commands, like:
PUT crud_sample
{
"mappings": {
"Customer_Info": {
"properties": {
"id": {
"type": "long"
},
"name": {
"type": "text",
"index" : {
"analysis" : {
"analyzer" : {
"my_analyzer" : {
"tokenizer" : "standard",
"filter" : ["standard", "lowercase", "my_stemmer"]
}
},
"filter" : {
"my_stemmer" : {
"type" : "stemmer",
"name" : "light_english"
}
}
}
}
},
"age": {
"type": "integer"
},
"birthday": {
"type": "date",
"format": "basic_date"
},
"hasChildren": {
"type": "boolean"
},
"enrollmentFee": {
"type": "double"
}
}
}
}
}
But it appears that that doesn't work. So, I guess my question is how do I run this:
{
"index" : {
"analysis" : {
"analyzer" : {
"my_analyzer" : {
"tokenizer" : "standard",
"filter" : ["standard", "lowercase", "my_stemmer"]
}
},
"filter" : {
"my_stemmer" : {
"type" : "stemmer",
"name" : "light_german"
}
}
}
}
}