Skip to content

Commit

Permalink
Remove legacy suggester code (#722)
Browse files Browse the repository at this point in the history
  • Loading branch information
aprudhomme authored Sep 18, 2024
1 parent bf00a84 commit 06342da
Show file tree
Hide file tree
Showing 32 changed files with 1,271 additions and 8,217 deletions.
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 @@ -171,7 +171,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

0 comments on commit 06342da

Please sign in to comment.