Details
-
Bug
-
Resolution: User Error
-
Major
-
None
-
3.6.0
-
None
-
0
Description
I have been trying unsuccessfully to returned stored items via the Java SDK using both the old API and the new API on both non-scoped indexes and scoped indexes.
I have attached a file bug.tar with my samples (I built the 3.6 java SDK form source)
linuxbrew@couch01:~/ChatGPT/API/sdkdoc/JAVA$ tar tvf bug.tar
|
drwxr-xr-x linuxbrew/linuxbrew 0 2024-03-11 12:44 bug/
|
-rwxr-xr-x linuxbrew/linuxbrew 1169 2024-03-11 11:49 bug/non-scoped-create.sh
|
-rw-r--r-- linuxbrew/linuxbrew 728 2024-03-11 12:44 bug/README.txt
|
-rw-r--r-- linuxbrew/linuxbrew 5470 2024-03-11 12:40 bug/OldApiNumeric.class
|
-rw-r--r-- linuxbrew/linuxbrew 3341 2024-03-11 12:40 bug/NewApiNumeric.java
|
-rw-r--r-- linuxbrew/linuxbrew 3197 2024-03-11 12:41 bug/OldApiNumeric.java
|
-rw-r--r-- linuxbrew/linuxbrew 5665 2024-03-11 12:40 bug/NewApiNumeric.class
|
-rwxr-xr-x linuxbrew/linuxbrew 1222 2024-03-11 11:52 bug/scoped-create.sh
|
directions in bug/README.txt
Load travel-sample
|
set up the evars and export them
|
CB_USERNAME
|
CB_PASSWORD
|
CB_FTSHOSTNAME (a fts node in capella)
|
CB_HOSTNAME (connect in capella)
|
Make insdexes
|
./non-scoped-create.sh
|
./scoped-create.sh
|
Comile
|
javac -cp "./libs/*" OldApiNumeric.java NewApiNumeric.java
|
Try to run I want to return 'name' and 'activity' but it does not seem to work
|
java -Dorg.slf4j.simpleLogger.defaultLogLevel=off -cp "./libs/*:." OldApiNumeric True
|
java -Dorg.slf4j.simpleLogger.defaultLogLevel=off -cp "./libs/*:." OldApiNumeric False
|
java -Dorg.slf4j.simpleLogger.defaultLogLevel=off -cp "./libs/*:." NewApiNumeric True
|
java -Dorg.slf4j.simpleLogger.defaultLogLevel=off -cp "./libs/*:." NewApiNumeric False
|
Essentially I try to emit "name" and "activity" doing an FTS qury but the results never seem to include the data using the Java SDK
SearchOptions opts = SearchOptions.searchOptions().limit(3).fields("name","activity").sort("id");
|
But if I do any query in the UI I get what I expect. Example:
{ fields["name","activity"], "query": { "min": 10010, "max": 10021, "inclusive_min": true, "inclusive_max": true, "field": "id" }}
|
See images
In all case when running the Java SDK programs (non-scoped indexes and scoped indexes) I expect to get "name" and "activity" returned but I don't.
linuxbrew@couch01:~/ChatGPT/API/sdkdoc/JAVA/bug$ java -Dorg.slf4j.simpleLogger.defaultLogLevel=off -cp "./libs/*:." OldApiNumeric True
|
use_cluster_index: true
|
I am tring to return "name","activity" but the Java SDK doesnt seem to honor .fields(String ....) note everything else takes
|
Found row: SearchRow{index='non_scoped_ts_index_1f439a71bd5f855b_4c1c5584', id='landmark_10019', score=0.4194244633900128, explanation=, locations=Optional.empty, fragments={}}
|
Found row: SearchRow{index='non_scoped_ts_index_1f439a71bd5f855b_4c1c5584', id='landmark_10020', score=0.4194244633900128, explanation=, locations=Optional.empty, fragments={}}
|
Found row: SearchRow{index='non_scoped_ts_index_1f439a71bd5f855b_4c1c5584', id='landmark_10021', score=0.4194244633900128, explanation=, locations=Optional.empty, fragments={}}
|
|
linuxbrew@couch01:~/ChatGPT/API/sdkdoc/JAVA/bug$ java -Dorg.slf4j.simpleLogger.defaultLogLevel=off -cp "./libs/*:." OldApiNumeric False
|
use_cluster_index: false
|
I am tring to return "name","activity" but the Java SDK doesnt seem to honor .fields(String ....) note everything else takes
|
Found row: SearchRow{index='travel-sample.inventory.scoped_ts_index_669e2b3758e507d6_4c1c5584', id='landmark_10019', score=0.4194244633900128, explanation=, locations=Optional.empty, fragments={}}
|
Found row: SearchRow{index='travel-sample.inventory.scoped_ts_index_669e2b3758e507d6_4c1c5584', id='landmark_10020', score=0.4194244633900128, explanation=, locations=Optional.empty, fragments={}}
|
Found row: SearchRow{index='travel-sample.inventory.scoped_ts_index_669e2b3758e507d6_4c1c5584', id='landmark_10021', score=0.4194244633900128, explanation=, locations=Optional.empty, fragments={}}
|
|
linuxbrew@couch01:~/ChatGPT/API/sdkdoc/JAVA/bug$ java -Dorg.slf4j.simpleLogger.defaultLogLevel=off -cp "./libs/*:." NewApiNumeric True
|
use_cluster_index: true
|
I am tring to return "name","activity" but the Java SDK doesnt seem to honor .fields(String ....) note everything else takes
|
Found row: SearchRow{index='non_scoped_ts_index_1f439a71bd5f855b_4c1c5584', id='landmark_10019', score=0.4194244633900128, explanation=, locations=Optional.empty, fragments={}}
|
Found row: SearchRow{index='non_scoped_ts_index_1f439a71bd5f855b_4c1c5584', id='landmark_10020', score=0.4194244633900128, explanation=, locations=Optional.empty, fragments={}}
|
Found row: SearchRow{index='non_scoped_ts_index_1f439a71bd5f855b_4c1c5584', id='landmark_10021', score=0.4194244633900128, explanation=, locations=Optional.empty, fragments={}}
|
|
linuxbrew@couch01:~/ChatGPT/API/sdkdoc/JAVA/bug$ java -Dorg.slf4j.simpleLogger.defaultLogLevel=off -cp "./libs/*:." NewApiNumeric False
|
use_cluster_index: false
|
I am tring to return "name","activity" but the Java SDK doesnt seem to honor .fields(String ....) note everything else takes
|
Found row: SearchRow{index='travel-sample.inventory.scoped_ts_index_669e2b3758e507d6_4c1c5584', id='landmark_10019', score=0.4194244633900128, explanation=, locations=Optional.empty, fragments={}}
|
Found row: SearchRow{index='travel-sample.inventory.scoped_ts_index_669e2b3758e507d6_4c1c5584', id='landmark_10020', score=0.4194244633900128, explanation=, locations=Optional.empty, fragments={}}
|
Found row: SearchRow{index='travel-sample.inventory.scoped_ts_index_669e2b3758e507d6_4c1c5584', id='landmark_10021', score=0.4194244633900128, explanation=, locations=Optional.empty, fragments={}}
|