Skip to content

Instantly share code, notes, and snippets.

@rajanim
Created October 13, 2015 15:38
Show Gist options
  • Select an option

  • Save rajanim/8e1b6a7a502877582edc to your computer and use it in GitHub Desktop.

Select an option

Save rajanim/8e1b6a7a502877582edc to your computer and use it in GitHub Desktop.
import command
{
"add-field" : {
"name":"name",
"type":"text_general",
"stored":true
},
"add-field" : {
"name":"initial_release_date",
"type":"tdate",
"stored":true
},
"add-field" : {
"name":"genre",
"type":"text_general",
"stored":true,
"multiValued":true
},
"add-field" : {
"name":"directed_by",
"type":"text_general",
"stored":true,
"multiValued":true
}
}
{
"add-field-type" : {
"name": "english_field",
"class": "solr.TextField",
"positionIncrementGap": "100",
"indexAnalyzer": {
"tokenizer": {
"class": "solr.StandardTokenizerFactory"
},
"filters": [
{
"class": "solr.StopFilterFactory",
"words": "lang/stopwords_en.txt",
"ignoreCase": "true"
},
{
"class": "solr.LowerCaseFilterFactory"
},
{
"class": "solr.EnglishMinimalStemFilterFactory"
}
]
},
"queryAnalyzer": {
"tokenizer": {
"class": "solr.StandardTokenizerFactory"
},
"filters": [
{
"class": "solr.StopFilterFactory",
"words": "lang/stopwords_en.txt",
"ignoreCase": "true"
},
{
"class": "solr.LowerCaseFilterFactory"
},
{
"class": "solr.SynonymFilterFactory",
"synonyms": "synonyms.txt",
"ignoreCase": "true",
"expand": "true"
},
{
"class": "solr.EnglishMinimalStemFilterFactory"
}
]
}
}}
java -Dtype="application/json" -Durl="http://localhost:8983/solr/gettingstarted/update" -jar post.jar ../films/films.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment