Commit Graph

11038 Commits

Author SHA1 Message Date
Earlopain
a8b085e714
[Elasticsearch] Implement delete_document 2023-09-16 13:23:25 +02:00
Earlopain
123a96bd26
[Elasticsearch] Implement index_document
Also makes the callbacks for update the same as for create.
I don't see why creation should run inline, same for reownering.
2023-09-16 13:19:21 +02:00
Earlopain
3285d546f9
[Elasticsearch] Move index creation to DocumentStore 2023-09-14 21:53:26 +02:00
Earlopain
855388b092
[Elasticsearch] Remove a few more easy usages of __elasticsearch__ 2023-09-14 20:56:56 +02:00
Earlopain
a79e25dfbd
[Elasticsearch] Start implementing own elasticsearch-model
This implements create_index!
2023-09-14 20:49:19 +02:00
Earlopain
17b9797657
[Misc] Remove elasticsearch-rails gem
There is no counterpart for OpenSearch.
`elasticsearch-model` needs to go too but that is more involved than
just removing something that only facilitates logging in dev.

This was responsible for
* displaying the time elasticsearch queries took per request
* logging the search parameters being sent to elasticsearch per query

The implementation isn't that complex and I could roll something myself but
considering that I haven't sought that information out by now I'll just don't.
Logging queries is trivial since we craft these manually ourselves.
2023-09-12 20:23:35 +02:00
Earlopain
1e3ef915a1
[DText] Fix inputs with no limit showing red
Also triggers the calculation immediatly so that the number is shown
when you start editing something
2023-09-12 19:27:03 +02:00
Earlopain
7c7c2f1870
[Users] Add a size limit to the body of feedback 2023-09-12 19:09:17 +02:00
Earlopain
056ce3e7aa
[Cleanup] Remove without_safe_mode from CurrentUser
It really did two things and was primarily intented for automated actions
so that all posts get matched regardless of rating and status.
Now there's a dedicated method to do just that
2023-09-11 18:30:25 +02:00
Earlopain
cd50549bbf
[Posts] Fix visual inconsistency on the children message 2023-09-09 13:13:14 +02:00
Earlopain
0f842b9da0
[Tests] Remove wasteful post after_create hook
Not needed anymore.
Tests went from 95 seconds to 82 on my machine.
2023-09-08 21:33:25 +02:00
Earlopain
c53b2eff60
[Tests] More performance improvements
Most of the gained time is because some post tests don't recreate the
elastic index twice now.
Tests go from 107 seconds to 95 on my machine.
2023-09-08 19:51:35 +02:00
Earlopain
37ff30db3a
[Docker] Fix empty var warning on windows for PWD 2023-09-08 19:19:18 +02:00
Earlopain
de4068ade8
[Tests] Clear elasticsearch before tests run
Previously they were only created if they didn't exist.
Data from previous test runs was still present.
2023-09-08 19:17:47 +02:00
Earlopain
499d447352
[Users] Fix custom css
The constraint applies to all user routes, which includes `custom_style`.
Also fixes a constant redefinition warning in the console when doing `reload!`
2023-09-07 21:08:55 +02:00
Earlopain
4c6f4fe104
[CI] Appease rubocop 2023-09-07 17:32:50 +02:00
Earlopain
f6a438a302
[Tickets] Fix error when creating tickets for non-existant content 2023-09-07 17:08:52 +02:00
Earlopain
d5b64b1712
[Tests] Improve execution time of some of the worst offenders
From 112 seconds to 107 on my machine
Not much all things considered but most of the time is still spend on
elasticsearch, especially when forcefully recreating the index
2023-09-07 17:04:34 +02:00
Earlopain
a5f5543e85
[Tests] Remove unused fixture files 2023-09-07 16:41:20 +02:00
Earlopain
bc01fb2355
Merge pull request #545 from DonovanDMC/strict-route-formats
[Routes] Fix handling of periods in artists, tags, users & wiki pages
2023-09-05 17:31:44 +02:00
Donovan Daniels
115c140cc2
[Posts] Make comment_disabled not hide comments (#546)
* [Posts] Make comment_disabled not hide comments

* [VoteManager] Disallow voting on locked/disabled comments

* [Comments] Disable editing/hiding disabled & locked comments

* Tweaking

* Allow hiding when comments locked
* Don't allow mods to vote when comments locked
* Change wording from disabled to locked everywhere

---------

Co-authored-by: Earlopain <14981592+Earlopain@users.noreply.github.com>
2023-09-05 17:27:05 +02:00
Earlopain
d2f8943b63
[TagQuery] Simplify order metatags special handling
`rank` can be moved inside case/when and the rest is not needed since
that field is not nullable
2023-09-05 16:10:32 +02:00
Earlopain
1b9ea498d3
[TagQuery] Move more stuff into the base elastic class 2023-09-05 16:03:13 +02:00
Earlopain
636937a118
[TagQuery] Move generic elastic code to base class 2023-09-05 15:35:23 +02:00
Earlopain
c51029ea1e
[ModActions] Stop logging name changes
These are not mod actions, anybody can do that. Only log when admins
force change names.
Don't show old/new names, we already don't show that on user profiles.
2023-09-04 23:02:14 +02:00
Earlopain
2290d7045e
[TagQuery] Support any/none for ORed metatags
Turns out it's really simple
2023-09-03 21:25:44 +02:00
Earlopain
6e473193fe
[TagQuery] Fix exception for user_id metatag 2023-09-03 20:37:44 +02:00
Earlopain
939a2d1a23
[Tickets] Fix exception when providing no qtype
const_defined? throws for the empty string
2023-09-03 20:34:53 +02:00
Earlopain
17e9c052cd
[Ads] Support keyword targets
Basically a redo of b61856af6d which was removed in 0842a50ad5
2023-09-03 18:44:42 +02:00
Earlopain
9203dcdb82
[Posts] Add a method to get tags that a post is tagged with
Better performance than the regex as well
2023-09-03 18:24:40 +02:00
Earlopain
9d2a4d6996
[TagQuery] Support ~ for metatags 2023-09-03 17:02:07 +02:00
Earlopain
6b3b24daa2
[TagQuery] Use consistent naming for neg/must_not 2023-09-03 16:43:10 +02:00
Earlopain
040d6454b7
[TagQuery] Remove nesting from elastic query
Tags got their own bool query. There doesn't seem to be a reason for that.
Metatags have the same search meaning as normal tags
2023-09-03 15:40:48 +02:00
Earlopain
177558b5d5
[TagQuery] Use consistent naming for tag fields 2023-09-03 15:23:27 +02:00
Earlopain
b2c7b338c0
[TagQuery] Improve description search
These all works:
* description:test
* description:"multiple words followed by each other"
* description:"multiple words followed by each oth*"
2023-09-03 15:12:40 +02:00
Earlopain
097d7461a1
[Artists] Fix group link not being marked html safe 2023-09-01 20:59:40 +02:00
Earlopain
c430248f6a
[Comments] Fix h2 not showing on mobile
Reason for that styling: unknown
2023-09-01 20:50:52 +02:00
Earlopain
4f3be1955e
[Notes] Add back ability to search by post note updater 2023-08-31 17:38:09 +02:00
Earlopain
a5db6d74f0
[Posts] Fix the navlinks being empty in certain cases
If the post is part of a set that is public ,order:X was supplied and
you aren't the owner of that set the navbar would render empty.
2023-08-31 15:46:56 +02:00
Earlopain
b11ebc5718
[Rubocop] Regenerate todo
991 files inspected, 5757 offenses detected, 5508 offenses autocorrectable
2023-08-31 08:58:20 +02:00
Earlopain
6885fbf62d
[Posts] Fix sequential navigator appearing for order:X 2023-08-31 08:57:55 +02:00
Earlopain
be75cf3349
[QueryBuilder] Fix searching by tag counts 2023-08-31 08:57:47 +02:00
Earlopain
6529f69628
[Posts] Fix Quick/Recent tags not showing
Result of my inability to make changes everywhere I need to.
c9a084e0a3
Also remove artistTags which seems to have never been used.
2023-08-30 20:39:58 +02:00
Donovan Daniels
9c54a0a872
[Routes] Fix handling of periods in artists, tags, users & wiki pages 2023-08-29 13:44:22 -05:00
Earlopain
40db4d6136
[Users] Remove weird behaviour from respond_with in api keys controller
There is no proper show action for api keys. Just do a redirect instead.
Remove a duplicate view action from the routes, be explicit that a show action exists
2023-08-29 20:32:42 +02:00
Earlopain
8b133570c0
Merge pull request #543 from e621ng/search-improvements
Search improvements
2023-08-29 18:54:42 +02:00
Earlopain
e0182057a2
[Posts] Save typed_tags indexed by category id
This is how they actually got cached on the index action.

Fixes tags with invalid categories overwriting all other general tags on the index action.
The cached @typed_tags weren't actually used there because of key mismatching,
except for invalid categories since they fall back to "general" (should have been 0).
2023-08-29 17:33:30 +02:00
Earlopain
f75dac9c73
[Posts] Remove post tag_string_X methods
Optimally this should be completly unused but unfortunatly the iqdb response
doesn't use the post serializer so those will stop returning there.
I should really switch that over to the serializer sometime.
2023-08-29 16:56:10 +02:00
OpportunePineapple
3916798a0e
[Themes] Fix invalid tag category hover color (#544) 2023-08-24 21:15:34 +02:00
Earlopain
b65741456f
[QueryBuilder] Move count validation into the query class 2023-08-24 13:43:01 +02:00