When I am doing es.search using pyelasticsearch I am able to get results,
but doing REST API, I do not get results. Please help. Thanks
searchdoc yields results but rest api gives 0 hits.
py elastic search settings:
bodyquery = {
"custom_score": {
"script" : "_score *
("+str(1.0+recency)+"**(doc['articleid'].value*50000.0/"+maxarticleid+"))",
"query": {
"query_string": {"query": "Arvind", "fields":
["text", "title^3", "domain"]}
}
}
}
REST API query:
http://46.137.209.142:9200/article-index/article/_search?q=Arvind
My indexing settings are:
'settings': {
'analysis': {
'analyzer': {
'my_ngram_analyzer' : {
'tokenizer' :
'my_ngram_tokenizer',
'filter':
['my_synonym_filter']
}
},
'filter': {
'my_synonym_filter': {
'type': 'synonym',
'format': 'wordnet',
'synonyms_path':
'analysis/wn_s.pl'
}
},
'tokenizer' : {
'my_ngram_tokenizer' : {
'type' : 'nGram',
'min_gram' : '1',
'max_gram' : '50'
}
}
}
},
'mappings': {
'article': {
'_all': {
'enabled': False
},
'_source': {
'compressed': True
},
'properties': {
'tags': {
'type': 'string',
'index':
'not_analyzed'
}
}
}
}
Thanks. Please advise.
--
Pratik Poddar
www.linkedin.com/in/pratikpoddar
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAFiYsPdbbG3o4cS2qcv-ND2-xcp7xh84Z%3DWDOhv3-rEm0VsQbw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.