Skip to content
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

Add a Comments Indexable #1531

Merged
merged 109 commits into from
Jun 28, 2021
Merged
Changes from 1 commit
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
3481259
Initial work on comments indexable. Comments are now indexed when the…
Oct 15, 2019
9d04b17
Add support for most arguments that can be passed into WP_Comment_Que…
Oct 15, 2019
e72ab76
Add support for the hierarchical query param. Fix a few issues around…
Oct 18, 2019
432749a
Fix phpcs issues
Oct 18, 2019
a4a0c94
Merge branch 'develop' into feature/comments-indexable
Oct 18, 2019
fd9c99c
Add documentation for the Comments Indexable
Oct 29, 2019
c47b878
Merge branch 'develop' into feature/comments-indexable
dinhtungdu May 21, 2020
85713dd
docs: update comment indexable documentation
dinhtungdu May 22, 2020
e9bb365
test: Feature/Comments
dinhtungdu May 22, 2020
85adbb3
test: create and sync comment helper
dinhtungdu May 23, 2020
229cc2d
test: setup TestComment class
dinhtungdu May 23, 2020
3a87348
test: comment sync tests
dinhtungdu May 23, 2020
57195eb
test: basic comment query
dinhtungdu May 23, 2020
4823def
test: create test comments helper
dinhtungdu May 25, 2020
1012647
test: comment query with number
dinhtungdu May 25, 2020
bba4028
test: comment query offset
dinhtungdu May 25, 2020
9267d24
fix: check for correct capability
dinhtungdu May 28, 2020
234c688
fix: sort es query
dinhtungdu May 28, 2020
1521074
test: refactor create comments method
dinhtungdu May 28, 2020
ee51381
test: comment query order by comment id
dinhtungdu May 28, 2020
e53b4ef
test: delete comment sync
dinhtungdu May 28, 2020
fd04809
test: comment query return ids
dinhtungdu May 28, 2020
d082904
test: comment query return count
dinhtungdu May 28, 2020
490f324
test: comment query order by comment_post_ID
dinhtungdu May 28, 2020
5e381a8
test: comment query hierarchical
dinhtungdu May 28, 2020
c763b14
fix: paged query support
dinhtungdu May 28, 2020
511cdb8
test: fix source include deprecation
dinhtungdu May 28, 2020
332140b
test: query comment by email
dinhtungdu May 28, 2020
1c2548c
test: query comment by url
dinhtungdu May 28, 2020
637491a
test: query comment by user_id
dinhtungdu May 28, 2020
c89291c
test: comment query author in and not in
dinhtungdu May 28, 2020
d7b728e
test: query comment in and not in
dinhtungdu May 28, 2020
4a37316
test: comment query with date query
dinhtungdu May 29, 2020
a100316
test: query comment by karma
dinhtungdu May 29, 2020
df6560d
test: comment query by meta
dinhtungdu May 29, 2020
636281b
test: query comment by parent comments
dinhtungdu May 29, 2020
0eb0f7e
test: query comment by post author
dinhtungdu May 29, 2020
3bfb6d6
test: query comment by post id
dinhtungdu May 29, 2020
766a4bb
test: query comment by post statuses
dinhtungdu May 29, 2020
d04f235
test: fix failed test and remove debug code
dinhtungdu May 29, 2020
0c13ff0
test: query comment by post type
dinhtungdu May 29, 2020
b3ce70e
test: query comment by parent post id
dinhtungdu May 30, 2020
ef0fe32
test: search comment
dinhtungdu May 31, 2020
2ac7876
test: query comment by status
dinhtungdu Jun 1, 2020
d38fd90
test: comment query by type
dinhtungdu Jun 1, 2020
52b7ef2
fix: use keyword for post name
dinhtungdu Jun 1, 2020
0258975
test: add orderby test cases
dinhtungdu Jun 1, 2020
bd926f8
fix: es 7 compat
dinhtungdu Jun 10, 2020
2620979
fix: remove standard tokenizer
dinhtungdu Jun 10, 2020
50d7148
fix: set default comment type to comment
dinhtungdu Jun 10, 2020
43c7a45
fix: use keyword for comment_type
dinhtungdu Jun 10, 2020
48e11aa
test: refactor/clean up the test file
dinhtungdu Jun 24, 2020
638b129
Update includes/classes/Indexable/Comment/Comment.php
dinhtungdu Jun 24, 2020
4ca0b0a
Merge branch 'feature/comments-indexable' of github.com:10up/ElasticP…
dinhtungdu Jun 24, 2020
b7622d4
fix: use get_comments instead of comment query
dinhtungdu Jun 24, 2020
aa77d65
Update includes/classes/Indexable/Comment/QueryIntegration.php
dinhtungdu Jun 24, 2020
9b709da
fix: add ep_comment_query_all_args filter. Props @shadyvb
dinhtungdu Jun 24, 2020
08c9683
Update includes/classes/Indexable/Comment/QueryIntegration.php
dinhtungdu Jun 24, 2020
4f48b25
fix: add ep_search_comment_return_args back
dinhtungdu Jun 24, 2020
3ee5de3
Merge branch 'develop' into feature/comments-indexable
dinhtungdu Jun 24, 2020
38e52ae
fix: found_comments value. revert returning WP_Comment object
dinhtungdu Jun 27, 2020
c5e15f2
docs: add note for getting total comments
dinhtungdu Sep 3, 2020
4aea84d
pass the query parameter to query_es when handling comments
tomjn Jul 21, 2020
8b7ac03
fix: return WP_Comment instead of stdClass. props @shadyvb
dinhtungdu Sep 3, 2020
8aa9c9f
Merge branch 'develop' into feature/comments-indexable
Rahmon Apr 12, 2021
7f8d962
Fix $total_objects value to prevent endless loop in indexing
Rahmon Apr 12, 2021
137cb8f
Refactor Comment.php
Rahmon Apr 12, 2021
9b82e5b
Update default status for Comments Feature
Rahmon Apr 12, 2021
44cff43
Add ep_comment_all_query_db_args filter to prevent endless loop in
Rahmon Apr 12, 2021
23968a6
Add default post_type when query db for comments
Rahmon Apr 16, 2021
4f85dfb
Merge branch 'develop' into feature/comments-indexable
Rahmon Apr 16, 2021
1acd63b
Update expected status in TestComment
Rahmon Apr 19, 2021
aee803e
Update documentation of test functions
Rahmon Apr 19, 2021
8082560
Fix documentation of the functions
Rahmon Apr 19, 2021
82d55fd
Updat indexables documentation
Rahmon Apr 26, 2021
bc3864f
Update to not auto-enable the Comments Feature
Rahmon Apr 26, 2021
a3b896e
Update to index comments approved by default
Rahmon Apr 26, 2021
e04d8b4
Refactor parse_orderby and update to get indexables post_type
Rahmon Apr 26, 2021
212a152
Update TestComments
Rahmon Apr 26, 2021
40ce8b4
Merge branch 'develop' into feature/comments-indexable
Rahmon Apr 26, 2021
230f734
Merge branch 'develop' into feature/comments-indexable
Rahmon May 3, 2021
f5ff157
Merge branch 'develop' into feature/comments-indexable
Rahmon May 27, 2021
23df9f2
Fix date format for Comment mapping
Rahmon May 27, 2021
a9b3ed3
Update since doc parameter
Rahmon Jun 4, 2021
2f04f40
Add missing filter doc for comment mapping pre-5.0
Rahmon Jun 4, 2021
df776ff
Add missing filter docs for comment mapping initial.php
Rahmon Jun 4, 2021
ef7aed6
Add missing filter docs for comment mapping 7.0
Rahmon Jun 4, 2021
8fc37f2
Update comment mapping
Rahmon Jun 4, 2021
3ee1738
Merge branch 'develop' into feature/comments-indexable
Rahmon Jun 4, 2021
68688ff
Update comment indexable to use not analyzed fields to filter/order
Rahmon Jun 4, 2021
e0a4f6e
Update @since tag for comment
Rahmon Jun 4, 2021
c566b38
Fix the sync manager of Comment indexable
Rahmon Jun 15, 2021
3faa887
Fix comment_status in SyncManager
Rahmon Jun 16, 2021
dfcf95a
Update to use "1" to indicate the status of comment
Rahmon Jun 16, 2021
521d4af
Add tests to make sure order notes is not indexed
Rahmon Jun 16, 2021
2bee699
Prevent comment query integration in the admin
Rahmon Jun 18, 2021
418027b
Integrate comments query in protected content
Rahmon Jun 18, 2021
92e2266
Add comment indexing test with Protected Content enabled
Rahmon Jun 21, 2021
4955562
Merge branch 'develop' into feature/comments-indexable
Rahmon Jun 21, 2021
e273e16
Merge branch 'develop' into feature/comments-indexable
felipeelia Jun 24, 2021
9bb25a2
Fix sync on comment meta update
Rahmon Jun 24, 2021
422efcd
Merge branch 'develop' into feature/comments-indexable
Rahmon Jun 24, 2021
0f0a168
Comments: Check if site is indexable
felipeelia Jun 25, 2021
d30123a
Docs for new hooks
felipeelia Jun 25, 2021
75e71b9
Merge branch 'develop' into feature/comments-indexable
felipeelia Jun 25, 2021
ff8bccb
Fix WP_Comment_Query when ordering by comment_post_type
Rahmon Jun 25, 2021
fc9bdfa
Merge branch 'develop' into feature/comments-indexable
felipeelia Jun 25, 2021
6dff942
Merge branch 'develop' into feature/comments-indexable
felipeelia Jun 28, 2021
042e01c
Comments: Remove "author IP" from default fields
felipeelia Jun 28, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test: fix failed test and remove debug code
  • Loading branch information
dinhtungdu committed May 29, 2020
commit d04f235200d8dbbd2fc01d4b5e0b6aa8489d3113
8 changes: 2 additions & 6 deletions tests/php/indexables/TestComment.php
Original file line number Diff line number Diff line change
Expand Up @@ -987,8 +987,6 @@ public function testCommentQueryParentIn() {
$comments_query = new \WP_Comment_Query( $args );
$comments = $comments_query->query( $args );

var_dump( $created_comments );
var_dump( $comments );
foreach ( $comments as $comment ) {
$this->assertTrue( $comment->elasticsearch );
$this->assertEquals( $created_comments['child_comment_id'], $comment->comment_ID );
Expand All @@ -1008,8 +1006,6 @@ public function testCommentQueryParentNotIn() {
$comments_query = new \WP_Comment_Query( $args );
$comments = $comments_query->query( $args );

var_dump( $created_comments );
var_dump( $comments );
foreach ( $comments as $comment ) {
$this->assertTrue( $comment->elasticsearch );
$this->assertNotEquals( $created_comments['child_comment_id'], $comment->comment_ID );
Expand Down Expand Up @@ -1121,7 +1117,7 @@ public function testCommentQueryPostId() {

foreach ( $comments as $comment ) {
$this->assertTrue( $comment->elasticsearch );
$this->assertTrue( in_array( $comment->comment_post_ID, $created_comments['comment_ids'] ) );
$this->assertTrue( in_array( $comment->comment_ID, $created_comments['comment_ids'] ) );
}

$this->assertEquals( 3, count( $comments ) );
Expand All @@ -1136,7 +1132,7 @@ public function testCommentQueryPostId() {

foreach ( $comments as $comment ) {
$this->assertTrue( $comment->elasticsearch );
$this->assertTrue( in_array( $comment->comment_post_ID, $created_comments['comment_ids'] ) );
$this->assertTrue( in_array( $comment->comment_ID, $created_comments['comment_ids'] ) );
}

$this->assertEquals( 3, count( $comments ) );
Expand Down