New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ElasticSearch 2.0 support #1336
Conversation
- Fix localhost IP in elasticsearch2 settings
- Port to connect 29200
- daemonize ES 2.x
- commented out ES 1.x service
- Fix catching exception on skipping tests
@@ -49,8 +52,8 @@ matrix: | |||
- env: DJANGO_VERSION=">=1.9,<1.10" | |||
- python: "pypy" | |||
|
|||
services: | |||
- elasticsearch | |||
#services: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to keep testing with 1.x. I'm not sure whether it'd be easier to run the tests with an alternate port or to use a build matrix to pick one of the two. It looks like travis-ci/apt-source-safelist@189b706 was merged awhile back so I think we could use a matrix like what they're doing here:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using a build matrix seems the best solution, maybe with only elasticsearch-1.7 and elasticsearch-2.1 versions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1.7 and 2.x seems great to me - the main thing I was thinking is e.g. AWS with the hosted 1.7 used by many people
This is generally looking quite good — testing is always tedious with Haystack but I think you're very close. |
- set literals on tests
Finally elasticsearch in travis is installed using tar. The apt sources for es 2.x are broken, the url used is not longer valid.
The versions are: |
- set literals on tests
Rebuilding on travis, I see than sometimes |
test_haystack.solr_tests.test_management_commands.ManagementCommandTestCase#test_multiprocessing
test_haystack.solr_tests.test_management_commands.ManagementCommandTestCase#test_multiprocessing
It would probably be a good idea to rebase this on 10bcc76 so to pick up Django 1.9. re:the tests failing on multiprocessing, that should probably go into a separate ticket – there's a race condition which I have thought was fixed at least twice and it deserves a deeper investigation. |
- Fix localhost IP in elasticsearch2 settings
- Port to connect 29200
- daemonize ES 2.x
- commented out ES 1.x service
- Fix catching exception on skipping tests
Hey, i wanted to point out that any query against However,
|
Does anyone have a sense of what django versions will be still be supported by this changeset? |
The pull request is tested on django 1.8 and 1.9 |
Any ETA for when these changes will be merged and released ? |
@anmolghosh if you have time to contribute, please update this ticket with the results of your testing. |
Add the AttachmentField from: https://gist.github.com/frague59/8ab2470ed133754a6327 should be great, to support attachments : files indexed using apache Tika to explore documents. |
I use this branch on production. What I notice:
|
For arguments of
|
Before adding new funcionality. (arguments of highlighted, AttachmentField) @acdha What we need to merge the changes? |
Hi Guys, just to let you know - testing against elastic search 2.3 still gives errors with 'facets'. I'm just fresh into this and started looking at the commits. Can someone get me started and point me to where the construction of the JSON object is done that gets passed to Elastic ? I'd like to just add some debug on my machine. Kind regards, Nicholas. |
@nherriot add simple logging to django maybe helps LOGGING = {
'handlers': {
'console': {
'class': 'logging.StreamHandler',
'stream': sys.stdout,
}
},
'loggers': {
'haystack': {
'handlers': ['console'],
'level': 'DEBUG',
'propagate': False,
},
'elasticsearch': {
'handlers': ['console'],
'level': 'DEBUG',
'propagate': False,
},
},
} the JSON objects seems to be build in https://github.com/elastic/elasticsearch-py/ |
Hi all, OK this may be obvious to many of you. Just trying to checkout this branch. How do I do this? When I do a /> git branch -r . I can't see branch 'es2' ? Thanks in advance to anyone who responds. Kind regards, Nicholas. |
@nherriot I do this
|
Hi all, anything in particular that has to be done for Haystack to start using the new elasticsearch2_backend.py? By the way if anyone is interested I have a hack that just really changes the string in the json request to ES to use the new 'aggs' parm. It works for us and gets us moving again. But I still see I might have some work to do on parsing the new response. Kind regards, Nicholas |
@PedroAquilino I see that exist some conflicts to merge, you have time to fix this? |
I see that exists some conflicts to merge, but I don't have time to fix it now... |
… request is to permit use ElasticSearch 2.X
… request is to permit use ElasticSearch 2.X
Is there already an idea about a potential delivery...? And will it be production-ready? We have tested the code but are already experiencing issues while getting it running... We really need the ES2.x support (and the announced version 5 after summer). We use ES for GEO-queries and facets. #just-asking Is there any other way we can contribute? |
… request is to permit use ElasticSearch 2.X
This has been replaced by #1460. |
Thanks to João Junior (@joaojunior) and Bruno Marques (@ElSaico) for the patch Closes django-haystack#1460 Closes django-haystack#1391 Closes django-haystack#1336 Closes django-haystack#1247
Gives haystack support for Elasticsearch 2.x
Issue:
#1247