0
votes
1answer
11 views

Fuzziness across multiple fields — only use fuzziness on certain fields

Is there a way to do a cross_field search using fuzziness on only certain columns? For example: match against: - name (fuzziness=1) - country (fuzziness=0) So the search "John USA" would match, the ...
1
vote
1answer
11 views

Django haystack searching for html tags returns all posts

I have a django app (blog) which I am trying to implement django haystack with elasticsearch. The problem that I am having is that when testing the search functionality by searching for <p> or &...
3
votes
2answers
43 views

Django Haystack: How to index field from another class

I have a django model Story which I am successfully able to index using templates. However there is another model Reviews which has a static method which takes Story object and returns ratings as ...
0
votes
1answer
9 views

Elasticsearch python library “post” a document

I'm using Elasticsearch python library. The method create require an ID to index a document. I cannot find in the documentation a method to "post" a document into an index. By post I mean a method ...
-1
votes
0answers
12 views

python elasticsearch query not working

I have a testing server for the elasticsearch but sometimes, if I add "hello world" and query the "hello world", then I got score 1.0 However, usually, I get the score 0.0 instead of 0.0 I am not ...
0
votes
0answers
18 views

pyelasticsearch bulk ValueError: too many values to unpack (expected 2)

I'm new in Python and Elasticsearch. I'm trying to write code to insert documents in Elassticsearch using bulk. It is based on this description: http://pyelasticsearch.readthedocs.io/en/latest/api/#...
0
votes
0answers
17 views

Django-haystack with elastic-search is not giving search results for some model Indexes, while giving the search result for some model Indexes

I am working on a django project(community-like-site) in which I have to build a search engine for the site. I am using Django and elasticsearch 1.4.. and there is some problem when I am using the ...
0
votes
1answer
23 views

Accessing Elasticsearch with Python 3

I want to use the Python 3 module urllib to access an Elasticsearch database at localhost:9200. My script gets a valid request (generated by Kibana) piped to STDIN in JSON format. Here is what I did: ...
0
votes
0answers
21 views

Elasticsearch Nested Match Last Value

We have article & edited authors as array. Need to check How many article last edited by particular author. Data: { "Article" : [ { "id" : 12 "title" : "An article ...
0
votes
0answers
20 views

improve python elasticsearch performance

i am new in python and Elasticsearch i write a python code that read data from very large json file and index some attributes in Elasricsearch. import elasticsearch import json es = elasticsearch....
0
votes
0answers
24 views

Accessing Elasticsearch using python

I'm currently trying to write a script to enrich some data. I've already coded some things that work fine with a demodata txt file, but now I'd like to try and directly requests the latest data from ...
0
votes
1answer
7 views

python: elasticsearch-dsl: update body not fully transfered

'I am accessing elasticsearch via the python module elasticsearch-dsl. I have a body that I am passing to the update() function in order to transfer some information to the index: >>> hits =...
0
votes
1answer
23 views

How to add Slugify to ElasticSearch?

There is a Russian word for "pizza" = "пицца" and they are very similar since: "p" equals to "п" "i" equals to "и" "z" equals to "ц" "z" equals to "ц" "a" equals to "а" So when I'm searching for "...
0
votes
0answers
15 views

django-haystack larger numbers returned as smaller

Currently running django-haystack with elasticsearch. Currently when I try to order prices of product a larger number is seen as smaller in the list. E.g. 19,342 is smaller than 2345 because of the ...
0
votes
0answers
29 views

Writing Double nested queries in Elasticsearch DSL

I have a mapping in elastic search with the following mapping: "mappings" : { "Field" : { "properties" : { "introduction":{ "type":"nested", "properties":{ "address":{...
0
votes
0answers
10 views

elasticsearch: How can I handle en empty field in an index using python

I did a script which allows me to retrieve three fields of a set of doc indexed into Elasticsearch. Here is the code: ... client = Elasticsearch() s = Search(using=client, index="enron_test") s = s....
0
votes
0answers
14 views

Django-Haystack: Grouping price facets into a range

Currently working on a shop website. I'd like to be able groups price facets into a range. i.e £0.00 - £99, £100 - £249, £250 - £499. So all price prices within the ranges will fall under the single ...
0
votes
0answers
32 views

Simple Kibana pipeline for visualising events

I have a simple web app, which receives on the order of 10K events a day I'd like to log and to visualise these logs using Kibana. I started saving these events into a PostgreSQL table (with JSON ...
0
votes
1answer
36 views

Difference beetween search and Search elasticsearch

What difference between search and Search? >>> Search <class 'elasticsearch_dsl.search.Search'> >>> search <module 'elasticsearch_dsl.search' from '/usr/local/lib/python2....
0
votes
0answers
17 views

python: How to get the total number of hits of a elasticsearch query

I'm having fun doing some experiments using Elasticsearch with Enron email dataset. I did a query to get something that's not important for my actual question. I obtained a total hits of 4 and I'd ...
0
votes
0answers
21 views

python: How to query an email json indexed into elasticsearch using date

I indexed a set of emails into Elasticsearch. Now I'd like to query this set to retrieve some email based on the date header. The date format is the following: EEE, dd MMM yyyy HH:mm:ss Z (z) where ...
0
votes
0answers
31 views

do not escape backslash in json string

I want to make a query to elasticsearch via python script. The problem is that I have dict: q = { 'query': { 'term': 'foo/bar' } } As elasticsearch says, I need to escape / character ...
0
votes
0answers
13 views

Comparing fields of log files with different index in kibana

I have 2 different log files in elasticsearch, output as two different indexes I1 and I2 respectively in kibana. I want to compare the these two indexes or files and produce a result on the matching ...
0
votes
1answer
15 views

loading data from Elasticsearch into python using Pycharm

3.3. I have a very basic problem I want to get the dataset I have in an Elasticsearch index into Python for processing.(like getting the data into a python dataframe) Can someone please help. If ...
0
votes
1answer
20 views

ElasticSearch error: [function_score] malformed query, expected [END_OBJECT] but found [FIELD_NAME]

The following JSON structure gives me an error when doing a query: { ...
0
votes
0answers
14 views

How do I enable stemming for an elasticsearch backend in django-haystack?

I'm trying to utilize Elasticsearch's stemming feature within django-haystack. models.py class Menu(models.Model): description = models.CharField(max_length=255) search_indexes.py from .models ...
0
votes
0answers
23 views

Removing duplicates from across types in a single index

I am outputting scraped classifieds listings from many websites into elasticsearch, with each classifieds site have its own type in the same index. All the types have the same mapping and fields. A ...
0
votes
0answers
44 views

Company name synonymisation using ElasticSearch

I'm working on a problem that requires me to synonymise company names. Specifically, by synonymization I mean mapping multiple name variations (correct/incorrect/misspellings) of a company name, to a ...
0
votes
1answer
23 views

update elasticsearch record using python

I can connect to and select the first record from an index. But I need to update the record with "newval" parameter. And update method is failing with error: AttributeError: 'NoneType' object has no ...
-1
votes
1answer
29 views

elasticsearch: I cannot retrieve hit.from of a json document

I was trying to print the result of a query and I figured out that I cannot retrieve hit.from of a json document. It tells me SyntaxError: invalid syntax. from is a field of the json doc which ...
0
votes
1answer
40 views

Add @timestamp field in ElasticSearch with Python

I'm using Python to add entries in a local ElasticSearch (localhost:9200) Currently, I use this method: def insertintoes(data): """ Insert data into ElasicSearch :param data: dict :return: """ ...
2
votes
1answer
37 views

python: How to input a string and use it as query match elasticsearch

I'm trying to code a simple python script which should ask for a string to be inserted by shell and use it as "match string" in a match query. I post here the script so the problem can be better ...
0
votes
1answer
27 views

How to ignore exceptions when bulk update with pyspark if doc doesn't exist

I am trying to do an update operation with elasticsearch hadoop package in pyspark. It says on the documentation that if no data is found, an exception is thrown. What is the best way to ignore this ...
0
votes
1answer
16 views

Elasticsearch TransportError(400, u'parse_exception', u'Failed to derive xcontent')

I'm trying to add a new field to an existing document in elasticsearch. I use the elasticsearch python API to do this. My query is : addField = { "script" : { "inline" : "ctx._source.langTranslation ...
0
votes
1answer
23 views

How to add a JSON object with an array to ElasticSearch using python?

I want to add a JSON object into ElasticSearch that contains an array. I'm using python. My code looks something like: #This returns a list of mutual friends mutual_friends_list = ...
1
vote
1answer
27 views

python elasticsearch bulk index datatype

I am using the following code to create an index and load data in elastic search from elasticsearch import helpers, Elasticsearch import csv es = Elasticsearch() es = Elasticsearch('localhost:9200') ...
0
votes
0answers
19 views

How to get 'data processed' in elasticsearch

When doing a query in BigQuery, there is a nice indicator that tells you how much time the query took and how much data was processed to get the resultset: It's simple to get the time elapsed in ...
0
votes
0answers
24 views

Python Dictionary Help Elasticsearch

I have a collection of documents in my elasticsearch instance that I am iterating over. "hits": { "total": 578443, "max_score": 1, "hits": [ { "_index": ...
0
votes
1answer
18 views

Can I get the scores calculated by whoosh for each document while searching?

I am trying to implement Okapi BM25 to search documents by query using python whoosh library. My understanding is that whoosh calculates the scores for each documents using BM25 according to the ...
0
votes
1answer
22 views

How to update a single record for django-haystack?

I'm a haystack beginner, and I'm trying to figure out how to update a document. I have the following SearchIndex: class ProductIndex(indexes.SearchIndex, indexes.Indexable): text = indexes....
0
votes
0answers
24 views

Elasticsearch Get Unique Values of a Field in Python

I have my elasticsearch with lots of documents and I wish to write a python script to get a list of all unique event.rawBuffer values. Is there a simple pythonic way to do so? "hits": { "...
0
votes
1answer
15 views

how to use the elasticsearch python api to get an overview of all snapshots that have been created

I'm using the elasticsearch python api to communicate with my elasticsearch database. How can I make a specific GET request to get an overview of all the snapshots that have been created? The (Kibana)...
0
votes
0answers
23 views

weird python encoding error with elasticsearch

i have run into an encoding related issue lately in python and elasticsearch which i find is weird. What happens is i have a script which downloads some data from a an api it works fine on localhost. ...
-1
votes
1answer
32 views

Elasticsearch results limit issue

I have a python script that should print all the ID's of people in my JSON files stored in elasticsearch. But I only get ten results(truncated), as I know that by default only 10 results are shown. ...
1
vote
2answers
16 views

Ingesting 150 csv's into one data source

Hello i am completely new to handling big data and comfortable in python I have 150 csv's each of size 70MB which i have to integrate in one source to remove basic stats like unique counts, unique ...
0
votes
0answers
13 views

Add new field to existing index in elastiksearch with python

I have index in ES with certain fields. Now I want to add new field for all exiting data in my index. How I can do this with python?
1
vote
1answer
34 views

Python Curl To Elastic Search Issue

I am trying to use curl in python to push this command in Elastic search so that index patterns get created after the code finishes import pycurl import urllib import urllib2 ...
0
votes
0answers
12 views

Elasticsearch search on multi fields at once

I have a dictionary that the key of it is the path to the field and the value is the value of the field. i want to convert the dictionary into elasticsearch query. so far i found a solution that looks ...
1
vote
1answer
43 views

Error while executing a query using elastic search python API

I am not able to execute a query on elastic db using elasticsearch python api. I see the following error. I am getting Ping as True to the elastic object. Can anyone help me with this issue? es = ...
0
votes
1answer
28 views

regex search in elasticsearch

I'm trying to search a list of documents that look like word+word+word Some of these documents have numbers in them like: word+word+20+word Some of these documents have numbers with / in front of ...