File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed
fluss-client/src/main/java/com/alibaba/fluss/client/lookup Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -34,8 +34,8 @@ public interface Lookuper {
3434 * Lookups certain row from the given lookup key.
3535 *
3636 * <p>The lookup key must be a primary key if the lookuper is a Primary Key Lookuper (created by
37- * {@code table.newLookuper ().create ()}), or be the prefix key if the lookuper is a Prefix Key
38- * Lookuper (created by {@code table.newLookuper ().withLookupColumns (prefixKeys).create ()}).
37+ * {@code table.newLookup ().createLookuper ()}), or be the prefix key if the lookuper is a Prefix
38+ * Key Lookuper (created by {@code table.newLookup ().lookupBy (prefixKeys).createLookuper ()}).
3939 *
4040 * @param lookupKey the lookup key.
4141 * @return the result of lookup.
Original file line number Diff line number Diff line change @@ -249,7 +249,17 @@ while (true) {
249249```
250250
251251### Lookup
252- You can also use the Fluss API to perform lookups on a table. This is useful for querying specific records based on their primary key.
252+ You can also use the Fluss API to perform lookups on a table. This is useful for querying specific records based on their primary key or prefix key .
253253``` java
254- LookupResult lookup = table. newLookup(). createLookuper(). lookup(rowKey). get();
254+ // Lookup by primary key
255+ LookupResult lookup = table. newLookup()
256+ .createLookuper()
257+ .lookup(rowKey)
258+ .get();
259+ // Lookup by prefix key
260+ LookupResult prefixLookup = table. newLookup()
261+ .lookupBy(prefixKeys)
262+ .createLookuper()
263+ .lookup(rowKey)
264+ .get();
255265```
You can’t perform that action at this time.
0 commit comments