Commit 145d8d87 authored by Hans Roh's avatar Hans Roh

upd readme

parent 02b41265
......@@ -999,7 +999,7 @@ Here's example of client side indexer script using API.
session.post ('http://127.0.0.1:5000/v1/books/documents', doc.as_json ())
numdoc += 1
if numdoc % 1000:
session.get ('http://127.0.0.1:5000/v1/books/collection/commit')
session.get ('http://127.0.0.1:5000/v1/books/commit')
cursor.close ()
dbc.close ()
......@@ -1017,7 +1017,6 @@ APIs are:
# remove collection with all index files
session.remove ('http://127.0.0.1:5000/v1/books")
# get collection locks
session.get ('http://127.0.0.1:5000/v1/books/locks")
# create 'custom' lock
......@@ -1047,15 +1046,9 @@ APIs are:
session.delete ('http://127.0.0.1:5000/v1/books/search?q=title:book")
# commit
session.get ('http://127.0.0.1:5000/v1/books/collection/commit')
session.get ('http://127.0.0.1:5000/v1/books/commit')
# rollback
session.get ('http://127.0.0.1:5000/v1/books/collection/rollback')
# refresh
session.get ('http://127.0.0.1:5000/v1/books/collection/refresh')
# close
session.get ('http://127.0.0.1:5000/v1/books/collection/close')
# disable: remove coleection config, reserve index files
session.get ('http://127.0.0.1:5000/v1/books/collection/disable')
session.get ('http://127.0.0.1:5000/v1/books/rollback')
For more detail about API, see `app.py`_.
......
......@@ -125,7 +125,7 @@ def mirror (source, target):
segments = os.path.join (normpath (status ['indexdirs'][0]), 'segments.new')
if os.path.isfile (segments [:-4]):
os.remove (segments [:-4])
os.rename (segments, segments[:-4])
os.rename (segments, segments[:-4])
colopt = status ["colopt"]
dcolopt = normpath (colopt ['path'])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment