Is it possible to get auto-id
(generated by RT index) when adding a document? I’m currently using PHP package and addDocument()
method but it always return 0
as _id
.
usually SphinxQL interface returns last_insert_id for INSERT and REPLACE.
However you could also use SELECT query to get it.
There’s an open issue on github about it - inserted "id" is 0 on HTTP · Issue #473 · manticoresoftware/manticoresearch · GitHub
As soon as it’s done the PHP client will be able to return the actual value instead of 0.
I’m using PHP client (HTTP interface), IMHO using SQL interface at the same time does not look good. I prefer to use single interface/method.
I’ve just fixed document id value for HTTP reply to insert \ replace endpoints for auto-generated id at
f93223a
You could grab a new package at dev repo when CI passed to get issue fixed