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

Remove legacy suggester code #722

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,3 @@ This tool indexes yelp reviews available at [Yelp dataset challenge](https://www
```
./gradlew clean installDist :test -PincludePerfTests=* --tests "com.yelp.nrtsearch.server.YelpReviewsTest.runYelpReviews" --info
```

# Suggestions

This test indexes businesses, creates an Infix Suggester and fetches suggestions. It requires a host, a port and a writeable directory in a standalone nrtSearch server.

```./gradlew :test -DsuggestTmp=remoteServerDir -DsuggestHost=yourStandaloneServerHost -DsuggestPort=yourStandaloneServerHost --tests "com.yelp.nrtsearch.server.YelpSuggestTest"```
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ test {
} else {
if (!project.hasProperty('includePerfTests')) {
exclude '**/YelpReviewsTest.class'
exclude '**/YelpSuggestTest.class'
exclude '**/MergeBehaviorTests.class'
exclude '**/IncrementalDataCleanupCommandTest.class'
filter {
Expand Down
28 changes: 1 addition & 27 deletions clientlib/src/main/proto/yelp/nrtsearch/luceneserver.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ syntax = "proto3";

import "yelp/nrtsearch/search.proto";
import "yelp/nrtsearch/analysis.proto";
import "yelp/nrtsearch/suggest.proto";
import "google/api/annotations.proto";
import "google/api/httpbody.proto";
import "google/protobuf/any.proto";
Expand Down Expand Up @@ -215,31 +214,6 @@ service LuceneServer {

}

/* Builds a new auto-suggester, loading suggestions via the provided local file path.*/
rpc buildSuggest (BuildSuggestRequest) returns (BuildSuggestResponse) {
option (google.api.http) = {
post: "/v1/suggest_build"
body: "*"
};

}
/* Perform an auto-suggest lookup.*/
rpc suggestLookup (SuggestLookupRequest) returns (SuggestLookupResponse) {
option (google.api.http) = {
post: "/v1/suggest_lookup"
body: "*"
};

}
/* Updates existing suggestions, if the suggester supports near-real-time changes. */
rpc updateSuggest (BuildSuggestRequest) returns (BuildSuggestResponse) {
option (google.api.http) = {
post: "/v1/suggest_update"
body: "*"
};

}

/*
Creates a snapshot in the index, which is saved point-in-time view of the last commit
in the index such that no files referenced by that snapshot will be deleted by ongoing
Expand Down Expand Up @@ -298,7 +272,7 @@ service LuceneServer {
};
}

/* Gets the state of a started index, includes settings, live_settings, search schema, suggest schema */
/* Gets the state of a started index, includes settings, live_settings, search schema */
rpc state (StateRequest) returns (StateResponse) {
option (google.api.http) = {
post: "/v1/state"
Expand Down
162 changes: 0 additions & 162 deletions clientlib/src/main/proto/yelp/nrtsearch/suggest.proto

This file was deleted.

9 changes: 3 additions & 6 deletions grpc-gateway/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ RUN protoc \
--go_out=plugins=grpc:$OUTPATH \
$PROTO_PATH/yelp/nrtsearch/analysis.proto \
$PROTO_PATH/yelp/nrtsearch/luceneserver.proto \
$PROTO_PATH/yelp/nrtsearch/search.proto \
$PROTO_PATH/yelp/nrtsearch/suggest.proto
$PROTO_PATH/yelp/nrtsearch/search.proto

RUN protoc \
-I $PROTO_PATH \
Expand All @@ -81,8 +80,7 @@ RUN protoc \
--grpc-gateway_out=logtostderr=true:$OUTPATH \
$PROTO_PATH/yelp/nrtsearch/analysis.proto \
$PROTO_PATH/yelp/nrtsearch/luceneserver.proto \
$PROTO_PATH/yelp/nrtsearch/search.proto \
$PROTO_PATH/yelp/nrtsearch/suggest.proto
$PROTO_PATH/yelp/nrtsearch/search.proto

RUN protoc \
-I $PROTO_PATH \
Expand All @@ -92,8 +90,7 @@ RUN protoc \
--openapiv2_out=logtostderr=true:$OUTPATH \
$PROTO_PATH/yelp/nrtsearch/analysis.proto \
$PROTO_PATH/yelp/nrtsearch/luceneserver.proto \
$PROTO_PATH/yelp/nrtsearch/search.proto \
$PROTO_PATH/yelp/nrtsearch/suggest.proto
$PROTO_PATH/yelp/nrtsearch/search.proto

RUN cp $OUTPATH/yelp/nrtsearch/* grpc-gateway/
RUN cp $OUTPATH/github.com/Yelp/nrtsearch/* grpc-gateway/
Expand Down
Loading
Loading