GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — ydb-java-examples/secondary_index at master · ydb-platform/ydb-java-examples

Expand file tree

/

secondary_index

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

secondary_index

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
src/main
src/main
 
 
README.md
README.md
 
 
pom.xml
pom.xml
 
 

README.md

Secondary indexes example

Build and run as follows:

$ ya make
$ export YDB_TOKEN=...
$ ./run.sh tech.ydb.examples.indexes.Application --indexes.endpoint=ENDPOINT --indexes.database=/ru/home/user/mydb --indexes.prefix=/ru/home/user/mydb

Drop and create tables:

$ curl -X POST localhost:9000/series/drop_tables
$ curl -X POST localhost:9000/series/create_tables

Generate some random series records:

$ curl -X POST 'localhost:9000/series/generate_random?startId=1&count=10000'

Get the first 10 records:

$ curl localhost:9000/series/list

Get the next 10 records:

$ curl localhost:9000/series/list?lastSeriesId=10

Get first 10 most viewed series:

$ curl localhost:9000/series/most_viewed

Get next 10 most viewed series:

$ curl 'localhost:9000/series/most_viewed?lastSeriesId=...&lastViews=...'

Delete some record:

$ curl -X POST localhost:9000/series/delete/5

Insert a new record:

$ curl -X POST -H 'Content-Type: application/json' localhost:9000/series/insert --data-binary '{"seriesId":5,"title":"My Favorite Series","seriesInfo":"Series Description","releaseDate":"2018-09-05","views":1000000}'

Update views of the record:

$ curl -X POST localhost:9000/series/update_views/5/1000001
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.