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 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
> 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 [email protected].
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.

Reply via email to