manticoresearch-php get auto-id of added document

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 - https://github.com/manticoresoftware/manticoresearch/issues/473

As soon as it’s done the PHP client will be able to return the actual value instead of 0.

Currently you can only get auto-id via SQL - https://manual.manticoresearch.com/Functions/Other_functions#LAST_INSERT_ID()

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.