Tagged Questions
0
votes
0answers
7 views
Python & ElasticSearch: Correct way to use scroll
I'm trying to retrieve a bunch of documents from my elasticsearch db and return it to my webpage. According to the documentations I'm finding online, considering I could be returning thousands of ...
0
votes
1answer
10 views
how to send a plain query to elasticsearch with pyes
I have a plain query that I would like to send to Elasticsearch through pyes without using pyes's builtin methods. The query works when it's CURLed.
further below is my code, but I can't make it ...
1
vote
1answer
24 views
ElasticSearch GeoDistance Query
I am using geodistance query in python like this
{
"query": {
"filtered": {
"query": {
"match_all": {}
},
"filter": {
"geo_distance": {
"distance": ...
0
votes
1answer
47 views
elasticsearch-py scan and scroll to return all documents
I am using elasticsearch-py to connect to my ES database which contains over 3 million documents. I want to return all the documents so I can abstract data and write it to a csv. I was able to ...
0
votes
2answers
36 views
Elasticsearch match multiple fields
I am recently using elasticsearch in a website. The scenario is, I have to search a string on afield. So, if the field is named as title then my search query was,
"query" :{"match": {"title": ...
0
votes
1answer
36 views
Python and Elasticsearch autcompletion
I am trying to work with Python Elasticsearch version 1.1.0, on the master branch. It seems it will create an index, but there are issues with retrieving autocomplete results, when using a suggestion ...
0
votes
0answers
14 views
Python and Elasticsearch API changes and Autcomplete
So to begin. I am trying to add around 7.2k documents. No problem there. The issue is after I am not able to get any suggestions returned to me. So this is how the information is added:
def ...
0
votes
0answers
30 views
Elasticsearch response code
I'm a newbie to elasticsearch and would like to know how to check the status code of the response using my Python code..I will be using subprocess module to execute the curl command..how can I check ...
0
votes
1answer
90 views
Elastic Search Function_Score Query with Query_String
I was doing search using elastic search using the code:
es.search(index="article-index", fields="url", body={"query": {"query_string": {"query": keywordstr, "fields": ["text", "title", "tags", ...
0
votes
0answers
20 views
ElasticSearch PyES FunctionScoreQuery
I am trying to use
pyes.query.FunctionScoreQuery
in python but getting this error
NameError: name 'FunctionScoreQuery' is not defined
I am using PyES version 0.19.1. I tried to look for ...
2
votes
1answer
29 views
Django-Haystack: should_update doesn't appear to trigger with RealtimeSignalProcessor?
I have a model that has a boolean field that states whether the model object is active or not. I basically wish for Haystack to ignore any objects with active=False. This works fine for a complete ...
0
votes
1answer
72 views
Error: The 'elasticsearch' backend requires the installation of 'requests'. How do I fix it?
I´m having a issue when I ran "python manage.py rebuild_index" in my app supported by haystack and elasticsearch.
Python 2.7
Django version 1.6.2
Haystack 2.1.0
Elasticsearch 1.0
Please see the ...
0
votes
0answers
56 views
How to use a script to update an array of json objects in Elastic search
I want to have an array of objects in my ES document. part of the document mapping is
mapping_data = {
"mappings": {
config.ES_PAIRS: {
"properties": {
...
0
votes
1answer
27 views
Haystack: stats() and stats_results() doesn't work
I have the following problem with Haystack and Django. That what I am trying to do is to filter the model Books some objects and get the max and the min price. Basically bellow is the query, where sq ...
0
votes
1answer
34 views
Update haystack index on record deletion without re-indexing entire database
Is it possible to update an entire haystack index without re-indexing the entire database? I have a database of 2.6 million records, each with related tables. If I run:
python manage.py update_index ...
0
votes
0answers
39 views
Haystack haystack.signals.RealtimeSignalProcessor not indexing new objects
I have a Haystack/Elasticsearch/Django setup and registed the setting:
HAYSTACK_SIGNAL_PROCESSOR = 'haystack.signals.RealtimeSignalProcessor'
New objects however are not being indexed, forcing me ...
0
votes
1answer
31 views
elasticsearch/haystack not persisting across server restarts
I have a simple project indexing some Django models in to ElasticSearch via Haystack. If I restart the ElasticSearch server, I get no results out of Haystack unless I update the index.
I think that ...
0
votes
0answers
51 views
django-haystack + elasticsearch + more_like_this
I'm using django-haystack with elasticsearch.
I have a problem when i'm using the "more like this" functionality
here is what I doing:
>>> from haystack.query import SearchQuerySet
...
1
vote
1answer
71 views
How to query Elasticsearch to boost by specific field
How do you index and query documents containing a custom weight so that you can use that weight to promote specific query results?
I've indexed simple documents with bodies like {"text":"how now ...
0
votes
1answer
68 views
Install “elasticsearch” instead of “pyelasticsearch”
How can I install official elasticsearch binding for python instead of pyelasticsearch?
Haystack documentation says:
You’ll also need an Elasticsearch binding: elasticsearch-py (NOT
pyes). Place ...
0
votes
1answer
47 views
Which of following is best way to query elasticsearch from python?
The official elasticsearch python client
from elasticsearch import Elasticsearch
es = Elasticsearch()
result = es.get(index="test_index", id=1)
print(result)
or
import urllib2
import json
...
0
votes
0answers
86 views
How can I convert the 64 bit timestamp returned from elasticsearch into a datetime in python?
My date histogram query returns something like this:
"facets": {
"hist": {
"_type": "date_histogram",
"entries": [
{
"time": 1385856000000,
"count": 1884
...
0
votes
1answer
86 views
Elasticsearch Python - Index Analyzer & Search Analyzer
I am using python api - http://elasticsearch-py.readthedocs.org
How can I set change the index analyzer and tokenizer for the index? Thanks
I found suggestions to change the mapping of the index, ...
0
votes
1answer
44 views
Python wrapper for ElasticSearch on Heroku
I'm trying to use the ElasticSearch Python wrapper on Heroku. I have used the Bonsai Heroku add-on, and have received a URL that looks like the one given in the documentation, ...
1
vote
1answer
141 views
How to configure relevance of term on Haystack with Elasticsearch
I have set up a Djangoproject and now want to include a non-database-search with haystack and elasticsearch as backend. In the Indexes I used EdgeNgramFields for text. Everything works fine, except ...
0
votes
1answer
56 views
ElasticSearch and Python - Correct methodolgy
I am building a search engine for the list of articles I have. I was advised by a lot of people to use elastic search for full text search. I wrote the following code. It works. But I have a few ...
0
votes
0answers
74 views
Haystack & ElasticSearch: Searching Related Fields; Use nested Type?
I am using django-haystack on elastic search. My indexed documents each have a number of people's names and for each person, their role associated with the document. For example:
Doc1:
...
1
vote
1answer
600 views
Elastic Search HTTPConnectionPool(host='127.0.0.1', port=9200): Max retries exceeded
I have an Elastic Search server which I am querying both from a live website and through a Django management command. The management command runs using celery beat at 3am GMT to synchronise data from ...
1
vote
2answers
120 views
Python custom scripting in ElasticSearch
The index has the capability of taking custom scripting in Python, but I can't find an example of custom scripting written in Python anywhere. Does anybody have an example of a working script? One ...
0
votes
2answers
172 views
query an empty string in elasticsearch
Is that possible that try to query an empty string in elasticsearch without error?
The situation now in my case is there are some words is stored in index, I will receive some data, I want use this ...
6
votes
2answers
357 views
Django haystack EdgeNgramField given different results than elasticsearch
I'm currently running haystack with an elasticsearch backend, and now I'm building an autocomplete for cities names. The problem is that SearchQuerySet is giving me different results, which from my ...
0
votes
2answers
512 views
How to use Bulk API to store the keywords in ES by using Python
I have to store some message in ElasticSearch integrate with my python program.
Now what I try to store the message is:
d={"message":"this is message"}
for index_nr in range(1,5):
...
1
vote
1answer
461 views
how to implement ElasticSearch in Flask app?
I wrote a Python Flask app and want to integrate ElasticSearch in this for effective search. But there is not tuts/docs available regarding integrating ElasticSearch in flask app..
Please refer any ...
0
votes
1answer
289 views
Django Haystack Distinct Value for Field
I am building a small search engine using Django Haystack + Elasticsearch + Django REST Framework, and I'm trying to figure out reproduce the behavior of a Django QuerySet's distinct method.
My index ...
0
votes
1answer
36 views
datetime in pyes results
I am indexing and then querying an dictionary that contains a datetime
Some documents in the results contain a string representation of the date and some return and actual datetime.
The actual ...
1
vote
0answers
146 views
How to use Django Haystack EdgeNGrams with Many-to-Many field?
I've recently been trying to implement full text search on my webapp with Django Haystack (v2.1.0) with Elasticsearch (v0.90.5) as my search engine. My goal is to be able to, with one query, search ...
0
votes
0answers
44 views
elasticsearch and django tuning the search out come (restricting result to absolute words or part of words)
Am using Haystack and django to connect to elasticsearch to build my index and query from it. I have very little knowledge in elasticsearch and tried to read the documentation but not sure I was able ...
4
votes
1answer
302 views
Does not work autocomplete with EdgeNgramField using haystack and engine Elasticsearch (Django)
I need to search substrings values in a model field. Then I have my index and my SearchQuerySet.
This is the Elasticsearch configuration.
HAYSTACK_CONNECTIONS = {
'default': {
'ENGINE': ...
0
votes
0answers
133 views
Django Haystack - Stored/Indexed Fields - rendered hit database, and is there other method that not hit db in SearchQuerySet?
Problem
I try Stored/Indexed Fields(https://django-haystack.readthedocs.org/en/v2.1.0/searchindex_api.html?highlight=load_all%20=%20FALSE#stored-indexed-fields)
In Example,It dosen't hit django db, ...
0
votes
1answer
2k views
Elastic Search Kibana TimeStamp key missing
I have a dataset with timestamp info in it. I used Python/PYES package to insert the data into elastic search following the tutorial here.
Then, I installed Kibana in the same machine and modified ...
1
vote
0answers
247 views
Django haystack multiple models
I'm using django-haystack on a project with several app. So I have a search_indexes.py in an app and another search_indexes.py that is in the same project.
project
├── app
│ ├── ...
0
votes
0answers
80 views
Pyes Elastic Search No Results Return
I am following the get-started tutorial of pyes, the code can finish, but there is no search results returned to my screen.
#!/usr/bin/python
from pyes import *
def main():
print 'hello world'
...
4
votes
4answers
158 views
Is there a Python ElasticSearch client that supports asynchronous requests?
I'm looking for an ElasticSearch Python client that can make asynchronous requests. For example, I'd like to write this code,
query1_future = es.search('/foobar', query1_json)
query2_future = ...
2
votes
1answer
846 views
elasticsearch bulk indexing using python
i am trying to index a csv file with 6M records to elasticsearch using python pyes module,the code reads a record line by line and pushes it to elasticsearch...any idea how i can send this as bulk?
...
1
vote
1answer
47 views
ordering json in python maping object
I am using elasticsearch where the query is to be posted in json and should be in standard order or else the result will be wrong. the problem is that the python is changing my json ordering. my ...
0
votes
0answers
88 views
Do a custom search using haystack Django
I need to do a search using haystack with search engine 'elasticsearch'. Is a simple search, in sql is somthing like this:
SELECT * FROM my_table where clean_content like '%a%'
...
0
votes
0answers
87 views
Slow test cases when using elastic search (pyes)
I recently added elastic search to our stack and it is slowing down our test cases.
In order to keep the tests from trampling each other I isolated them by index.
This seems to be the cause. Creating ...
1
vote
0answers
104 views
Field boosting in elasticsearch with django-haystack
We're trying to implement field boosting in Elasticsearch using Django Haystack 2.1.0 and pyelasticsearch 0.6. If I curl -XGET "http://localhost:9200/_mapping?pretty=true, I get a response (extraneous ...
0
votes
2answers
167 views
Improving elasticsearch performance
I'm using elasticsearch in a python web app in order to query news documents. There're actually 100000 documents in the database.
The original db is a mongo one and elasticsearch is plugged through ...
1
vote
1answer
325 views
ElasticSearch term suggest on analyzed field returns no suggestions
I'd like to use ElasticSearch's term suggest feature for spelling corrections ("Did you mean ...?). Here's the official documentation: ...