-
Notifications
You must be signed in to change notification settings - Fork 160
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
Recherche via Elasticsearch #4096
Merged
Merged
Changes from all commits
Commits
Show all changes
110 commits
Select commit
Hold shift + click to select a range
afbd1c0
add elastisearch modules and define base models
pierre-24 221b5ff
basic indexing with and without flags
pierre-24 cb01421
add migration for post
pierre-24 e61ffc1
check if pk and id match
pierre-24 280a4fe
Include forum into search
pierre-24 682010f
Merry christmas, @vhf and @artragis
pierre-24 c68752b
Attempt to index published contents and chapters (with some tricks)
pierre-24 f72b30f
use a slightly different trick for chapters
pierre-24 eb8aaed
Index text directly with PublishedContent if article or mini-tuto
pierre-24 fcc1cfa
add custom analyzer
pierre-24 a6f341c
Improve analyzer for programming language
pierre-24 987a7cf
argparse is magic, thx @artragis !
pierre-24 f7439ae
asciifolding is a wrong choice after all
pierre-24 d7addd3
implementation of basic search (no boosting, no type selection, no hi…
pierre-24 ddd2e72
elif instead of if
pierre-24 0e41258
weighting the different models
pierre-24 2a8b603
improve index creation (set mapping at the same time)
pierre-24 40bee12
Improve stuffs:
pierre-24 a278ef5
smaller is better (thx again, @artragis)
pierre-24 1c73993
to be consistant, use text_html for posts
pierre-24 553fee8
fix templatetags to prevent errors comming from fixtures
pierre-24 282ff34
attempt highlighting with ES
pierre-24 1f32be3
dont use order=score if continuous text
pierre-24 c665752
boost is now also performed based on the other criterions
pierre-24 437f913
Implement correct deletion (with weirds relationships for published c…
pierre-24 8a13142
invisible posts must still be indexed but wiped out from the query
pierre-24 dc96397
form is not invalid
pierre-24 0240817
correct way to connect, and prevent work when there is no connection
pierre-24 f166f51
shut up, Travis
pierre-24 bd062bf
prevent research page from failing while ES is not there
pierre-24 2b99fdc
more control over index creation through settings
pierre-24 1d7c0a6
use a custom tokeinzer to get rid of all the special characters inclu…
pierre-24 2b92ec7
Supprime le CSS de la recherche de l'ancienne page d'accueil (pre-ZEP 4)
Situphen 4a25510
Utilise la barre de recherche de la page d'accueil pour la page de re…
Situphen 0b3f61f
Improve form:
pierre-24 437c961
protect LaTeX from stemming as well
pierre-24 669954c
Logging instead of printing
pierre-24 32ba8af
Remove haystack and use the brand new search
pierre-24 d6f4cbe
yet another term to protect
pierre-24 6104d9f
add documentation
pierre-24 83d7224
update to version 5 of elasticsearch-py and use true delete_by_query()
pierre-24 83e662c
only instance is needed for delete_document_in_elasticsearch()
pierre-24 14b20a0
es_manager will fail if no connection to ES
pierre-24 5a28679
add a test for the command es_manager
pierre-24 48af348
try me, travis
pierre-24 3544f3e
good. Now, try arder, travis
pierre-24 22a9b11
refresh index, otherwise it is not available for research!
pierre-24 4142a93
use custom logger
pierre-24 28215cb
correct spelling mistakes, thx @vhf!
pierre-24 2c22184
add some tests for ESIndexManager
pierre-24 13ef3a1
add test for view (more will come, but dodo before\!)
pierre-24 2c14aac
New tests for view
pierre-24 f0ce199
Publishable is not published
pierre-24 bf36ebb
online editor is against pep 8
pierre-24 869df81
Let's be coherent with tutorialv2
pierre-24 944d5a6
old search is past history!
pierre-24 c70d210
upgrade doc as well
pierre-24 98f786a
Use SearchForm on home page
pierre-24 d662c7a
Merge remote-tracking branch 'upstream/dev' into add_elasticsearch
pierre-24 28c3677
Fix migration conflict
pierre-24 79cc588
where does this error come from?
pierre-24 7feac1b
Merge branch 'dev' of https://github.com/zestedesavoir/zds-site into …
pierre-24 c1f4745
Implement modifications of @vhf
pierre-24 7adb8fb
add information about memory usage
pierre-24 422dbc3
pip freeze stuffs
pierre-24 964acf9
update.md
pierre-24 adebf61
improve .travis.yml, thx to @firm1
pierre-24 ba6867f
Merge branch 'dev' of https://github.com/zestedesavoir/zds-site into …
pierre-24 429c8da
Merge branch 'dev' of https://github.com/zestedesavoir/zds-site into …
pierre-24 92f38ab
use single quote when possible (to keep the work of @vhf intact)
pierre-24 f7cab5b
correction for @situphen
pierre-24 d04b82c
Munin plugin
pierre-24 eb0dd5a
now, its elasticsearch 5.1.2
pierre-24 aa05f19
snakecase for subcommands
pierre-24 bda0ea0
mark_keywords is now in settings.py
pierre-24 4ff0a26
of course, I need to change the tests as well --"
pierre-24 da373f6
Post is directly hidden in ES
pierre-24 ea150e8
add note to contributors
pierre-24 8f6d2c0
change shards and replicas
pierre-24 1eacfcd
use ES_Q() instead of Q()
pierre-24 38ebf2d
add thumbnail and tags
pierre-24 9671892
search filters below the bar and not in sidebar
pierre-24 76e8748
mark corresponding posts updatable if topic is moved
pierre-24 3f3f28a
Delete previous chapters before reindexation
pierre-24 9f6192d
Improve update.md
pierre-24 01c5890
Merge branch 'dev' of https://github.com/zestedesavoir/zds-site into …
pierre-24 a5b632e
fix test and quotes
pierre-24 ae7dec1
batching the indexing
pierre-24 e4eeb0e
correct some mistakes
pierre-24 62e2f9c
update.md
pierre-24 e3754a4
correct batching !
pierre-24 0b969e1
Correct the error of @DevHugo
pierre-24 1e3f160
yield at the end
pierre-24 38a69d9
there is no need for with there
pierre-24 fa9f102
print and small optimisation
pierre-24 55c66d7
skip chapters correctly
pierre-24 7db240f
slight improvement of the documentation
pierre-24 de57f24
Batch par modèle
vhf 3add954
fix tests
vhf 4b4c6fb
Enlève les dépendences à solr/haystack
vhf 8f02288
Optimisation de l'indexation initiale
vhf df7cd38
tests
vhf 451280c
Groupe les contenus de recherche
vhf e9fcf7d
Améliore le design de la page de recherche
Situphen 1b69595
add commands in Makefile
pierre-24 e804a2f
some code reviews
pierre-24 e415c99
done and done
pierre-24 f4b6221
Merge branch 'dev' of https://github.com/zestedesavoir/zds-site into …
pierre-24 0fda5a8
fix migrations (again :p)
pierre-24 c03dca7
Upgrade to lastest version
pierre-24 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
.search-box { | ||
background: white; | ||
position: relative; | ||
margin: 30px auto 0; | ||
max-width: 820px; | ||
|
||
form { | ||
display: flex; | ||
} | ||
|
||
label, input { | ||
box-sizing: border-box; | ||
display: inline-block; | ||
line-height: 50px; | ||
height: 50px; | ||
} | ||
|
||
label { | ||
text-align: right; | ||
padding: 0 5px; | ||
font-size: 2rem; | ||
font-weight: 300; | ||
margin-left: 50px; | ||
} | ||
|
||
input { | ||
font-size: 2rem; | ||
border: none; | ||
font-weight: 300; | ||
flex: 1; | ||
} | ||
|
||
button[type=submit] { | ||
background-color: #FFF !important; | ||
width: 50px; | ||
height: 50px; | ||
|
||
&:hover, &:focus { | ||
background-color: #CCC !important; | ||
} | ||
|
||
&:after { | ||
margin: 16px !important; | ||
@include sprite-position($search); | ||
@include sprite-width($search); | ||
@include sprite-height($search); | ||
} | ||
} | ||
|
||
&:before { | ||
content: ''; | ||
position: absolute; | ||
bottom: -6px; | ||
left: -28px; | ||
|
||
background: url('../images/home-clem.png'); | ||
background-size: 100%; | ||
width: 68px; | ||
height: 134px; | ||
|
||
@at-root { | ||
body.vc-clem-christmas.home .search-box::before { | ||
background-image: url('../images/home-clem-christmas.png'); | ||
} | ||
|
||
body.vc-clem-halloween.home .search-box::before { | ||
background-image: url('../images/home-clem-halloween.png'); | ||
width: 160px; | ||
left: -80px; | ||
} | ||
} | ||
} | ||
|
||
.control-group { | ||
display: inline-flex; | ||
width: 100%; | ||
|
||
.controls { | ||
width: 100%; | ||
} | ||
|
||
input { | ||
padding: 0; | ||
width: 100% !important; | ||
} | ||
} | ||
} | ||
|
||
.search-results { | ||
.content-item { | ||
margin-left: 0; | ||
} | ||
} | ||
|
||
.search-filters { | ||
margin-right: auto; | ||
margin-left: auto; | ||
max-width: 820px; | ||
padding-left: 0; | ||
text-align: center; | ||
list-style: none; | ||
|
||
li { | ||
display: inline-flex; | ||
padding-right: 16px; | ||
|
||
input[type=checkbox] { | ||
margin-top: 8px; | ||
} | ||
} | ||
|
||
label { | ||
color: white; | ||
} | ||
} | ||
|
||
@media only screen and #{$media-mobile} { | ||
.search-box { | ||
margin: 30px 0 0!important; | ||
|
||
padding-left: 40px; | ||
|
||
label { | ||
display: none; | ||
} | ||
|
||
&:before { | ||
left: -46px; | ||
} | ||
} | ||
|
||
.search-filters { | ||
text-align: left; | ||
padding-left: 10px; | ||
|
||
li { | ||
display: list-item; | ||
} | ||
} | ||
} | ||
|
||
@media only screen and #{$media-mobile-tablet} { | ||
.search-box { | ||
margin: 30px 40px 0; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
$content-width: 1145px; | ||
|
||
.flexpage { | ||
.main { | ||
display: block; | ||
height: auto; | ||
width: auto; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
#content { | ||
width: 100%; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
.sub-header{ | ||
display: none; | ||
} | ||
|
||
.flexpage-wrapper { | ||
max-width: $content-width; | ||
margin: 0 auto; | ||
} | ||
|
||
.flexpage-header { | ||
border-bottom: solid 1px white; | ||
background-color: #19516b; // fallback for older browser | ||
background: #19516b radial-gradient(at top, rgba(255,255,255,0.1),rgba(0,0,0,0) 60%); | ||
} | ||
} | ||
|
||
@media only screen and #{$media-mobile-tablet} { | ||
.flexpage-wrapper { | ||
padding: 20px 10px; | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
C'est ce truc qui fait le décalage à cause de Clem sur la home. Il faudrait donc mettre cette margin que sur la home. (la home a une classe
.home
sur le body)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.
Pataper, c'est @Situphen qui a chipoté à ça. En français, il faut faire quoi pour le corriger ?
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.
Mmmh, je viens de tester, et ça empêche pas la clem' de nowel ou d'halloween de fonctionner :)
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.
Ah effectivement j'ai pas du faire très attention aux styles de "label" :D