No results in REST API

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.

It looks like your python query doesn't specify the index and the type to
query, so the equivalent REST call would rather look like:

http://46.137.209.142:9200/_search?q=Arvind

On Wed, May 21, 2014 at 6:29 AM, Pratik Poddar pratik.phodu@gmail.comwrote:

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 Elasticsearch 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
Pratik Poddar - Nexus Venture Partners | LinkedIn
http://www.cseblog.com
http://pratikpoddar.wordpress.com/

--
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.comhttps://groups.google.com/d/msgid/elasticsearch/CAFiYsPdbbG3o4cS2qcv-ND2-xcp7xh84Z%3DWDOhv3-rEm0VsQbw%40mail.gmail.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
Adrien Grand

--
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/CAL6Z4j4Zrk_00fqtnTTCs%3DumFghj7%2BteGn7MLg7B5gK%2BO77Jow%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Hi
Could you please help me to connect my server xx.xxx.xx.xxx:12345 with
elasticsearch rest api in python. I tried alot but still not able to
established the connection.

On Wednesday, 21 May 2014 09:59:29 UTC+5:30, Pratik Poddar wrote:

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 Elasticsearch 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
Pratik Poddar - Nexus Venture Partners | LinkedIn
http://www.cseblog.com
http://pratikpoddar.wordpress.com/

--
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/de380e4f-85c1-4959-b42e-9dde9e520a37%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.