Repository navigation
elasticsearch - #151
Merged
Merged
elasticsearch#151
Conversation
Query still needs some work to match current results.
so indexer can mimic es-indexer typescript behavior.
Rather than do some subclass style nonsense, just have a single indexer instance, and index configs are just data structs that the single indexer can use. This will make it easier for that indexer to have a listener and respond appropriately.
Need some batching...
Also uses painless to "patch" social documents.
stereosteve
marked this pull request as ready for review
June 24, 2025 14:49
raymondjacobson
approved these changes
Jun 24, 2025
| "field_value_factor": { | ||
| "field": %q, | ||
| "factor": 100, | ||
| "modifier": "ln2p", |
Contributor
Author
There was a problem hiding this comment.
Mostly because the python codebase used it. It adds 2 to the value to smooths out the lower end of the range a bit...
| painlessRemoveEntity := ` | ||
| def user = ctx._source; | ||
| def idx = user[params.fieldName].indexOf(params.entityId); | ||
| if (idx > -1) { |
Contributor
Author
There was a problem hiding this comment.
No because indexOf returns -1 if not found... but 0 is a valid found index.
| return nil | ||
| })) | ||
|
|
||
| // this fires all the time... |
Member
There was a problem hiding this comment.
oh wow, we never use plays in current search? that might be a nice signal to add... some day
Contributor
Author
There was a problem hiding this comment.
We did index it in discovery provider and used it as a ranking signal. But in the go version we're not currently indexing it... and just using repost count as ranking signal.
1 of 2 tasks
dylanjeffers
added a commit
that referenced
this pull request
Nov 12, 2026
## Summary Audit of feature flags and env toggles in the API. Only one met the bar for removal. **Removed** - `skipAuthCheck` env var (`api/server.go`). When set to true, it turned off `isAuthorizedRequest` entirely, and production code read it from the environment. Nothing in this repo, compose, or k8s sets it. Every test that needs it sets `app.skipAuthCheck = true` on the struct, which still works. Added in #151 (2025-06) and never used through the env since. This cuts a dead toggle and an auth bypass at the same time. **Audited and kept (needs a decision from someone with prod access)** - `commsMessagePush`: defaults on since #349 (2025-09). The env override only turns it off. `server_test.go` depends on it to keep the websocket manager and pg-notify listeners out of the shared test app, so it works as a test seam. I couldn't confirm prod doesn't set `commsMessagePush=false`; if it doesn't, the env parse can go, but the struct field should stay for tests. - `coreBlockStreamEnabled`: defaults off and arrived in #941 (2026-06, ~5 months ago). I couldn't see the prod env (no RBAC on deployments/configmaps). If prod has it on, inline it; if it was never turned on, consider deleting the gRPC stream path. - `newChainQueueEnabled` / `newChainFlushEnabled` / `newChainInsecureSkipVerify` / `etlStartingBlockHeight` / `etlEndingBlockHeight` / `PlayRoutingHosts`: the genesis migration is still in progress (see `cmd/genesis-writer/ROLLOUT.md`). Not stale yet; remove them at cutover. ## Test plan - [x] `go build ./...` and `go vet ./api/` - [ ] `go test ./api/...` (couldn't run locally because Docker/test DB was down; CI covers it) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds an
esindexerpackage.Adds
api/searchv1subpackage with some structs to build elastic DSL.api/v1_search.gohas functions forsearchTracksetc that populate the structs fromsearchv1subpackage to build the DSL and do search etc. Probably the bridge team would vote to inlining the contents ofsearchv1into the endpoint files since we like to colocate the query logic with the endpoint. In this case it would probably make sense to move some stuff out ofv1_search.gointo subfiles likev1_search_users.gowhich would have the DSL builder and the search helper function etc.Currently the indexer can run on the same box as our Elasticsearch. The Makefile has been updated to deploy the indexer in "listen" mode:
make esindexer-stagingormake esindexer-production. We don't need no stinkin Pulumi in these parts.More Notes
/search/autocomplete,/search/full,/search/tagsall use the same handler function. Conditional logic will only personalize results in thefullendpoint, and thetagswill modify the initialmustportion of the DSL to use the tags field._scorebasically invalidates the notion thatshouldclauses can help re-rank results. The result sorting will be different but in eyeballing 30 odd queries I thought the bridge results were better... more likely to honor exact title matches and less likely to randomly show some rando track with low numbers... 🤷 .esindexerpackage... but I'm not even anymore... so I guess I could just move it back intoapipackage.